/* Modal Account Styles */
.account-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999 !important;
    align-items: center;
    justify-content: center;
}

.account-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999998;
}

.account-modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    max-width: 1400px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1000000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.account-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    z-index: 3;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.account-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.account-modal-content {
    padding: 20px;
}

/* User dropdown menu styles */
.user-dropdown-container {
    position: relative;
    display: inline-block;
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    margin-top: 10px;
    z-index: 9999;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.user-dropdown-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.user-dropdown-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    font-size: 40px;
    color: #2c3e50;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.user-email {
    font-size: 14px;
    color: #666;
}

.user-dropdown-separator {
    height: 1px;
    background: #eee;
    margin: 0;
}

.user-dropdown-items {
    padding: 8px 0;
}

.user-dropdown-items .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #2c3e50;
    text-decoration: none;
    transition: background 0.2s ease;
}

.user-dropdown-items .dropdown-item:hover {
    background: #f8f9fa;
}

.user-dropdown-items .dropdown-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.user-dropdown-items .logout-item {
    color: #dc3545;
}

.user-dropdown-items .logout-item:hover {
    background: #fff5f5;
}

/* Order items styles */
.order-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    background: white;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.order-info h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #2c3e50;
}

.order-date {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.order-pickup-info {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
    color: #495057;
}

.order-status {
    text-align: right;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.status-badge.status-orange {
    background: #fff3cd;
    color: #856404;
}

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

.status-badge.status-blue {
    background: #cfe2ff;
    color: #084298;
}

.status-badge.status-purple {
    background: #e0cffc;
    color: #6f42c1;
}

.status-badge.status-red {
    background: #f8d7da;
    color: #842029;
}

.order-total {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
}

.order-items {
    margin-bottom: 15px;
}

.order-item-detail {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
    font-size: 14px;
}

.order-item-detail:last-child {
    border-bottom: none;
}

.order-actions-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.order-actions-wrapper .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.order-actions-wrapper .btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* Responsive pour les petits écrans */
@media (max-width: 768px) {
    .order-actions-wrapper {
        flex-direction: column;
    }
    
    .order-actions-wrapper .btn {
        width: 100%;
    }
    
    .account-modal-container {
        max-width: 100%;
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .order-history {
        padding: 15px;
    }
    
    .table-responsive {
        margin: 20px 0;
        box-shadow: none;
        border: 1px solid #e0e0e0;
    }
    
    .table th,
    .table td {
        padding: 12px 10px;
        font-size: 13px;
    }
    
    .table th:first-child,
    .table td:first-child {
        padding-left: 12px;
    }
    
    .table th:last-child,
    .table td:last-child {
        padding-right: 12px;
    }
}

@media (max-width: 576px) {
    .table th,
    .table td {
        padding: 10px 8px;
        font-size: 12px;
    }
    
    .btn-group-sm .btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* Tableau des réservations */
.order-history {
    padding: 30px;
    max-width: 100%;
}

.history-header {
    margin-bottom: 30px;
    text-align: center;
}

.history-header h3 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.table-responsive {
    margin: 30px auto;
    max-width: 100%;
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.table {
    margin-bottom: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
    padding: 16px 20px;
    text-align: center;
    color: #495057;
}

.table td {
    vertical-align: middle;
    font-size: 14px;
    padding: 16px 20px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table td strong {
    color: #2c3e50;
    font-weight: 600;
}

.table td small {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

.table .btn-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.table .btn-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.btn-group-sm .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
    border-radius: 4px;
    font-weight: 500;
}

/* Améliorer l'espacement des colonnes du tableau */
.table th:first-child,
.table td:first-child {
    text-align: left;
    padding-left: 24px;
}

.table th:last-child,
.table td:last-child {
    text-align: center;
    padding-right: 24px;
}

/* Messages vides/erreurs centrés */
.no-orders,
.error-message {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.no-orders i,
.error-message i {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.no-orders h4 {
    font-size: 20px;
    color: #495057;
    margin-bottom: 10px;
}

.no-orders p,
.error-message p {
    color: #6c757d;
    margin-bottom: 20px;
}

/* Badges Bootstrap */
.badge {
    padding: 0.35em 0.65em;
    font-size: 0.875em;
    font-weight: 600;
}

.badge.bg-primary {
    background-color: #007bff !important;
}

.badge.bg-success {
    background-color: #28a745 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
}

.badge.bg-info {
    background-color: #17a2b8 !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}
