/**
 * Styles pour le wizard de réservation (Frontend)
 *
 * @package Charlotte_Appointments
 */

.ca-button {
    background: #4A5D42;
    color: white;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}


/* Bouton de réservation */
.ca-booking-button {
    background: #4A5D42;
    color: white;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.ca-booking-button:hover {
    box-shadow: 0 0 0 .2em rgba(74,93,66,0.5);
}

/* Modal */
.ca-booking-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.ca-booking-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.ca-booking-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    z-index: 1000000;
}

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

.ca-booking-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    line-height: 28px;
    text-align: center;
    border-radius: 4px;
    transition: all 0.2s;
    z-index: 10;
}

.ca-booking-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* Header */
.ca-booking-header {
    padding: 30px;
    border-bottom: 1px solid #e5e5e5;
}

.ca-booking-title {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #333;
}

.ca-booking-steps {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.ca-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.ca-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 16px;
    left: calc(50% + 30px);
    right: calc(-50% + 30px);
    height: 2px;
    background: #e5e5e5;
    z-index: -1;
}

.ca-step.active:not(:last-child)::after,
.ca-step.completed:not(:last-child)::after {
    background: #4A5D42;
}

.ca-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e5e5e5;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s;
}

.ca-step.active .ca-step-number {
    background: #4A5D42;
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.ca-step.completed .ca-step-number {
    background: #4A5D42;
    color: white;
}

.ca-step-label {
    font-size: 12px;
    color: #999;
    font-weight: 500;
}

.ca-step.active .ca-step-label {
    color: #333;
    font-weight: 600;
}

/* Body */
.ca-booking-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.ca-booking-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.ca-booking-step {
    display: none;
}

.ca-booking-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.ca-booking-step h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
    font-family: Manrope, sans-serif;
}

/* Services List */
.ca-services-list {
    display: grid;
    gap: 15px;
}

.ca-service-card {
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.ca-service-card:hover {
    border-color: #4A5D42;
    background: #f8fff9;
}

.ca-service-card.selected {
    border-color: #4A5D42;
    background: #f8fff9;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.ca-service-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.ca-service-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.ca-service-info {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #999;
}

.ca-service-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Modes List */
.ca-modes-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.ca-mode-card {
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.ca-mode-card:hover {
    border-color: #4A5D42;
    background: #f8fff9;
}

.ca-mode-card.selected {
    border-color: #4A5D42;
    background: #f8fff9;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.ca-mode-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.ca-mode-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Calendar & Timeslots */
.ca-datetime-picker {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.ca-calendar-container {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
}

.ca-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ca-calendar-prev,
.ca-calendar-next {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    color: #666;
}

.ca-calendar-prev:hover,
.ca-calendar-next:hover {
    color: #4A5D42;
}

.ca-calendar-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.ca-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.ca-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.ca-calendar-day.header {
    font-weight: 600;
    color: #999;
    cursor: default;
}

.ca-calendar-day.disabled {
    color: #ccc;
    cursor: not-allowed;
}

.ca-calendar-day:not(.header):not(.disabled):hover {
    background: #f5f5f5;
}

.ca-calendar-day.selected {
    background: #4A5D42;
    color: white;
}

.ca-calendar-day.today {
    border: 2px solid #4A5D42;
}

/* Timeslots */
.ca-timeslots-container {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
}

.ca-timeslots-container h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
    font-family: Manrope, sans-serif;
}

.ca-time-periods {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.ca-period-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e5e5e5;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.ca-period-btn:hover {
    border-color: #4A5D42;
    color: #4A5D42;
}

.ca-period-btn.active {
    background: #4A5D42;
    color: white;
    border-color: #4A5D42;
}

.ca-timeslots-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.ca-timeslot {
    padding: 10px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.ca-timeslot:hover {
    border-color: #4A5D42;
    background: #f8fff9;
}

.ca-timeslot.selected {
    background: #4A5D42;
    color: white;
    border-color: #4A5D42;
}

.ca-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

/* Form */
.ca-form-group {
    margin-bottom: 20px;
}

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

.ca-form-group input,
.ca-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}

.ca-form-group input:focus,
.ca-form-group textarea:focus {
    outline: none;
    border-color: #4A5D42;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Confirmation */
.ca-confirmation-message {
    text-align: center;
    padding: 40px 20px;
}

.ca-confirmation-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #4A5D42;
    color: white;
    font-size: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.ca-confirmation-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    text-align: left;
}

/* Footer */
.ca-booking-footer {
    padding: 20px 30px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.ca-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ca-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ca-btn-primary {
    background: #4A5D42;
    color: white;
}

.ca-btn-primary:not(:disabled):hover {
    box-shadow: 0 0 0 .2em rgba(74,93,66,0.5);
}

.ca-btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.ca-btn-secondary:hover {
    background: #e5e5e5;
}

.ca-loading {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .ca-booking-modal {
        padding: 5px;
        align-items: flex-start;
        overflow-y: auto;
    }
    
    .ca-booking-modal-content {
        width: 100%;
        max-width: 100%;
        max-height: none;
        min-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    .ca-booking-header {
        padding: 15px;
    }
    
    .ca-booking-title {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .ca-booking-steps {
        gap: 3px;
    }
    
    .ca-step-label {
        font-size: 9px;
        display: none; /* Masquer les labels sur très petit écran */
    }
    
    .ca-step-number {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
    
    .ca-booking-body {
        padding: 15px;
    }
    
    .ca-booking-close {
        top: 10px;
        right: 10px;
        font-size: 24px;
    }
    
    .ca-datetime-picker {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .ca-timeslots-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .ca-service-card,
    .ca-mode-card {
        padding: 15px;
    }
    
    .ca-booking-footer {
        padding: 15px;
        flex-direction: column-reverse;
    }
    
    .ca-btn {
        width: 100%;
    }
}

/* Très petit écran (smartphones en portrait) */
@media (max-width: 480px) {
    .ca-booking-modal-content {
        border-radius: 0;
    }
    
    .ca-booking-title {
        font-size: 16px;
    }
    
    .ca-step-label {
        display: none;
    }
    
    .ca-step-number {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .ca-timeslots-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .ca-calendar-grid {
        gap: 3px;
    }
    
    .ca-calendar-day {
        font-size: 12px;
    }
}
