/**
 * Guest Manager Modal Styles
 * Supports multiple themes via data-theme attribute
 *
 * Themes:
 * - breaking-point: Dark background with yellow/gold CTAs
 * - meme-match: Dark background with pink/purple gradient CTAs
 */

/* ==================== Base Overlay Styles ==================== */

.guest-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.guest-modal-overlay.active {
    opacity: 1;
}

.guest-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

/* ==================== Modal Base Styles ==================== */

.guest-modal {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 32px 24px;
    max-width: 340px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.guest-modal-emoji {
    font-size: 48px;
    margin-bottom: 16px;
}

.guest-modal-title {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.guest-modal-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin: 0 0 24px 0;
    line-height: 1.4;
}

/* ==================== Phone Input Section ==================== */

.guest-modal-phone-section {
    width: 100%;
    margin-bottom: 16px;
}

.guest-modal-phone-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.guest-modal-country-select {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    padding: 14px 12px 14px 14px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    min-width: 90px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

.guest-modal-country-select:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.guest-modal-country-select option {
    background: #1a1a2e;
    color: #fff;
}

.guest-modal-phone-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px 16px;
    color: #fff;
    font-size: 15px;
    outline: none;
    min-width: 0;
}

.guest-modal-phone-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* ==================== OTP Section ==================== */

.guest-modal-otp-section {
    width: 100%;
    margin-bottom: 16px;
}

.guest-modal-otp-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin: 0 0 16px 0;
    text-align: center;
}

.guest-modal-otp-inputs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.guest-modal-otp-digit {
    width: 42px;
    height: 50px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* ==================== Divider ==================== */

.guest-modal-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    width: 100%;
}

.guest-modal-divider::before,
.guest-modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.guest-modal-divider span {
    padding: 0 16px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    text-transform: uppercase;
}

/* ==================== Google Button ==================== */

.guest-modal-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s;
}

.guest-modal-google-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

/* ==================== Error Message ==================== */

.guest-modal-error {
    color: #ff6b6b;
    font-size: 13px;
    margin-top: 8px;
    text-align: center;
}

/* ==================== Resend Link ==================== */

.guest-modal-resend-link {
    display: block;
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    text-decoration: none;
    text-align: center;
}

.guest-modal-dismiss-btn {
    display: inline-block;
    margin-top: 16px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.48);
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.guest-modal-dismiss-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* ==================== Block Overlay ==================== */

.guest-block-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guest-block-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
}

.guest-block-modal {
    position: relative;
    background: linear-gradient(135deg, #2d1f3d 0%, #1a1a2e 100%);
    border-radius: 20px;
    padding: 32px 24px;
    max-width: 340px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.guest-block-emoji {
    font-size: 48px;
    margin-bottom: 16px;
}

.guest-block-title {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.guest-block-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin: 0 0 24px 0;
    line-height: 1.4;
}

.guest-block-phone-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    background: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.guest-block-phone-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
}

.guest-block-google-link {
    display: block;
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    text-decoration: none;
}

.guest-block-google-link:hover {
    color: rgba(255, 255, 255, 0.9);
}

.guest-block-home-link {
    display: block;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    text-decoration: none;
}

.guest-block-home-link:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* ==================== MEME MATCH THEME ==================== */

.guest-modal[data-theme="meme-match"] {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.guest-modal[data-theme="meme-match"] .guest-modal-send-code-btn,
.guest-modal[data-theme="meme-match"] .guest-modal-verify-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.guest-modal[data-theme="meme-match"] .guest-modal-send-code-btn:hover:not(:disabled),
.guest-modal[data-theme="meme-match"] .guest-modal-verify-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(236, 72, 153, 0.4);
}

.guest-modal[data-theme="meme-match"] .guest-modal-send-code-btn:disabled,
.guest-modal[data-theme="meme-match"] .guest-modal-verify-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.guest-modal[data-theme="meme-match"] .guest-modal-otp-digit:focus {
    border-color: #ec4899;
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.15);
}

.guest-modal[data-theme="meme-match"] .guest-modal-resend-link:hover {
    color: #ec4899;
}

/* ==================== BREAKING POINT THEME ==================== */

.guest-modal[data-theme="breaking-point"] {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid rgba(244, 196, 48, 0.4);
    box-shadow:
        0 0 0 1px rgba(244, 196, 48, 0.2),
        0 0 40px rgba(244, 196, 48, 0.15),
        0 20px 60px rgba(0, 0, 0, 0.5);
}

.guest-modal[data-theme="breaking-point"] .guest-modal-title {
    text-shadow: 0 0 20px rgba(244, 196, 48, 0.3);
}

.guest-modal[data-theme="breaking-point"] .guest-modal-phone-input-wrapper {
    border-color: rgba(244, 196, 48, 0.3);
}

.guest-modal[data-theme="breaking-point"] .guest-modal-send-code-btn,
.guest-modal[data-theme="breaking-point"] .guest-modal-verify-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #f4c430 0%, #e6a800 100%);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    transition: all 0.2s;
}

.guest-modal[data-theme="breaking-point"] .guest-modal-send-code-btn:hover:not(:disabled),
.guest-modal[data-theme="breaking-point"] .guest-modal-verify-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(244, 196, 48, 0.4);
}

.guest-modal[data-theme="breaking-point"] .guest-modal-send-code-btn:disabled,
.guest-modal[data-theme="breaking-point"] .guest-modal-verify-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.guest-modal[data-theme="breaking-point"] .guest-modal-otp-digit {
    border-color: rgba(244, 196, 48, 0.3);
}

