/* Guest promotion modal - encourages account creation */
/* Reusable across the site, triggered by JavaScript */

/* Overlay - z-index must be higher than reading-progress-indicator (100) and nav elements */
.guest-promo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.guest-promo-overlay.visible {
    opacity: 1;
}

.guest-promo-overlay[hidden] {
    display: none;
}

/* Modal */
.guest-promo-modal {
    background-color: #ffffff;
    border-radius: 12px;
    max-width: 380px;
    width: 100%;
    padding: 1.75rem;
    position: relative;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.2s ease-out;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.guest-promo-overlay.visible .guest-promo-modal {
    transform: scale(1) translateY(0);
}

/* Close button */
.guest-promo-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0.25rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.15s, color 0.15s;
}

.guest-promo-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

/* Icon */
.guest-promo-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.guest-promo-icon svg {
    width: 48px;
    height: 48px;
    color: var(--accent-brown, #8b7355);
}

/* Title */
#guest-promo-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 1rem 0;
    text-align: center;
}

/* Intro text */
.guest-promo-intro {
    font-size: 0.95rem;
    color: #555;
    margin: 0 0 0.75rem 0;
}

/* Benefits list */
.guest-promo-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
}

.guest-promo-benefits li {
    font-size: 0.95rem;
    color: #333;
    padding: 0.35rem 0 0.35rem 1.5rem;
    position: relative;
}

.guest-promo-benefits li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-color: #e8f4fc;
    border-radius: 50%;
}

.guest-promo-benefits li::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 5px;
    height: 9px;
    border: solid #3498db;
    border-width: 0 2px 2px 0;
}

/* Privacy section */
.guest-promo-privacy {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
    margin: 0 0 1.5rem 0;
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.guest-promo-privacy strong {
    display: block;
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.guest-promo-privacy ul {
    margin: 0;
    padding-left: 1.25rem;
}

.guest-promo-privacy li {
    margin-bottom: 0.25rem;
}

.guest-promo-privacy li:last-child {
    margin-bottom: 0;
}

/* Action buttons */
.guest-promo-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.guest-promo-btn {
    display: block;
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, transform 0.1s;
    border: none;
}

.guest-promo-btn:active {
    transform: scale(0.98);
}

.guest-promo-btn.primary {
    background-color: #3498db;
    color: #fff;
}

.guest-promo-btn.primary:hover {
    background-color: #2980b9;
}

.guest-promo-btn.secondary {
    background-color: transparent;
    color: #666;
}

.guest-promo-btn.secondary:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* Desktop: side-by-side buttons */
@media (min-width: 400px) {
    .guest-promo-actions {
        flex-direction: row-reverse;
        gap: 0.75rem;
    }

    .guest-promo-btn {
        flex: 1;
    }

    .guest-promo-btn.secondary {
        flex: 0 0 auto;
        width: auto;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}
