/* ========================================
   WAITLIST MODAL STYLES
   Reset Metabólico - Lista de Espera
   ======================================== */

/* Modal Overlay - Backdrop com glassmorphism */
#waitlist-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10001;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
    overflow-y: auto;
    padding: 20px;
}

/* Quando o modal está aberto */
#waitlist-modal-overlay.active {
    display: flex;
}

/* Modal Content Container */
#waitlist-modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0px 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease-out;
    position: relative;
}

/* Modal Header */
.waitlist-modal-header {
    padding: 30px 40px 20px;

     border-bottom: 1px solid #eee; 
    position: relative;
}

.waitlist-modal-header h2 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
}

.waitlist-modal-header p {
    margin: 0;
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

/* Close Button */
.waitlist-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
}

.waitlist-modal-close:hover {
    background: #f5f5f5;
    color: #333;
    transform: rotate(90deg);
}

/* Modal Body */
.waitlist-modal-body {
    padding: 30px 40px;
}

/* Form Container quando usar iframe */
.waitlist-form-container {
    width: 100%;
    min-height: 500px;
}

.waitlist-form-container iframe {
    width: 100%;
    border: none;
    min-height: 500px;
}

/* Success Message (hidden by default) */
.waitlist-success-message {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.waitlist-success-message.show {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

.waitlist-success-icon {
    font-size: 4rem;
    color: #4CAF50;
    margin-bottom: 20px;
}

.waitlist-success-message h3 {
    color: #333;
    font-size: 2.2rem;
    margin: 0 0 15px 0;
    font-weight: 700;
}

.waitlist-success-message p {
    color: #666;
    font-size: 1.25rem;
    margin: 0;
    line-height: 1.6;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet */
@media screen and (max-width: 1023px) {
    #waitlist-modal-content {
        max-width: 500px;
    }

    .waitlist-modal-header {
        padding: 25px 30px 15px;
    }

    .waitlist-modal-header h2 {
        font-size: 1.6rem;
    }

    .waitlist-modal-body {
        padding: 25px 30px;
    }
}

/* Mobile */
@media screen and (max-width: 767px) {
    #waitlist-modal-overlay {
        padding: 10px;
    }

    #waitlist-modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 95vh;
        border-radius: 8px;
    }

    .waitlist-modal-header {
        padding: 20px 20px 15px;
    }

    .waitlist-modal-header h2 {
        font-size: 1.4rem;
        padding-right: 30px; /* Space for close button */
    }

    .waitlist-modal-header p {
        font-size: 0.9rem;
    }

    .waitlist-modal-close {
        top: 15px;
        right: 15px;
        font-size: 1.5rem;
        width: 35px;
        height: 35px;
    }

    .waitlist-modal-body {
        padding: 20px;
    }

    .waitlist-form-container {
        min-height: 450px;
    }

    .waitlist-form-container iframe {
        min-height: 450px;
    }

    .waitlist-success-message {
        padding: 30px 15px;
    }

    .waitlist-success-icon {
        font-size: 3.5rem;
    }

    .waitlist-success-message h3 {
        font-size: 1.8rem;
    }

    .waitlist-success-message p {
        font-size: 1.1rem;
    }
}

/* Small Mobile */
@media screen and (max-width: 360px) {
    .waitlist-modal-header {
        padding: 15px;
    }

    .waitlist-modal-header h2 {
        font-size: 1.2rem;
    }

    .waitlist-modal-body {
        padding: 15px;
    }

    .waitlist-form-container {
        min-height: 400px;
    }

    .waitlist-form-container iframe {
        min-height: 400px;
    }
}

/* ========================================
   CUSTOM FORM STYLES
   ======================================== */

/* Form Container */
.waitlist-custom-form {
    width: 100%;
}

/* Form Groups */
.waitlist-custom-form .form-group {
    margin-bottom: 20px;
    position: relative;
}

/* Labels */
.waitlist-custom-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    font-family: 'Montserrat', sans-serif;
}

/* Inputs */
.waitlist-custom-form input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px; /* 16px previne zoom automático no iOS */
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.waitlist-custom-form input:focus {
    outline: none;
    border-color: #FF8A00;
    box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.1);
}

.waitlist-custom-form input::placeholder {
    color: #999;
}

.waitlist-custom-form input.error {
    border-color: #f44336;
}

/* Field Error Messages */
.field-error {
    display: block;
    color: #f44336;
    font-size: 0.85rem;
    margin-top: 5px;
    font-family: 'Montserrat', sans-serif;
}

/* Submit Button */
.waitlist-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #FF8A00 0%, #FF6B00 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0px 4px 15px rgba(255, 138, 0, 0.4);
    margin-top: 10px;
}

.waitlist-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0px 6px 20px rgba(255, 138, 0, 0.6);
}

.waitlist-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.waitlist-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading Spinner */
.waitlist-loading {
    text-align: center;
    padding: 80px 20px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.waitlist-loading .spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #FF8A00;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.waitlist-loading p {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message */
.waitlist-error-message {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.waitlist-error-message.show {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

.waitlist-error-icon {
    font-size: 4rem;
    color: #f44336;
    margin-bottom: 20px;
}

.waitlist-error-message h3 {
    color: #333;
    font-size: 1.5rem;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.waitlist-error-message p {
    color: #666;
    font-size: 1rem;
    margin: 0 0 20px 0;
}

.waitlist-retry-btn {
    background: #FF8A00;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0px 4px 15px rgba(255, 138, 0, 0.3);
}

.waitlist-retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0px 6px 20px rgba(255, 138, 0, 0.5);
}

/* ========================================
   PREVENT BODY SCROLL WHEN MODAL OPEN
   ======================================== */
body.waitlist-modal-open {
    overflow: hidden;
}
