/* ══════════════════════════════════════════════════════════════
   Notespark — Contacts page, light-theme pass
   Isolated file. Load after the other nota-*.css files.

   The contacts page was never converted for the light theme, so several
   elements kept dark-theme rgba(255,255,255,…) colours and rendered as
   white-on-white. These were the classes with no theme-light override:
   contacts-tab, contacts-empty, contact-card-name, contact-scope,
   contact-back-btn, contact-detail-name.
   ══════════════════════════════════════════════════════════════ */

/* Page surface */
.nota.theme-light .contacts-page {
    color: var(--n-text);
}

/* ── Mine / Shared / All tabs ── */
.nota.theme-light .contacts-tab {
    color: var(--n-text-3) !important;
    font-weight: 650;
}

    .nota.theme-light .contacts-tab:hover {
        color: var(--n-text) !important;
    }

    .nota.theme-light .contacts-tab.active {
        color: var(--n-accent-text) !important;
        border-color: var(--n-accent) !important;
    }

/* ── Empty state ── */
.nota.theme-light .contacts-empty {
    color: var(--n-text-3) !important;
}

    .nota.theme-light .contacts-empty h3,
    .nota.theme-light .contacts-empty strong {
        color: var(--n-text) !important;
    }

/* ── Cards ── */
.nota.theme-light .contact-card-name {
    color: var(--n-text) !important;
    font-weight: 700;
}

.nota.theme-light .contact-scope {
    color: var(--n-text-3) !important;
    opacity: 1;
}

/* ── Detail view ── */
.nota.theme-light .contact-back-btn {
    color: var(--n-text-3) !important;
    background: var(--n-surface) !important;
    border-radius: 8px;
}

    .nota.theme-light .contact-back-btn:hover {
        color: var(--n-text) !important;
        background: var(--n-surface-hover) !important;
    }

.nota.theme-light .contact-detail-name {
    color: var(--n-text) !important;
}

/* Search field on the warm paper */
.nota.theme-light .contacts-page input[type="text"],
.nota.theme-light .contacts-search {
    background: #fff !important;
    border: 1px solid var(--n-border-light) !important;
    color: var(--n-text) !important;
}

/* ── Lucide icons replacing the old PNG / emoji ── */
.contacts-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--n-accent);
    vertical-align: middle;
    margin-right: 4px;
}

.contacts-empty-icon {
    display: flex;
    justify-content: center;
    color: var(--n-text-muted);
    margin-bottom: 14px;
}

/* ── Mobile: stop the "+ New contact" button stretching full-width ──
   On mobile it was spanning the whole panel, making it the loudest thing
   on screen and clashing with the empty-state CTA below it. Keep it
   compact and right-aligned, as on desktop. */
.nota.compact .contacts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.nota.compact .contacts-new-btn {
    width: auto !important;
    flex: 0 0 auto !important;
    align-self: flex-start;
    padding: 8px 14px !important;
    font-size: 13.5px !important;
    white-space: nowrap;
}

/* Empty-state CTA shouldn't span the full width either */
.nota.compact .contacts-empty .contacts-new-btn,
.nota.compact .contacts-empty button {
    width: auto !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ── Top "new contact" is now an icon button ──
   The empty-state CTA is the prominent action; once you have contacts this
   quiet icon takes over, so there's never two competing purple buttons. */
.contacts-new-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    flex: 0 0 auto;
    background: var(--n-surface);
    border: 1px solid var(--n-border-light);
    border-radius: 10px;
    color: var(--n-text-2);
    cursor: pointer;
    transition: background var(--n-transition), color var(--n-transition), border-color var(--n-transition);
}

    .contacts-new-icon:hover {
        background: var(--n-accent-dim);
        border-color: var(--n-accent);
        color: var(--n-accent-text);
    }

/* ── Scope badge is now a Lucide icon rather than an emoji ── */
.nota.theme-light .contact-scope {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--n-text-4) !important;
}

.nota.theme-light .contact-scope-private {
    color: #b58a3c !important;
}

.nota.theme-light .contact-scope-channel {
    color: #5b8fd9 !important;
}

.nota.theme-light .contact-scope-company {
    color: #63ab77 !important;
}

/* ══════════════════════════════════════════════════════════════
   Richer contact cards — email / phone / city chips.
   Desktop had a lot of dead space with only name + company; these
   fill it with the details you actually act on. On mobile the phone
   chip is a tel: link, so tapping it dials.
   ══════════════════════════════════════════════════════════════ */
.contact-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-top: 7px;
}

.contact-detail-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    padding: 3px 9px;
    font-size: 12px;
    font-weight: 600;
    color: var(--n-text-3);
    background: var(--n-surface);
    border: 1px solid var(--n-border-light);
    border-radius: 999px;
    text-decoration: none;
    transition: background var(--n-transition), color var(--n-transition), border-color var(--n-transition);
}

    .contact-detail-chip span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

a.contact-detail-chip:hover {
    color: var(--n-accent-text);
    border-color: var(--n-accent);
    background: var(--n-accent-dim);
}

/* City isn't actionable — no hover affordance */
.contact-detail-plain {
    cursor: default;
}

/* Phone reads as the primary action on mobile */
.nota.compact .contact-detail-tel {
    color: #2f7a4f;
    border-color: rgba(99,171,119,0.45);
    background: rgba(99,171,119,0.10);
}

.nota.compact a.contact-detail-tel:hover {
    color: #2f7a4f;
    border-color: rgba(99,171,119,0.7);
    background: rgba(99,171,119,0.18);
}

/* Cards need more room now they carry three lines */
.nota.theme-light .contact-card {
    align-items: flex-start;
    padding: 13px 15px;
}

/* On mobile, stack chips full-width so the tap targets are generous */
.nota.compact .contact-card-details {
    gap: 6px;
}

.nota.compact .contact-detail-chip {
    padding: 6px 11px;
    font-size: 12.5px;
}

/* ── Linked contacts on a note ── */
.contact-strip .contact-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.contact-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 8px 5px 5px;
    background: #fff;
    border: 1px solid var(--n-border-light);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--n-text);
}

.contact-chip-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

.contact-chip-name {
    white-space: nowrap;
}

.contact-chip-x {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--n-text-4);
    font-size: 15px;
    line-height: 1;
    padding: 0 2px;
}

    .contact-chip-x:hover {
        color: var(--n-danger);
    }

/* ── Notes tab on the contact detail page ── */
.cd-notes-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 44px 20px;
    color: var(--n-text-4);
    text-align: center;
}

    .cd-notes-empty p {
        margin: 0;
        font-size: 14px;
    }

.cd-notes-hint {
    font-size: 12.5px !important;
    opacity: 0.8;
    max-width: 280px;
}

.cd-notes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cd-note-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--n-border-light);
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

    .cd-note-row:hover {
        border-color: var(--n-card-border-hover);
        box-shadow: 0 3px 12px rgba(70,55,30,0.10);
        transform: translateY(-1px);
    }

.cd-note-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cd-note-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--n-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cd-note-meta {
    font-size: 12px;
    color: var(--n-text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cd-note-date {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--n-text-4);
    flex-shrink: 0;
}
