/**
 * Renov18 Calendly Integration Styles
 * Version: 1.0.0
 */

/* Container principal */
.renov18-calendly-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* État de chargement */
.renov18-calendly-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
}

.renov18-calendly-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #d69e2e;
    border-radius: 50%;
    animation: renov18-spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.renov18-calendly-loading p {
    color: #4a5568;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

/* Iframe Calendly */
.renov18-calendly-container iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    border-radius: 12px;
    transition: opacity 0.3s ease-in-out;
}

/* Message d'erreur */
.renov18-calendly-error {
    background: #fed7d7;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.renov18-calendly-error p {
    color: #c53030;
    margin: 0;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .renov18-calendly-container {
        margin: 15px 0;
        border-radius: 8px;
    }
    
    .renov18-calendly-loading {
        padding: 40px 15px;
    }
    
    .renov18-calendly-loading p {
        font-size: 14px;
    }
    
    .renov18-calendly-spinner {
        width: 30px;
        height: 30px;
        border-width: 3px;
    }
}

@media (max-width: 480px) {
    .renov18-calendly-container {
        margin: 10px 0;
    }
    
    .renov18-calendly-loading {
        padding: 30px 10px;
    }
}

/* Styles pour l'admin */
.renov18-calendly-container .card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

/* Animation d'apparition */
.renov18-calendly-container iframe.loaded {
    opacity: 1;
    animation: renov18-fadeIn 0.5s ease-in-out;
}

@keyframes renov18-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Styles personnalisés pour l'intégration */
.renov18-calendly-container .calendly-inline-widget {
    border-radius: 12px !important;
    overflow: hidden !important;
}

/* Amélioration de l'accessibilité */
.renov18-calendly-container:focus-within {
    outline: 2px solid #d69e2e;
    outline-offset: 2px;
}

/* Styles pour les thèmes sombres */
@media (prefers-color-scheme: dark) {
    .renov18-calendly-container {
        background: #1a202c;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    
    .renov18-calendly-loading {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    }
    
    .renov18-calendly-loading p {
        color: #e2e8f0;
    }
}
