/* zcontacts.css — loaded via zMeta.zBrush: [zcontacts] -> /styles/zcontacts.css
   Teaching goal: a Contacts-app row (name + company/email, trailing trash)
   drawn with zLoom's zList/%item per-row loop; the relational company NAME
   lives on its own Directory page (a join fed to zTable) — this file only
   skins the row-level CRUD surfaces (Contacts + Companies + dialogs). */

:root {
    --zc-bg: #f4f5f7;
    --zc-ink: #1c2033;
    --zc-muted: #8a8f9c;
    --zc-line: rgba(28, 32, 51, 0.08);
    --zc-accent: #2f7ef2;
}

body {
    background: var(--zc-bg);
}

#zVaF-content {
    max-width: 560px;
    margin: 48px auto;
    padding: 0 16px;
}

/* Directory's joined table has more columns than the 560px CRUD column fits —
   widen the page and let the table scroll horizontally instead of clipping. */
#zVaF-content:has(table) {
    max-width: 760px;
}

table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-radius: 10px;
}

#zVaF-content > h1 {
    text-align: center;
    margin-bottom: 20px;
}

.zContacts-card {
    background: #fff;
    border: 1px solid var(--zc-line);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(28, 32, 51, 0.08);
    padding: 4px 0;
    margin-bottom: 16px;
}

.zContacts-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--zc-line);
}

.zContacts-row:last-child {
    border-bottom: none;
}

.zContacts-name {
    flex: 1 1 auto;
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--zc-ink);
}

.zContacts-detail {
    flex: 1 1 auto;
    display: block;
    font-size: 0.85rem;
    color: var(--zc-muted);
    margin-top: 2px;
}

/* Name + detail stack vertically as one column, trash sits at the end. */
.zContacts-row > div:has(.zContacts-name),
.zContacts-row > div:has(.zContacts-detail) {
    flex: 1 1 auto;
    min-width: 0;
}

.zContacts-delete {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    color: var(--zc-muted);
    font-size: 1rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
}

.zContacts-delete:hover {
    background: #fdecea;
    color: #d64545;
}

.zContacts-add {
    display: block;
    width: 100%;
    padding: 12px 0;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    margin-bottom: 10px;
}

.zContacts-manage {
    display: block;
    width: 100%;
    padding: 10px 0;
    border-radius: 12px;
    font-weight: 500;
    margin-bottom: 8px;
}

@media (max-width: 420px) {
    #zVaF-content {
        margin: 24px auto;
    }
}
