/* =============================================================================
 * FIX79E7 — Inbox tab visibility + contact-detail form controls
 * Loaded after bridge.css so cascade order makes us win.
 * ============================================================================= */

/* ── PART A: Make mc-tabs (Inbox / Compose / Contacts) all visible on phones ── */

/* Default behavior: let pills wrap if needed instead of overflowing right */
.mc-tabs {
    display: flex !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;       /* Firefox */
    padding: 4px 0 !important;
}
.mc-tabs::-webkit-scrollbar { display: none; }

/* Each pill — shrink slightly so all three fit on phones without scrolling */
.mc-tabs .mc-tab {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    padding: 8px 14px !important;
    font-size: 0.88rem !important;
}

/* On narrow screens, prefer fitting all three over comfort padding */
@media (max-width: 420px) {
    .mc-tabs .mc-tab {
        padding: 8px 10px !important;
        font-size: 0.82rem !important;
    }
}

/* ── PART B: contact-detail.php form controls ── */
/* The page uses a top-level wrapper (most likely .contact-detail or .relationship)
   but we don't know exactly what — so target the page generically by scoping
   to any select/textarea/input with id^="rel-" or class="tag-input", which are
   ONLY used on this page (recon confirmed). Each rule is narrow and safe. */

select#rel-type,
select#rel-trust,
textarea#rel-notes,
input.tag-input {
    background: #ffffff !important;
    color: #1a1a2e !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 10px 12px !important;
    font-size: 0.95rem !important;
    font-family: inherit !important;
    width: 100% !important;
    box-sizing: border-box !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

textarea#rel-notes {
    min-height: 84px !important;
    resize: vertical !important;
    line-height: 1.4 !important;
}

/* Custom dropdown chevron for the two selects since we removed UA appearance */
select#rel-type,
select#rel-trust {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%231a1a2e' d='M6 8L0 0h12z'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 10px 7px !important;
    padding-right: 32px !important;
}

/* Focus state — readable */
select#rel-type:focus,
select#rel-trust:focus,
textarea#rel-notes:focus,
input.tag-input:focus {
    outline: none !important;
    border-color: var(--ai-primary, #6366f1) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18) !important;
}

/* Placeholder text — was almost invisible before */
textarea#rel-notes::placeholder,
input.tag-input::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

/* Light-theme equivalents (same values, but defeats theme-light specificity) */
.theme-light select#rel-type,
.theme-light select#rel-trust,
.theme-light textarea#rel-notes,
.theme-light input.tag-input {
    background-color: #ffffff !important;
    color: #1a1a2e !important;
    border-color: #e5e7eb !important;
}
