/* Iframe Modal Styles */

/* Garantir z-index máximo */
#iframe-modal {
    z-index: 10000 !important;
}

/* Animações do iframe modal */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

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

.animate-fadeIn {
    animation: fadeIn 0.3s ease-out forwards;
}

.animate-fadeOut {
    animation: fadeOut 0.3s ease-out forwards;
}

.animate-slideUp {
    animation: slideUp 0.4s ease-out forwards;
}

/* Loading spinner */
#iframe-loading {
    transition: opacity 0.3s ease-out;
}

/* Iframe responsivo */
#content-iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Botões de navegação do iframe */
#iframe-modal button {
    cursor: pointer;
    transition: all 0.2s ease;
}

#iframe-modal button:active {
    transform: scale(0.95);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    #iframe-modal .md\\:rounded-2xl {
        border-radius: 0 !important;
    }
    
    #iframe-modal .md\\:h-\\[95vh\\] {
        height: 100vh !important;
    }
}

/* Prevenir scroll no body quando modal está aberto */
body.iframe-modal-open {
    overflow: hidden;
}

/* Auth Modal Compacto */
#auth-modal {
    animation: fadeIn 0.3s ease-out;
}

#auth-modal > div > div {
    animation: slideUp 0.4s ease-out;
}

/* Loading spinner para auth modal */
.spinner {
    border: 3px solid rgba(0, 102, 204, 0.1);
    border-top-color: #0066CC;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Auth iframe responsivo - Mais compacto */
#auth-iframe {
    min-height: 500px;
}

/* Mobile - Auth Modal Fullscreen */
@media (max-width: 640px) {
    #auth-modal .max-w-md {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    #auth-modal .rounded-xl {
        border-radius: 0;
    }
    
    #auth-modal .rounded-t-xl {
        border-radius: 0;
    }
    
    #auth-iframe {
        min-height: calc(100vh - 50px);
    }
}

/* Program Modal Compacto */
#program-modal {
    animation: fadeIn 0.3s ease-out;
}

#program-modal > div > div {
    animation: slideUp 0.4s ease-out;
}

/* Program iframe responsivo - Médio (640px) */
#program-iframe {
    min-height: 600px;
}

/* Mobile - Program Modal Fullscreen */
@media (max-width: 768px) {
    #program-modal .max-w-2xl {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    #program-modal .rounded-xl {
        border-radius: 0;
    }
    
    #program-modal .rounded-t-xl {
        border-radius: 0;
    }
    
    #program-iframe {
        min-height: calc(100vh - 50px);
    }
}

/* Specialty Modal Compacto */
#specialty-modal {
    animation: fadeIn 0.3s ease-out;
}

#specialty-modal > div > div {
    animation: slideUp 0.4s ease-out;
}

/* Specialty iframe responsivo - Médio (640px) */
#specialty-iframe {
    min-height: 600px;
}

/* Mobile - Specialty Modal Fullscreen */
@media (max-width: 768px) {
    #specialty-modal .max-w-2xl {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    #specialty-modal .rounded-xl {
        border-radius: 0;
    }
    
    #specialty-modal .rounded-t-xl {
        border-radius: 0;
    }
    
    #specialty-iframe {
        min-height: calc(100vh - 50px);
    }
}

/* Checkout Modal Médio */
#checkout-modal {
    animation: fadeIn 0.3s ease-out;
}

#checkout-modal > div > div {
    animation: slideUp 0.4s ease-out;
}

/* Checkout iframe responsivo - Médio (640px) */
#checkout-iframe {
    min-height: 600px;
}

/* Mobile - Checkout Modal Fullscreen */
@media (max-width: 768px) {
    #checkout-modal .max-w-2xl {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    #checkout-modal .rounded-xl {
        border-radius: 0;
    }
    
    #checkout-modal .rounded-t-xl {
        border-radius: 0;
    }
    
    #checkout-iframe {
        min-height: calc(100vh - 50px);
    }
}
