/* ── Desktop nav links: hide mobile-only hamburger items ─────────────────── */
.nav-link-mobile { display: none; }

/* ── Mobile responsive ────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    /* Show mobile nav items in hamburger, hide desktop nav links */
    .nav-links { display: none !important; }
    .nav-link-mobile { display: block; }
    .div.nav-link-mobile { display: block; }

    main { padding: 0.75rem 0.75rem 2rem; }

    .header-row {
        flex-direction: row;
        align-items: center;
        gap: 0.4rem;
    }
    .header-row h1 {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    h1 { font-size: 1.5rem; }

    .btn { padding: 0.4rem 0.75rem; font-size: 0.82rem; }
    .btn-small { padding: 0.25rem 0.5rem; font-size: 0.75rem; }

    .table-controls { gap: 0.3rem; }

    /* Responsive button: show "+" only on mobile */
    .btn-label-short { display: inline; }
    .btn-label-full { display: none; }

    /* Hide gender & notes cols on mobile */
    .col-hide-mobile { display: none; }
    .table-collapsed .col-expand-mobile { display: none; }

    /* Collapsed table fits screen; expanded table can scroll horizontally */
    table.sortable.table-collapsed { table-layout: fixed; width: 100%; }
    table.sortable:not(.table-collapsed) { table-layout: auto; min-width: 100%; }

    /* Expanded table: preserve collapsed column widths, widen new columns */
    table.sortable:not(.table-collapsed) .col-name { min-width: 130px; }
    table.sortable:not(.table-collapsed) .col-guest { min-width: 140px; }
    table.sortable:not(.table-collapsed) .col-gender { width: auto; min-width: 58px; }
    table.sortable:not(.table-collapsed) .col-expand { min-width: 140px; }
    table.sortable:not(.table-collapsed) .col-expand-mobile { min-width: 240px; }
    table.sortable:not(.table-collapsed) .col-kebab { width: auto; min-width: 56px; }

    th, td { padding: 0.3rem 0.15rem; font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; }
    td:last-child, th:last-child { overflow: visible; }
    .col-sent { width: 44px; padding: 0; }
    .col-status { width: 96px; }
    .col-kebab { width: 24px; padding: 0; overflow: visible; }
    .col-gender { width: 46px; padding-left: 0; padding-right: 0; }
    .guest-name-cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .kebab-wrapper .kebab-btn { padding: 0.2rem 0.2rem; font-size: 1.15rem; }

    .event-row-name { font-size: 1.05rem; }
    .event-row-location { font-size: 0.75rem; }
    .event-row-date { font-size: 0.72rem; }
    .badge { font-size: 0.62rem; padding: 0.08rem 0.4rem; }

    .summary-table th { font-size: 0.62rem; padding: 0.3rem 0.35rem; }
    .summary-table td { font-size: 0.78rem; padding: 0.3rem 0.35rem; }

    .detail-overlay {
        background: var(--gc-white);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        align-items: stretch;
    }
    .detail-card {
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
        box-shadow: none;
    }

    .detail-name-input { font-size: 0.95rem; }

    .form { padding: 1.25rem; }

    .form-row { flex-direction: column; gap: 0.5rem; }
    .modal-form .form-row { flex-direction: row; gap: 0.75rem; }

    .batch-bar { font-size: 0.8rem; padding: 0.4rem 0.6rem; }

    /* "+" buttons: 36x36 rounded square on mobile */
    .new-invite-icon-btn.btn-small,
    .btn:has(.btn-label-short) {
        width: 36px;
        height: 36px;
        padding: 0;
        border-radius: 10px;
        font-size: 1.1rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Constrain name inputs to cell width */
    .inline-edit.ge-first,
    .inline-edit.ge-last {
        width: 100%;
        padding: 0.2rem 0.2rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .gender-tag-select {
        width: 24px;
        height: 24px;
        font-size: 0.68rem;
    }

    /* Prevent iOS auto-zoom on input focus (requires font-size >= 16px) */
    input[type="text"],
    input[type="search"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px !important;
    }
    /* Keep inline table selects and filter selects at intended font size */
    .status-select,
    .inline-select {
        font-size: 0.82rem !important;
    }
    .filter-select,
    .sort-select {
        font-size: 0.78rem !important;
    }
    .gender-tag-select {
        font-size: 0.68rem !important;
    }
}

/* Larger screens: center the detail card */
@media (min-width: 601px) {
    .detail-overlay {
        align-items: center;
    }

    .detail-card {
        border-radius: 14px;
        box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    }
}
