/* ── Tablet Login – AHA Brand v1.4 ──────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800;900&family=Barlow+Condensed:wght@700;800&display=swap');

:root {
    --green:        #307439;
    --green-dark:   #245a2c;
    --green-light:  #eaf3eb;
    --orange:       #f16522;
    --orange-light: #fff3ee;
    --text:         #1c1c1c;
    --muted:        #6b7280;
    --border:       #e5e7eb;
    --radius:       13px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Outer wrapper: two-column, fills exactly 100vh ───────────────────────── */
#tl-login-wrap {
    display: grid;
    grid-template-columns: 44% 56%;
    height: 100vh;          /* exact viewport — no overflow */
    max-height: 100vh;
    width: 100%;
    font-family: 'Nunito', sans-serif;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;       /* prevent any child from causing scroll */
}

/* ══ LEFT — photo ══════════════════════════════════════════════════════════ */
#tl-left {
    position: relative;
    background-color: #2b5c34;
    background-size: cover;
    background-position: center top;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 36px 36px;
    overflow: hidden;
}

/* bottom scrim only */
#tl-left::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, transparent 52%, rgba(8,24,11,.72) 100%);
    pointer-events: none; z-index: 1;
}
#tl-left > * { position: relative; z-index: 2; }

/* "LET'S LEARN!" */
.tl-banner-text h1 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(34px, 3.8vw, 58px);
    font-weight: 800;
    color: #fff;
    letter-spacing: 1.5px;
    line-height: 1;
    margin-bottom: 16px;
    text-shadow: 0 2px 10px rgba(0,0,0,.4);
}

/* Footer — tight line-height, no extra spacing */
.tl-banner-footer {
    border-top: 1px solid rgba(255,255,255,.2);
    padding-top: 10px;
}
.tl-banner-footer p {
    font-size: 11.5px;
    color: rgba(255,255,255,.62);
    font-weight: 600;
    line-height: 1.55;   /* tight — no excess gap */
    margin: 0;
}

/* ══ RIGHT — white panel ═══════════════════════════════════════════════════ */
#tl-right {
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;   /* vertically center content */
    padding: 32px 52px;
    position: relative;
    height: 100vh;
    overflow: hidden;          /* no scroll needed */
}

/* ── Admin toggle ── */
.tl-admin-toggle {
    position: absolute;
    top: 20px; right: 22px;
    display: flex;
    align-items: center;
    gap: 7px;
    z-index: 10;
}
.tl-admin-toggle-label-text {
    font-size: 11px; font-weight: 700; color: #b0b7c3;
    letter-spacing: .5px; text-transform: uppercase;
    transition: color .2s;
}

/* iOS-style toggle */
.tl-toggle-label { cursor: pointer; display: flex; align-items: center; }
.tl-toggle-label input[type="checkbox"] { display: none; }
.tl-toggle-track {
    width: 40px; height: 22px;
    background: #d1d5db; border-radius: 11px;
    position: relative; transition: background .22s; display: block;
}
.tl-toggle-thumb {
    position: absolute; top: 3px; left: 3px;
    width: 16px; height: 16px;
    background: #fff; border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,.25);
    transition: transform .22s;
}
.tl-toggle-label input:checked ~ .tl-toggle-track { background: var(--orange); }
.tl-toggle-label input:checked ~ .tl-toggle-track .tl-toggle-thumb { transform: translateX(18px); }

/* ── Logo ── */
.tl-logo-wrap {
    display: flex; justify-content: center;
    width: 100%; margin-bottom: 24px;
}
.tl-logo-img {
    height: 68px; width: auto; max-width: 260px; object-fit: contain;
}