.guest-modal[data-theme="breaking-point"] .guest-modal-otp-digit:focus {
    border-color: #f4c430;
    box-shadow: 0 0 0 2px rgba(244, 196, 48, 0.15);
}

.guest-modal[data-theme="breaking-point"] .guest-modal-resend-link:hover {
    color: #f4c430;
}

/* Block modal theme for Breaking Point */
.guest-block-modal[data-theme="breaking-point"] {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid rgba(244, 196, 48, 0.4);
}

.guest-block-modal[data-theme="breaking-point"] .guest-block-phone-btn {
    background: linear-gradient(135deg, #f4c430 0%, #e6a800 100%);
    color: #000;
}

.guest-block-modal[data-theme="breaking-point"] .guest-block-phone-btn:hover {
    box-shadow: 0 8px 20px rgba(244, 196, 48, 0.3);
}

.guest-block-modal[data-theme="breaking-point"] .guest-block-google-link:hover {
    color: #f4c430;
}

/* ==================== TOMOSHIBI THEME ==================== */

.guest-modal[data-theme="tomoshibi"] {
    background: linear-gradient(135deg, #1a1612 0%, #2a2420 100%);
    border: 1px solid rgba(212, 165, 116, 0.3);
    box-shadow:
        0 0 0 1px rgba(212, 165, 116, 0.1),
        0 0 30px rgba(212, 165, 116, 0.08),
        0 20px 60px rgba(0, 0, 0, 0.5);
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
}

.guest-modal[data-theme="tomoshibi"] .guest-modal-title {
    color: #e8dcc8;
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
}

.guest-modal[data-theme="tomoshibi"] .guest-modal-subtitle {
    color: #a89880;
}

.guest-modal[data-theme="tomoshibi"] .guest-modal-phone-input-wrapper {
    border-color: rgba(212, 165, 116, 0.25);
    background: rgba(212, 165, 116, 0.06);
}

.guest-modal[data-theme="tomoshibi"] .guest-modal-send-code-btn,
.guest-modal[data-theme="tomoshibi"] .guest-modal-verify-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #d4a574 0%, #c9956a 100%);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #1a1612;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Crimson Text', serif;
}

.guest-modal[data-theme="tomoshibi"] .guest-modal-send-code-btn:hover:not(:disabled),
.guest-modal[data-theme="tomoshibi"] .guest-modal-verify-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.3);
}

.guest-modal[data-theme="tomoshibi"] .guest-modal-send-code-btn:disabled,
.guest-modal[data-theme="tomoshibi"] .guest-modal-verify-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.guest-modal[data-theme="tomoshibi"] .guest-modal-otp-digit {
    border-color: rgba(212, 165, 116, 0.25);
    background: rgba(212, 165, 116, 0.06);
}

.guest-modal[data-theme="tomoshibi"] .guest-modal-otp-digit:focus {
    border-color: #d4a574;
    box-shadow: 0 0 0 2px rgba(212, 165, 116, 0.15);
}

.guest-modal[data-theme="tomoshibi"] .guest-modal-resend-link:hover {
    color: #d4a574;
}

.guest-modal[data-theme="tomoshibi"] .guest-modal-country-select option {
    background: #1a1612;
}

/* Block modal theme for Tomoshibi */
.guest-block-modal[data-theme="tomoshibi"] {
    background: linear-gradient(135deg, #1a1612 0%, #2a2420 100%);
    border: 1px solid rgba(212, 165, 116, 0.3);
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
}

.guest-block-modal[data-theme="tomoshibi"] .guest-block-title {
    color: #e8dcc8;
}

.guest-block-modal[data-theme="tomoshibi"] .guest-block-subtitle {
    color: #a89880;
}

.guest-block-modal[data-theme="tomoshibi"] .guest-block-phone-btn {
    background: linear-gradient(135deg, #d4a574 0%, #c9956a 100%);
    color: #1a1612;
    font-family: 'Crimson Text', serif;
}

.guest-block-modal[data-theme="tomoshibi"] .guest-block-phone-btn:hover {
    box-shadow: 0 8px 20px rgba(212, 165, 116, 0.25);
}

.guest-block-modal[data-theme="tomoshibi"] .guest-block-google-link:hover {
    color: #d4a574;
}

.guest-block-modal[data-theme="tomoshibi"] .guest-block-home-link {
    color: #a89880;
}

.guest-block-modal[data-theme="tomoshibi"] .guest-block-home-link:hover {
    color: #e8dcc8;
}

/* ==================== RESPONSIVE STYLES ==================== */

@media (max-width: 480px) {
    .guest-modal,
    .guest-block-modal {
        padding: 28px 20px;
        max-width: 320px;
        width: 92%;
    }

    .guest-modal-emoji,
    .guest-block-emoji {
        font-size: 40px;
        margin-bottom: 12px;
    }

    .guest-modal-title,
    .guest-block-title {
        font-size: 20px;
    }

    .guest-modal-subtitle,
    .guest-block-subtitle {
        font-size: 13px;
    }

    .guest-modal-otp-digit {
        width: 38px;
        height: 46px;
        font-size: 18px;
    }
}

@media (max-width: 360px) {
    .guest-modal,
    .guest-block-modal {
        padding: 24px 16px;
        width: 94%;
    }

    .guest-modal-title,
    .guest-block-title {
        font-size: 18px;
    }

    .guest-modal-otp-digit {
        width: 34px;
        height: 42px;
        font-size: 16px;
    }
}
