/* AgeSync — Overlay Styles
   Uses CSS variables set inline by PHP:
   --agesync-accent, --agesync-btn, --agesync-bg
*/

/* ── Overlay backdrop ── */
#agesync-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background-color: var(--agesync-bg, #22262A);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Card ── */
#agesync-card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    padding: 36px 32px 28px;
    width: 100%;
    max-width: 460px;
    animation: agesync-fadeup 0.3s ease both;
}

@keyframes agesync-fadeup {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Heading ── */
#agesync-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 10px;
    line-height: 1.3;
}

/* ── Description ── */
#agesync-desc {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.65;
    margin: 0 0 22px;
}

/* ── Checkbox rows ── */
.agesync-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.agesync-row:hover {
    border-color: var(--agesync-accent, #3FCB08);
    background-color: #f9fafb;
}

.agesync-row span {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.55;
}

/* Bold text inside checkbox labels gets accent color */
.agesync-row span strong {
    color: var(--agesync-accent, #3FCB08);
    font-weight: 700;
}

/* ── Custom checkbox input ── */
.agesync-cb {
    appearance: none;
    -webkit-appearance: none;
    width: 19px;
    height: 19px;
    min-width: 19px;
    margin-top: 1px;
    border: 2px solid #9ca3af;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.agesync-cb:checked {
    background-color: var(--agesync-accent, #3FCB08);
    border-color: var(--agesync-accent, #3FCB08);
}

.agesync-cb:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.agesync-cb:focus-visible {
    outline: 2px solid var(--agesync-accent, #3FCB08);
    outline-offset: 2px;
}

/* ── Enter button ── */
#agesync-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    margin-top: 18px;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: not-allowed;
    background-color: #d1d5db;
    color: #9ca3af;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

#agesync-btn.agesync-active {
    background-color: var(--agesync-btn, #3FCB08);
    color: #ffffff;
    cursor: pointer;
}

#agesync-btn.agesync-active:hover {
    filter: brightness(0.92);
}

#agesync-btn.agesync-active:active {
    transform: scale(0.98);
}

#agesync-btn svg {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

#agesync-btn.agesync-active:hover svg {
    transform: translateX(4px);
}

/* ── Leave link ── */
#agesync-leave {
    display: block;
    text-align: center;
    font-size: 0.8rem;
    color: #9ca3af;
    text-decoration: underline;
    margin-top: 12px;
    margin-bottom: 4px;
    transition: color 0.15s ease;
}

#agesync-leave:hover {
    color: #6b7280;
}

/* ── Disclaimer ── */
#agesync-disclaimer {
    font-size: 0.72rem;
    color: #9ca3af;
    line-height: 1.6;
    margin-top: 18px;
    margin-bottom: 0;
}

.agesync-disc-link {
    color: var(--agesync-accent, #3FCB08);
    text-decoration: underline;
}

.agesync-disc-link:hover {
    opacity: 0.8;
}

/* ── Mobile ── */
@media (max-width: 480px) {
    #agesync-card {
        padding: 28px 20px 24px;
    }
    #agesync-heading {
        font-size: 1.3rem;
    }
}
