@import url('https://fonts.googleapis.com/css2?family=Montserrat+Alternates:wght@400;500;600;700&display=swap');

/* ========== OVERLAY ========== */
.spl-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99998;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.spl-overlay.is-active {
    display: flex;
    opacity: 1;
}

/* ========== MODAL ========== */
.spl-modal {
    position: relative;
    width: 100%;
    max-width: 500px;
    background: #ffffff;
    border-radius: 16px;
    padding: 48px;
    box-sizing: border-box;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.spl-overlay.is-active .spl-modal {
    transform: scale(1);
    opacity: 1;
}

.spl-modal::-webkit-scrollbar {
    width: 8px;
}

.spl-modal::-webkit-scrollbar-track {
    background: #F4EDE7;
    border-radius: 4px;
}

.spl-modal::-webkit-scrollbar-thumb {
    background: #D4AE89;
    border-radius: 4px;
}

/* ========== CLOSE BUTTON (admin only) ========== */
.spl-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 41px;
    height: 41px;
    border-radius: 66px !important;
    border: 1px solid #D4AE89 !important;
    background: transparent !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    padding: 0;
}

.spl-close:hover,
.spl-close:focus,
.spl-close:active {
    opacity: 0.7;
    background: transparent !important;
    border-color: #D4AE89 !important;
    outline: none !important;
    box-shadow: none !important;
}

/* ========== HEADER ========== */
.spl-header {
    margin-bottom: 32px;
    text-align: center;
}

.spl-text {
    color: #B58455;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 26px;
    margin: 0 0 4px 0;
}

.spl-text-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
}

.spl-text-highlight {
    margin-top: 8px;
}

.spl-divider {
    width: 60px;
    height: 1px;
    background: #D4AE89;
    margin: 24px auto;
    opacity: 0.5;
}

.spl-text-cta {
    margin-bottom: 2px;
}

/* ========== FORM ========== */
.spl-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.spl-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spl-field label {
    color: #B58455;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    text-align: center;
}

.spl-field input[type="email"] {
    height: 48px;
    padding: 0 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: #F4EDE7;
    color: #B58455;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 20px;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.spl-field input::placeholder {
    color: #B58455;
    opacity: 0.5;
}

.spl-field input:focus {
    border-color: #D4AE89;
}

/* ========== SUBMIT BUTTON ========== */
.spl-submit {
    padding: 14px 32px !important;
    min-width: 200px;
    border-radius: 66px !important;
    border: none !important;
    background: #D4AE89 !important;
    color: #ffffff !important;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    align-self: center;
}

.spl-submit:hover,
.spl-submit:focus,
.spl-submit:active {
    opacity: 0.9;
    background: #D4AE89 !important;
    color: #ffffff !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.spl-submit:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed;
    background: #D4AE89 !important;
}

.spl-submit-loading,
.spl-submit-sent {
    display: none;
}

.spl-submit:disabled .spl-submit-text {
    display: none;
}

.spl-submit:disabled .spl-submit-loading {
    display: inline;
}

.spl-submit.is-sent .spl-submit-text,
.spl-submit.is-sent .spl-submit-loading {
    display: none;
}

.spl-submit.is-sent .spl-submit-sent {
    display: inline;
}

/* ========== MESSAGE ========== */
.spl-message {
    display: none;
    padding: 16px;
    border-radius: 8px;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    text-align: center;
}

.spl-message.is-visible {
    display: block;
}

.spl-message.success {
    background: #d4edda;
    color: #155724;
}

.spl-message.error {
    background: #f8d7da;
    color: #721c24;
}

/* ========== MOBILE ========== */
@media (max-width: 767px) {
    .spl-modal {
        padding: 32px 24px;
        max-height: 95vh;
    }

    .spl-text {
        font-size: 14px;
        line-height: 22px;
    }

    .spl-text-title {
        font-size: 16px;
    }


    .spl-field input[type="email"] {
        height: 44px;
    }

    .spl-submit {
        width: 100%;
    }
}
