/* Styles améliorés pour les réservations */
.booking-item-wrapper {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    margin-bottom: 15px;
    transition: all 0.3s ease;
    overflow: hidden;
    border-left: 4px solid #4e73df;
}

.booking-item-wrapper:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.18);
    transform: translateY(-3px);
}

.booking-content {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    padding: 12px 15px;
    border-bottom: 1px solid #eaeaea;
}

.booking-id-source {
    display: flex;
    align-items: center;
    gap: 12px;
}

.booking-id {
    font-weight: bold;
    font-size: 1.1em;
    color: #4e73df;
    padding: 2px 6px;
    background-color: rgba(78, 115, 223, 0.1);
    border-radius: 4px;
}

.booking-source {
    color: #555;
    font-weight: 500;
}

.booking-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.booking-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.booking-main-info {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.booking-locations {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pickup-location, .dropoff-location {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
}

.location-icon {
    color: #4e73df;
    margin-top: 4px;
}

.location-text {
    line-height: 1.4;
    color: #333;
}

.location-arrow {
    display: flex;
    justify-content: center;
    color: #aaa;
    padding: 2px 0;
}

.booking-client-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 10px;
    border-left: 1px dashed #e0e0e0;
}

.client-name, .cordic-account, .cordic-ride {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-size: 0.95em;
}

.booking-details-grid {
    display: flex;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.booking-dates-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.booking-date {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-icon {
    color: #6c757d;
    font-size: 0.9em;
    width: 16px;
    text-align: center;
}

.date-details {
    display: flex;
    flex-direction: column;
}

.date-label {
    font-size: 0.8em;
    color: #6c757d;
}

.date-value {
    font-weight: 500;
    color: #333;
}

.booking-attributes {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

.booking-attribute {
    background-color: #f8f9fa;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.vehicle-size {
    background-color: #e3f2fd;
    color: #0d6efd;
}

.payment-status {
    background-color: #d1e7dd;
    color: #0f5132;
}

.amount {
    background-color: #fff3cd;
    color: #664d03;
}

.operator {
    background-color: #f8d7da;
    color: #842029;
}

.booking-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #eaeaea;
}

.booking-actions .btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    transition: all 0.2s;
}

.booking-actions .btn:hover {
    transform: translateY(-2px);
}

.booking-actions .btn-info {
    background-color: #4e73df;
    border-color: #4e73df;
}

.booking-actions .btn-success {
    background-color: #1cc88a;
    border-color: #1cc88a;
}

/* Status styles */
.status-waiting {
    background-color: #f8f9fa;
    color: #6c757d;
}

.status-confirmed {
    background-color: #d4edda;
    color: #155724;
}

.status-on-way {
    background-color: #cce5ff;
    color: #004085;
}

.status-in-progress {
    background-color: #fff3cd;
    color: #856404;
}

.status-completed {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-unknown {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* Variation des couleurs de bordure selon le statut */
.booking-item-wrapper {
    border-left-color: #4e73df;
}

.booking-item-wrapper .status-waiting ~ .booking-body {
    border-left-color: #6c757d;
}

.booking-item-wrapper .status-confirmed ~ .booking-body {
    border-left-color: #155724;
}

.booking-item-wrapper .status-on-way ~ .booking-body {
    border-left-color: #004085;
}

.booking-item-wrapper .status-in-progress ~ .booking-body {
    border-left-color: #856404;
}

.booking-item-wrapper .status-completed ~ .booking-body {
    border-left-color: #0f5132;
}

/* Styles améliorés pour les réservations - Mode liste */
.bookings-list-mode .booking-item-wrapper {
    border-radius: 6px;
    margin-bottom: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    border-left: 3px solid #4e73df;
}

.bookings-list-mode .booking-item-wrapper:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.bookings-list-mode .booking-content {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
}

.bookings-list-mode .booking-header {
    flex: 0 0 auto;
    width: 260px;
    border-bottom: 0;
    border-right: 1px solid #eaeaea;
    padding: 10px;
    height: 100%;
    background-color: rgba(248, 249, 250, 0.5);
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
}

.bookings-list-mode .booking-id-source {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.bookings-list-mode .booking-id {
    font-size: 0.95em;
}

.bookings-list-mode .booking-status {
    margin-top: 6px;
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
}

.bookings-list-mode .booking-body {
    flex: 1;
    flex-direction: row;
    padding: 10px 15px;
    gap: 10px;
    min-height: 70px;
}

.bookings-list-mode .booking-main-info {
    flex: 2;
    gap: 15px;
}

.bookings-list-mode .booking-locations {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.bookings-list-mode .pickup-location,
.bookings-list-mode .dropoff-location {
    padding: 0;
    flex: 1;
}

.bookings-list-mode .location-arrow {
    transform: rotate(-90deg);
    padding: 0;
}

.bookings-list-mode .location-arrow i {
    font-size: 0.8em;
}

.bookings-list-mode .booking-client-info {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 0;
    border-left: none;
    border-top: 1px dashed #e0e0e0;
    padding-top: 6px;
    margin-top: 6px;
}

.bookings-list-mode .client-name,
.bookings-list-mode .cordic-account,
.bookings-list-mode .cordic-ride {
    font-size: 0.85em;
}

.bookings-list-mode .booking-details-grid {
    flex: 1;
    flex-direction: column;
    padding-top: 0;
    border-top: none;
    border-left: 1px dashed #e0e0e0;
    padding-left: 15px;
    min-width: 200px;
}

.bookings-list-mode .booking-dates-section {
    flex-direction: row;
    gap: 15px;
    margin-bottom: 8px;
}

.bookings-list-mode .date-details {
    flex-direction: row;
    align-items: center;
    gap: 5px;
}

.bookings-list-mode .date-label {
    font-size: 0.75em;
}

.bookings-list-mode .date-value {
    font-size: 0.85em;
}

.bookings-list-mode .booking-attributes {
    justify-content: flex-start;
}

.bookings-list-mode .booking-actions {
    flex: 0 0 auto;
    padding: 10px;
    border-top: 0;
    border-left: 1px solid #eaeaea;
    flex-direction: column;
    background-color: rgba(248, 249, 250, 0.5);
    height: 100%;
}

.bookings-list-mode .booking-actions .btn {
    padding: 5px 10px;
    font-size: 0.85em;
    white-space: nowrap;
}

/* Ajout d'un bouton pour basculer entre les modes */
.view-mode-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.view-mode-toggle button {
    background: none;
    border: none;
    padding: 5px 8px;
    border-radius: 3px;
    cursor: pointer;
    color: #666;
}

.view-mode-toggle button.active {
    background-color: #4e73df;
    color: white;
}

/* Style pour les status dans le mode liste */
.bookings-list-mode .status-waiting {
    background-color: #f8f9fa;
    color: #6c757d;
    font-size: 0.8em;
}

.bookings-list-mode .status-confirmed {
    background-color: #d4edda;
    color: #155724;
    font-size: 0.8em;
}

.bookings-list-mode .status-on-way {
    background-color: #cce5ff;
    color: #004085;
    font-size: 0.8em;
}

.bookings-list-mode .status-in-progress {
    background-color: #fff3cd;
    color: #856404;
    font-size: 0.8em;
}

.bookings-list-mode .status-completed {
    background-color: #d1e7dd;
    color: #0f5132;
    font-size: 0.8em;
}

/* Modification pour les écrans étroits en mode liste */
@media (max-width: 992px) {
    .bookings-list-mode .booking-content {
        flex-direction: column;
    }
    
    .bookings-list-mode .booking-header {
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid #eaeaea;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .bookings-list-mode .booking-id-source {
        flex-direction: row;
        align-items: center;
    }
    
    .bookings-list-mode .booking-body {
        flex-direction: column;
    }
    
    .bookings-list-mode .booking-details-grid {
        border-left: 0;
        padding-left: 0;
        border-top: 1px dashed #e0e0e0;
        padding-top: 10px;
        margin-top: 10px;
    }
    
    .bookings-list-mode .booking-actions {
        width: 100%;
        flex-direction: row;
        border-left: 0;
        border-top: 1px solid #eaeaea;
    }
}

/* Styles pour le bouton bascule de vue */
.bookings-view-toggle {
    display: inline-flex;
    align-items: center;
    margin-bottom: 15px;
}

.bookings-view-toggle .toggle-btn {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 6px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.bookings-view-toggle .toggle-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.bookings-view-toggle .toggle-btn:last-child {
    border-radius: 0 4px 4px 0;
}

.bookings-view-toggle .toggle-btn.active {
    background-color: #4e73df;
    color: white;
    border-color: #4e73df;
}

.bookings-view-toggle .toggle-btn:hover:not(.active) {
    background-color: #e2e6ea;
}