/* ── Step nav ── */
.tl-step-nav {
    display: flex; align-items: center; gap: 4px;
    padding: 4px 5px;
    background: #f3f4f6; border-radius: 50px;
    border: 1.5px solid var(--border);
    margin-bottom: 24px;
    width: 100%; max-width: 370px;
    justify-content: center;
}
.tl-nav-arrow { font-size: 14px; color: #d1d5db; flex-shrink: 0; padding: 0 1px; }
.tl-nav-pill {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 13px; border-radius: 50px;
    background: transparent; font-family: 'Nunito', sans-serif;
    font-size: 12px; font-weight: 800; color: #9ca3af;
    transition: all .2s; white-space: nowrap; user-select: none;
}
.tl-nav-pill.active { background: var(--green); color: #fff; box-shadow: 0 3px 10px rgba(48,116,57,.28); }
.tl-nav-pill.done   { color: var(--orange); }
.tl-nav-num {
    width: 18px; height: 18px; border-radius: 50%;
    font-size: 10px; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; background: rgba(255,255,255,.22);
}
.tl-nav-pill:not(.active) .tl-nav-num { background: #e5e7eb; color: #9ca3af; }
.tl-nav-pill.done .tl-nav-num { background: var(--orange-light); color: var(--orange); }

/* ── Steps & admin modal ── */
#tl-steps, #tl-admin-modal {
    width: 100%; max-width: 390px;
}
#tl-admin-modal { display: none; }

.tl-step { display: none; }
.tl-step.active { display: block; animation: tl-in .2s ease; }
@keyframes tl-in {
    from { opacity: 0; transform: translateX(10px); }
    to   { opacity: 1; transform: translateX(0); }
}

.tl-step-title {
    font-size: 18px; font-weight: 900; color: var(--text);
    margin-bottom: 16px; line-height: 1.25;
}

/* ── Option grid ── */
.tl-option-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px; margin-bottom: 10px;
}
.tl-option-btn {
    background: #fff; border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 12px 13px;
    cursor: pointer; display: flex; flex-direction: column;
    align-items: center; gap: 8px;
    font-family: 'Nunito', sans-serif;
    font-size: 13px; font-weight: 800; color: var(--text);
    text-align: center; line-height: 1.3;
    transition: all .16s; touch-action: manipulation;
    min-height: 82px; -webkit-tap-highlight-color: transparent;
}
.tl-option-btn:hover, .tl-option-btn:focus {
    border-color: var(--green); background: var(--green-light);
    color: var(--green-dark); transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(48,116,57,.13); outline: none;
}
.tl-option-btn:active { transform: scale(.97); }

.tl-opt-icon {
    width: 36px; height: 36px; background: var(--green-light);
    border-radius: 10px; display: flex; align-items: center;
    justify-content: center; color: var(--green);
    flex-shrink: 0; transition: background .16s;
}
.tl-opt-icon svg { width: 19px; height: 19px; }
.tl-option-btn:hover .tl-opt-icon { background: rgba(48,116,57,.16); }

/* ── Colour groups ── */
.tl-color-grid { grid-template-columns: repeat(3, 1fr); }
.tl-color-btn {
    border: 3px solid transparent; border-radius: 13px;
    padding: 16px 8px 12px; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    font-family: 'Nunito', sans-serif;
    font-size: 12px; font-weight: 900; color: #fff;
    touch-action: manipulation; min-height: 92px;
    transition: all .16s; text-shadow: 0 1px 4px rgba(0,0,0,.28);
    -webkit-tap-highlight-color: transparent;
}
.tl-color-btn:hover, .tl-color-btn:focus {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 8px 22px rgba(0,0,0,.2); outline: none;
}
.tl-color-btn:active { transform: scale(.97); }
.tl-swatch {
    width: 36px; height: 36px; border-radius: 50%;
    border: 3px solid rgba(255,255,255,.65);
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

/* ── Back button ── */
.tl-back-btn {
    display: inline-flex; align-items: center; gap: 5px;
    font-family: 'Nunito', sans-serif;
    font-size: 12px; font-weight: 800; color: #9ca3af;
    background: none; border: none; cursor: pointer;
    padding: 5px 9px; border-radius: 8px; margin-top: 6px;
    transition: all .15s; touch-action: manipulation; min-height: 38px;
}
.tl-back-btn:hover { color: var(--green); background: var(--green-light); }

/* ── Summary ── */
#tl-summary {
    background: #fff; border: 2px solid var(--border);
    border-radius: var(--radius); overflow: hidden; margin-bottom: 14px;
}
.s-row {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 15px; border-bottom: 1px solid #f3f4f6;
}
.s-row:last-child { border-bottom: none; }
.s-icon {
    width: 32px; height: 32px; border-radius: 9px;
    background: var(--green-light); color: var(--green);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.s-icon svg { width: 16px; height: 16px; }
.s-label { font-size: 9px; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: .5px; }
.s-val   { font-size: 14px; font-weight: 800; color: var(--text); margin-top: 1px; }
.color-circle {
    display: inline-block; width: 10px; height: 10px; border-radius: 50%;
    vertical-align: middle; margin-right: 5px;
    border: 1.5px solid rgba(255,255,255,.7); box-shadow: 0 0 0 1.5px rgba(0,0,0,.1);
}

/* ── Confirm button ── */
.tl-confirm-btn {
    width: 100%; background: var(--green); color: #fff; border: none;
    border-radius: var(--radius); padding: 15px 22px;
    font-family: 'Nunito', sans-serif;
    font-size: 15px; font-weight: 900; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: all .16s;
    box-shadow: 0 4px 14px rgba(48,116,57,.28);
    touch-action: manipulation; min-height: 50px; margin-bottom: 4px;
}
.tl-confirm-btn:hover { background: var(--green-dark); transform: translateY(-2px); box-shadow: 0 7px 20px rgba(48,116,57,.36); }
.tl-confirm-btn:active { transform: scale(.98); }
.tl-confirm-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ── Admin form ── */
.tl-field { margin-bottom: 13px; }
.tl-field label {
    display: block; font-size: 10px; font-weight: 800; color: var(--muted);
    text-transform: uppercase; letter-spacing: .5px; margin-bottom: 5px;
}
.tl-field input {
    width: 100%; border: 2px solid var(--border); border-radius: var(--radius);
    padding: 12px 14px; font-family: 'Nunito', sans-serif;
    font-size: 14px; font-weight: 700; color: var(--text);
    background: #fff; transition: border-color .16s, box-shadow .16s; min-height: 46px;
}
.tl-field input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(241,101,34,.10); }
#tl-admin-modal .tl-confirm-btn {
    background: var(--orange); box-shadow: 0 4px 14px rgba(241,101,34,.28); margin-top: 4px;
}
#tl-admin-modal .tl-confirm-btn:hover {
    background: #d4551a; box-shadow: 0 7px 20px rgba(241,101,34,.36);
}

