/* ============================================================================
 * Guest Mode Styles
 * ============================================================================
 * Styles for auth buttons (navbar), nudge popup, and claim modal.
 */

/* ─── Auth Buttons in Bible Reader Navbar ─── */
.guest-auth-buttons {
    position: absolute;
    top: 12px;
    right: 60px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 101;
    height: 48px;
}

.guest-auth-btn {
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.guest-auth-btn.login {
    background: transparent;
    color: #4a4458;
    border: 1.5px solid #d4d0e0;
}

.guest-auth-btn.login:hover {
    background: #f0ecf7;
    border-color: #b4afc5;
}

.guest-auth-btn.signup {
    background: #7c6bc4;
    color: #fff;
    border: 1.5px solid #7c6bc4;
    box-shadow: 0 1px 3px rgba(124, 107, 196, 0.25);
}

.guest-auth-btn.signup:hover {
    background: #6b5bb3;
    border-color: #6b5bb3;
}

/* Dark theme */
body.dark-theme .guest-auth-btn.login {
    color: #d4d0e0;
    border-color: #4a4458;
}

body.dark-theme .guest-auth-btn.login:hover {
    background: rgba(124, 107, 196, 0.15);
    border-color: #7c6bc4;
}

body.dark-theme .guest-auth-btn.signup {
    background: #7c6bc4;
    border-color: #7c6bc4;
}

body.dark-theme .guest-auth-btn.signup:hover {
    background: #8e7dd4;
    border-color: #8e7dd4;
}

/* Mobile: shrink text or hide labels */
@media (max-width: 768px) {
    .guest-auth-buttons {
        gap: 6px;
    }

    .guest-auth-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .guest-auth-btn {
        padding: 5px 10px;
        font-size: 11px;
        border-radius: 16px;
    }
}


/* ─── Nudge Popup ─── */
#guest-nudge-popup {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

#guest-nudge-popup.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.guest-nudge-content {
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 24px;
    max-width: 360px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    position: relative;
}

.guest-nudge-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-muted, #9ca3af);
    cursor: pointer;
    line-height: 1;
}

.guest-nudge-content h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--text-primary, #111827);
}

.guest-nudge-content p {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--text-muted, #6b7280);
    line-height: 1.5;
}

.guest-nudge-actions {
    display: flex;
    gap: 8px;
}

.guest-nudge-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: background 0.2s;
}

.guest-nudge-btn.primary {
    background: var(--primary-color, #4f46e5);
    color: #fff;
}

.guest-nudge-btn.primary:hover {
    background: #4338ca;
}

.guest-nudge-btn.secondary {
    background: var(--bg-secondary, #f3f4f6);
    color: var(--text-primary, #374151);
}

.guest-nudge-btn.secondary:hover {
    background: var(--border-color, #e5e7eb);
}

/* Dark theme */
body.dark-theme .guest-nudge-content {
    background: var(--bg-primary, #1f2937);
    border-color: var(--border-color, #374151);
}

/* Mobile: nudge fills bottom */
@media (max-width: 768px) {
    #guest-nudge-popup {
        bottom: 0;
        right: 0;
        left: 0;
    }

    .guest-nudge-content {
        max-width: 100%;
        border-radius: 12px 12px 0 0;
    }
}


/* ─── Claim Modal ─── */
#guest-claim-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#guest-claim-modal.visible {
    opacity: 1;
    pointer-events: auto;
}

.guest-claim-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.guest-claim-card {
    position: relative;
    max-width: 440px;
    width: 90%;
    background: var(--bg-primary, #ffffff);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(124, 107, 196, 0.08);
    overflow: hidden;
    transform: translateY(16px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#guest-claim-modal.visible .guest-claim-card {
    transform: translateY(0) scale(1);
}

.guest-claim-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted, #9ca3af);
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    z-index: 1;
    line-height: 0;
}

.guest-claim-close:hover {
    background: #f0ecf7;
    color: #4a4458;
}

.guest-claim-body {
    text-align: center;
    padding: 40px 32px 32px;
}

/* ─── Animated Tick ─── */
.guest-claim-icon {
    margin-bottom: 20px;
}

.guest-claim-tick .tick-circle {
    stroke-dasharray: 145;
    stroke-dashoffset: 145;
    animation: tickCircleDraw 0.6s 0.3s ease-out forwards;
}

.guest-claim-tick .tick-check {
    stroke-dasharray: 42;
    stroke-dashoffset: 42;
    animation: tickCheckDraw 0.35s 0.8s ease-out forwards;
}

@keyframes tickCircleDraw {
    to { stroke-dashoffset: 0; }
}

@keyframes tickCheckDraw {
    to { stroke-dashoffset: 0; }
}

.guest-claim-title {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary, #1a1a2e);
    letter-spacing: -0.01em;
}

.guest-claim-count {
    margin: 0 0 4px;
    font-size: 15px;
    color: var(--text-primary, #374151);
    line-height: 1.5;
}

.guest-claim-count strong {
    color: #7c6bc4;
}

.guest-claim-subtitle {
    margin: 0 0 28px;
    font-size: 14px;
    color: var(--text-muted, #8b8b9e);
    line-height: 1.5;
}

.guest-claim-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.guest-claim-btn {
    padding: 11px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

.guest-claim-btn:active {
    transform: scale(0.97);
}

.guest-claim-btn.primary {
    background: #7c6bc4;
    color: #fff;
    box-shadow: 0 2px 8px rgba(124, 107, 196, 0.3);
}

.guest-claim-btn.primary:hover {
    background: #6b5bb3;
    box-shadow: 0 4px 14px rgba(124, 107, 196, 0.4);
}

.guest-claim-btn.primary:disabled {
    opacity: 0.7;
    cursor: default;
}

.guest-claim-btn.secondary {
    background: var(--bg-secondary, #f5f3fa);
    color: var(--text-primary, #4a4458);
    border: 1px solid #e8e4f0;
}

.guest-claim-btn.secondary:hover {
    background: #ebe7f4;
    border-color: #d4d0e0;
}

/* Dark theme claim modal */
body.dark-theme .guest-claim-card,
[data-theme="dark"] .guest-claim-card {
    background: #1e1e2e;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(124, 107, 196, 0.15);
}

body.dark-theme .guest-claim-title,
[data-theme="dark"] .guest-claim-title {
    color: #e8e4f0;
}

body.dark-theme .guest-claim-count,
[data-theme="dark"] .guest-claim-count {
    color: #c4bdd4;
}

body.dark-theme .guest-claim-subtitle,
[data-theme="dark"] .guest-claim-subtitle {
    color: #8b8b9e;
}

body.dark-theme .guest-claim-close:hover,
[data-theme="dark"] .guest-claim-close:hover {
    background: rgba(124, 107, 196, 0.15);
    color: #d4d0e0;
}

body.dark-theme .guest-claim-btn.secondary,
[data-theme="dark"] .guest-claim-btn.secondary {
    background: #2a2a3e;
    color: #d4d0e0;
    border-color: #3d3a50;
}

body.dark-theme .guest-claim-btn.secondary:hover,
[data-theme="dark"] .guest-claim-btn.secondary:hover {
    background: #35354a;
    border-color: #4a4458;
}
