/* @docs auth.css - styles for the persistent top-right "Sign in" button, login modal, account dropdown, database-table blur gate and the "Sign in to see all N deals" CTA card. Mounted by js/auth.js. */

/* ===== Top-right "Sign in" pill ===== */
.gi-auth-btn {
    position: fixed;
    top: 14px;
    right: 18px;
    z-index: 1200;
    padding: 0.4rem 0.95rem;
    background: var(--bg-warm-dark, #c4a572);
    color: #fff;
    border: 1px solid var(--bg-warm-dark, #c4a572);
    border-radius: 999px;
    font: 500 12.5px/1.2 inherit;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: background 0.15s, box-shadow 0.15s;
}
.gi-auth-btn:hover { background: #a38555; box-shadow: 0 3px 10px rgba(0,0,0,0.14); }
.gi-auth-btn.is-signed-in {
    background: #fff;
    color: var(--text-dark, #2a2724);
    border-color: var(--border-soft, #d8cfc4);
    font-weight: 500;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gi-auth-btn.is-signed-in:hover { background: #fbf6ef; }

/* Account dropdown menu */
.gi-auth-menu {
    position: fixed;
    z-index: 1300;
    min-width: 200px;
    background: #fff;
    border: 1px solid var(--border-soft, #d8cfc4);
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    overflow: hidden;
    font-size: 12.5px;
}
.gi-auth-menu-email {
    padding: 0.7rem 0.9rem 0.6rem;
    color: var(--text-dark-secondary, #555);
    border-bottom: 1px solid var(--border-soft, #d8cfc4);
    font-size: 11.5px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gi-auth-menu-item {
    display: block;
    width: 100%;
    padding: 0.6rem 0.9rem;
    background: #fff;
    border: 0;
    text-align: left;
    color: var(--text-dark, #2a2724);
    font: inherit;
    cursor: pointer;
}
.gi-auth-menu-item:hover { background: #fbf6ef; }

/* ===== Login modal ===== */
.gi-auth-modal {
    position: fixed; inset: 0; z-index: 1500;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.gi-auth-backdrop {
    position: absolute; inset: 0;
    background: rgba(20, 18, 16, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.gi-auth-card {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 420px;
    border-radius: 12px;
    padding: 28px 28px 22px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.22);
    font-size: 13.5px;
}
.gi-auth-close {
    position: absolute; top: 10px; right: 14px;
    background: transparent; border: 0;
    font-size: 22px; line-height: 1;
    color: var(--text-dark-tertiary, #888);
    cursor: pointer; padding: 4px 6px;
}
.gi-auth-close:hover { color: var(--text-dark, #2a2724); }
.gi-auth-card h2 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark, #2a2724);
}
.gi-auth-sub {
    margin: 0 0 18px;
    color: var(--text-dark-secondary, #555);
    line-height: 1.5;
    font-size: 12.5px;
}
.gi-auth-label {
    display: block;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-dark-secondary, #555);
    letter-spacing: 0.02em;
    margin-bottom: 14px;
}
.gi-auth-input {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 0.55rem 0.7rem;
    background: #fafaf8;
    border: 1px solid var(--border-soft, #d8cfc4);
    border-radius: 6px;
    font: 13.5px inherit;
    color: var(--text-dark, #2a2724);
    box-sizing: border-box;
}
.gi-auth-input:focus {
    outline: none;
    border-color: var(--bg-warm-dark, #c4a572);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(196,165,114,0.18);
}
.gi-auth-submit {
    display: block;
    width: 100%;
    padding: 0.65rem 1rem;
    background: var(--bg-warm-dark, #c4a572);
    color: #fff;
    border: 0;
    border-radius: 6px;
    font: 500 13.5px inherit;
    cursor: pointer;
    margin-bottom: 8px;
}
.gi-auth-submit:hover { background: #a38555; }
.gi-auth-submit:disabled { background: #c4b89e; cursor: not-allowed; }
.gi-auth-error {
    margin: 0.5rem 0 0;
    padding: 0;
    background: transparent;
    border: 0;
    color: #a8421f;
    font-size: 12px;
    text-align: left;
}
/* Tabs at the top of the modal: Sign in / Create account */
.gi-auth-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-soft, #d8cfc4);
    margin: -8px -28px 22px;
    padding: 0 28px;
}
.gi-auth-tab {
    background: transparent;
    border: 0;
    padding: 0.6rem 1rem 0.7rem;
    margin-bottom: -1px;
    font: 500 13px inherit;
    color: var(--text-dark-tertiary, #888);
    cursor: pointer;
    border-bottom: 2px solid transparent;
}
.gi-auth-tab.is-active {
    color: var(--text-dark, #2a2724);
    border-bottom-color: var(--bg-warm-dark, #c4a572);
}
.gi-auth-tab:hover:not(.is-active) { color: var(--text-dark, #2a2724); }
/* Footer links below the submit button (forgot password, switch tab) */
.gi-auth-foot {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}
.gi-auth-foot a {
    color: var(--text-dark-secondary, #555);
    text-decoration: none;
    cursor: pointer;
}
.gi-auth-foot a:hover { color: var(--bg-warm-dark, #c4a572); text-decoration: underline; }
.gi-auth-hint {
    margin-top: 12px;
    color: var(--text-dark-tertiary, #888);
    font-size: 11px;
    line-height: 1.5;
}
.gi-auth-step[data-step="sent"] {
    text-align: center;
    padding: 12px 0 8px;
}
.gi-auth-step[data-step="sent"] h2 { font-size: 17px; }

/* ===== Database table blur gate ===== */
tbody.gi-gated tr.gi-blurred {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
}
/* Slight masking gradient at the start of the blur band */
tbody.gi-gated tr.gi-blurred:first-of-type {
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(246,241,234,0.4) 100%);
}

.gi-gate-overlay {
    position: relative;
    margin-top: -160px;  /* card pulls up over the blurred rows */
    z-index: 5;
    pointer-events: none;
    display: flex;
    justify-content: center;
    padding: 0 24px;
}
.gi-gate-card {
    pointer-events: auto;
    background: #fff;
    border: 1px solid var(--border-soft, #d8cfc4);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.14);
    padding: 22px 28px;
    max-width: 460px;
    width: 100%;
    text-align: center;
    font-size: 13.5px;
}
.gi-gate-eyebrow {
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bg-warm-dark, #c4a572);
    font-weight: 600;
    margin-bottom: 6px;
}
.gi-gate-headline {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark, #2a2724);
    margin: 0 0 6px;
}
.gi-gate-sub {
    color: var(--text-dark-secondary, #555);
    line-height: 1.5;
    margin: 0 0 14px;
    font-size: 12.5px;
}
.gi-gate-cta {
    display: inline-block;
    padding: 0.55rem 1.25rem;
    background: var(--bg-warm-dark, #c4a572);
    color: #fff;
    border: 0;
    border-radius: 6px;
    font: 500 13.5px inherit;
    cursor: pointer;
}
.gi-gate-cta:hover { background: #a38555; }
.gi-gate-fineprint {
    margin-top: 10px;
    color: var(--text-dark-tertiary, #888);
    font-size: 11px;
}

/* Make sure the gated download triggers don't look broken before the
   modal opens - keep them styled normally but visually hint they are gated */
.gi-auth-locked .ch-dl-trigger::after {
    content: " 🔒";
    opacity: 0.5;
    font-size: 10px;
    margin-left: 2px;
}

/* ===== Chart gate per data-point =====
   30% of items (bars / scatter points / funnel groups / equity rows) stay
   clickable and fully visible; the other 70% get .gi-item-locked which fades
   them to near-zero opacity, blurs them, and disables pointer events so
   clicks don't reveal the underlying data. Applied by js/auth.js after each
   chart renders. Replaces the old mask-image approach which was purely
   visual (clicks still fired through the mask). */
.gi-item-locked {
    opacity: 0.12 !important;
    filter: blur(2px);
    pointer-events: none !important;
}
.gi-item-locked text { fill: rgba(0,0,0,0.18); }
.gi-chart-gate-overlay {
    position: absolute;
    /* Sits centred over the chart since data items past 30% are now hidden
       in-place rather than masked to one side. */
    top: 50%; right: 14%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 8;
}
.gi-chart-gate-card {
    pointer-events: auto;
    background: rgba(255,255,255,0.97);
    border: 1px solid var(--border-soft, #d8cfc4);
    border-radius: 10px;
    padding: 16px 22px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.10);
    max-width: 240px;
    font-size: 12px;
}
.gi-chart-gate-card .gi-chart-gate-headline {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-dark, #2a2724);
    margin-bottom: 4px;
    line-height: 1.35;
}
.gi-chart-gate-card .gi-chart-gate-sub {
    font-size: 11px;
    color: var(--text-dark-tertiary, #888);
    margin-bottom: 10px;
}
.gi-chart-gate-card button {
    padding: 0.4rem 1.1rem;
    background: var(--bg-warm-dark, #c4a572);
    color: #fff;
    border: 0;
    border-radius: 6px;
    font: 500 12px inherit;
    cursor: pointer;
}
.gi-chart-gate-card button:hover { background: #a38555; }

/* ===== Profile detail gate (player / procurer / bank / advisor) =====
   Header + About stay visible. Data sections below show their h2 and any
   description copy unblurred, but the actual data (tables, pills, lists) is
   blurred and a single sign-in card floats inside the first blurred section. */
.gi-profile-gated section.gi-profile-blurred > :not(h2):not(p):not(.gi-profile-gate-overlay) {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
}
.gi-profile-gate-overlay {
    position: absolute;
    top: 48px; /* clears the section h2 */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: calc(100% - 32px);
    max-width: 460px;
    pointer-events: none;
}
.gi-profile-gate-overlay > .gi-gate-card {
    pointer-events: auto;
    width: 100%;
    box-sizing: border-box;
}