/* ── Loading / empty / error ── */
.tl-loading {
    grid-column: 1/-1; color: #9ca3af; font-size: 13px; font-weight: 700;
    padding: 14px 0; display: flex; align-items: center; gap: 9px;
}
.tl-spinner {
    width: 16px; height: 16px; border: 3px solid #e5e7eb;
    border-top-color: var(--green); border-radius: 50%;
    display: inline-block; flex-shrink: 0;
    animation: tl-spin .7s linear infinite;
}
@keyframes tl-spin { to { transform: rotate(360deg); } }
.tl-empty { grid-column: 1/-1; color: #9ca3af; font-size: 13px; font-weight: 700; padding: 8px 0; }
.tl-error {
    margin-top: 10px; background: #fef2f2; border: 1.5px solid #fecaca;
    color: #dc2626; padding: 10px 13px; border-radius: 10px;
    font-size: 12px; font-weight: 700; line-height: 1.5;
}

/* ══ MOBILE ≤ 768px — photo hidden, white full-screen ═════════════════════ */
@media (max-width: 768px) {
    #tl-login-wrap {
        grid-template-columns: 1fr;
        height: 100vh; max-height: 100vh;
    }
    /* Hide left panel completely on small screens */
    #tl-left { display: none; }

    #tl-right {
        padding: 24px 22px 32px;
        justify-content: flex-start;
        padding-top: 48px;
        overflow-y: auto; height: auto; min-height: 100vh;
    }
    .tl-logo-img { height: 54px; }
    .tl-step-nav { max-width: 100%; }
    .tl-option-grid { gap: 9px; }
    .tl-color-grid { grid-template-columns: 1fr 1fr 1fr; }
    #tl-steps, #tl-admin-modal { max-width: 100%; }
    .tl-option-btn { min-height: 78px; }
    .tl-color-btn  { min-height: 88px; }
}
@media (max-width: 380px) {
    .tl-option-grid { grid-template-columns: 1fr; }
    .tl-color-grid  { grid-template-columns: 1fr 1fr; }
}

/* ══ THEME OVERRIDES — strip WP/LeanPress chrome ══════════════════════════ */
body:has(#tl-login-wrap) header,
body:has(#tl-login-wrap) footer,
body:has(#tl-login-wrap) .site-header,
body:has(#tl-login-wrap) .site-footer,
body:has(#tl-login-wrap) .lp-header,
body:has(#tl-login-wrap) .lp-footer,
body:has(#tl-login-wrap) #wpadminbar { display: none !important; }

body:has(#tl-login-wrap),
html:has(#tl-login-wrap) { overflow: hidden !important; }

body:has(#tl-login-wrap) #page,
body:has(#tl-login-wrap) main,
body:has(#tl-login-wrap) #main,
body:has(#tl-login-wrap) #content,
body:has(#tl-login-wrap) .site-content,
body:has(#tl-login-wrap) .entry-content,
body:has(#tl-login-wrap) .post-content,
body:has(#tl-login-wrap) .wp-block-post-content,
body:has(#tl-login-wrap) .container,
body:has(#tl-login-wrap) .lp-content-area {
    margin: 0 !important; padding: 0 !important;
    max-width: none !important; width: 100% !important;
    height: 100vh !important; overflow: hidden !important;
}

#tl-login-wrap {
    position: fixed !important;
    top: 0; left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
}
