/* Styles pour le plugin Prise de Rendez-vous Pro */
.apb-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.apb-popup-overlay.show {
    display: flex;
    opacity: 1;
    justify-content: center;
    align-items: center;
}

.apb-popup {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.apb-popup-overlay.show .apb-popup {
    transform: scale(1);
}

.apb-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apb-popup-close:hover {
    color: #333;
}

.apb-popup h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
    text-align: center;
}

.apb-form-group {
    margin-bottom: 20px;
}

.apb-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.apb-form-group input,
.apb-form-group select,
.apb-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.apb-form-group input:focus,
.apb-form-group select:focus,
.apb-form-group textarea:focus {
    outline: none;
    border-color: #007cba;
}

.apb-form-group textarea {
    resize: vertical;
    height: 100px;
}

.apb-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.apb-time-slot {
    padding: 10px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    background: #f8f9fa;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 14px;
}

.apb-time-slot:hover {
    border-color: #007cba;
    background: #e3f2fd;
}

.apb-time-slot.selected {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.apb-time-slot.disabled {
    background: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
}

.apb-submit-btn {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.apb-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #005a87 0%, #007cba 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 124, 186, 0.3);
}

.apb-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.apb-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

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

.apb-success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

.apb-error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

.apb-booking-form {
    max-width: 500px;
}

/* Trigger button styles */
.apb-trigger-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 124, 186, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.apb-trigger-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.4);
}

/* Responsive design */
@media (max-width: 768px) {
    .apb-popup {
        margin: 20px;
        padding: 20px;
        width: calc(100% - 40px);
    }

    .apb-time-slots {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 8px;
    }

    .apb-trigger-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* Animation pour l'apparition du popup */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.apb-popup-overlay.show .apb-popup {
    animation: slideInUp 0.3s ease-out;
}

/* Styles pour les champs requis */
.apb-form-group.required label::after {
    content: " *";
    color: #e74c3c;
}

/* Styles pour les messages de validation */
.apb-field-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

/* Amélioration de l'accessibilité */
.apb-popup:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.apb-time-slot:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}