/* Tracking Pages Styles */
:root {
    --primary: #d4af37;
    --primary-light: #f4d03f;
    --secondary: #f39c12;
    --dark: #000000;
    --light: #f5f5f5;
    --text: #333333;
    --text-light: #777777;
    --success: #27ae60;
    --warning: #e74c3c;
    --info: #3498db;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Tracking Section */
.tracking-section {
    padding: 80px 0;
    background: var(--light);
}

.tracking-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Search Form */
.search-form-container {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 40px;
    margin-bottom: 40px;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.header-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: var(--white);
}

.form-header h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.form-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.6;
}

.tracking-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 14px;
    background: var(--white);
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-light);
    font-style: italic;
}

.form-divider {
    text-align: center;
    position: relative;
    margin: 20px 0;
}

.form-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.form-divider span {
    background: var(--white);
    padding: 0 20px;
    color: var(--text-light);
    font-weight: 500;
    font-size: 14px;
    position: relative;
}

.btn-large {
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    justify-content: center;
}

/* Order/Appointment Details */
.order-details-container,
.appointment-details-container {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.order-header,
.appointment-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-info h3,
.appointment-info h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--white);
}

.order-meta,
.appointment-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.order-date,
.appointment-date {
    font-size: 14px;
    opacity: 0.9;
}

.order-status,
.appointment-status {
    background: var(--white);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.order-status.confirmed,
.appointment-status.confirmed {
    background: var(--success);
    color: var(--white);
}

.order-status.preparing {
    background: var(--info);
    color: var(--white);
}

.order-status.shipped {
    background: var(--secondary);
    color: var(--white);
}

.order-status.cancelled,
.appointment-status.cancelled {
    background: var(--warning);
    color: var(--white);
}

.appointment-status.pending {
    background: var(--secondary);
    color: var(--white);
}

.appointment-status.confirmed {
    background: var(--success);
    color: var(--white);
}

.appointment-status.completed {
    background: var(--info);
    color: var(--white);
}

/* Progress Timeline */
.progress-timeline,
.appointment-timeline {
    padding: 40px;
    position: relative;
}

.progress-timeline::before,
.appointment-timeline::before {
    content: '';
    position: absolute;
    top: 40px;
    bottom: 40px;
    left: 80px;
    width: 3px;
    background: #f0f0f0;
}

.timeline-step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 40px;
    position: relative;
}

.timeline-step:last-child {
    margin-bottom: 0;
}

.step-icon {
    width: 60px;
    height: 60px;
    background: #f0f0f0;
    color: #aaa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    transition: var(--transition);
}

.timeline-step.completed .step-icon {
    background: linear-gradient(135deg, var(--success), #2ecc71);
    color: var(--white);
}

.timeline-step.active .step-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

.step-content {
    flex: 1;
    padding-top: 8px;
}

.step-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 5px;
}

.step-content p {
    color: var(--text-light);
    margin-bottom: 8px;
    font-size: 14px;
}

.step-date {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
}

.timeline-step.completed .step-date {
    color: var(--success);
}

.timeline-step.active .step-date {
    color: var(--primary);
}

/* Order Items */
.order-items {
    padding: 40px;
    border-top: 1px solid #f0f0f0;
}

.order-items h4 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--dark);
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--light);
    border-radius: var(--border-radius);
    border: 1px solid #e0e0e0;
    transition: var(--transition);
}

.order-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.item-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--light);
    border-radius: var(--border-radius);
}

.item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-details {
    flex: 1;
    min-width: 0;
}

.item-details h5 {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.item-color {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 5px;
}

.item-price {
    font-weight: 600;
    color: var(--primary);
    font-size: 1rem;
}

.item-quantity {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.quantity-badge {
    background: var(--primary);
    color: var(--white);
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    min-width: 40px;
    text-align: center;
}

.item-subtotal {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 120px;
    font-size: 1.1rem;
    color: var(--dark);
}

.item-name {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 5px;
}

.item-description {
    font-size: 14px;
    color: var(--text-light);
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

/* Service Details */
.service-details {
    padding: 40px;
    border-top: 1px solid #f0f0f0;
}

.service-details h4 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--dark);
}

.service-info-grid {
    display: grid;
    gap: 20px;
}

.service-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: var(--light);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary);
}

.service-card .service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.service-card .service-content {
    flex: 1;
}

.service-card h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.service-card p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 10px;
}

.service-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
}

.duration {
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.price {
    font-weight: 600;
    color: var(--primary);
}

/* Info Grids */
.order-summary-grid,
.appointment-info-grid {
    padding: 40px;
    border-top: 1px solid #f0f0f0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.shipping-info,
.billing-info,
.location-info,
.professional-info {
    background: var(--light);
    padding: 25px;
    border-radius: var(--border-radius);
}

.shipping-info h4,
.billing-info h4,
.location-info h4,
.professional-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shipping-info h4 i,
.billing-info h4 i,
.location-info h4 i,
.professional-info h4 i {
    color: var(--primary);
    font-size: 18px;
}

.info-content,
.location-content,
.professional-content {
    color: var(--text);
    line-height: 1.6;
}

.billing-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.billing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.billing-row.total {
    border-top: 1px solid #e0e0e0;
    margin-top: 10px;
    padding-top: 15px;
    font-weight: 600;
    color: var(--primary);
    font-size: 1.1rem;
}

/* Customer Info */
.customer-info {
    padding: 40px;
    border-top: 1px solid #f0f0f0;
}

.customer-info h4 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--dark);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

.info-value {
    font-weight: 500;
    color: var(--dark);
}

/* Appointment Management */
.appointment-management {
    padding: 40px;
    border-top: 1px solid #f0f0f0;
    background: var(--light);
}

.appointment-management h4 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--dark);
}

.management-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.management-actions .btn {
    flex: 1;
    min-width: 150px;
    justify-content: center;
}

.management-note {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    color: var(--info);
    font-size: 14px;
}

.management-note i {
    color: var(--info);
    font-size: 16px;
}

/* Disabled Actions */
.completed-actions,
.cancelled-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: var(--light);
    border-radius: var(--border-radius);
    border: 2px dashed #ddd;
}

.action-disabled {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-weight: 500;
    font-size: 14px;
}

.action-disabled i {
    font-size: 18px;
}

.completed-actions .action-disabled {
    color: var(--success);
}

.cancelled-actions .action-disabled {
    color: var(--warning);
}

.no-actions-available {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: var(--light);
    border-radius: var(--border-radius);
    border: 2px dashed #ddd;
}

.no-actions-available .action-disabled {
    color: var(--text-light);
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.alert-success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success);
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.alert-error {
    background: rgba(231, 76, 60, 0.1);
    color: var(--warning);
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.alert i {
    font-size: 18px;
}

/* Support Section */
.support-section {
    padding: 40px;
    border-top: 1px solid #f0f0f0;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    text-align: center;
}

.support-content h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--white);
}

.support-content p {
    margin-bottom: 25px;
    opacity: 0.9;
}

.support-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.support-actions .btn {
    min-width: 150px;
}

.support-actions .btn-outline {
    background: var(--white);
    color: var(--primary);
    border-color: var(--white);
}

.support-actions .btn-outline:hover {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

/* No Results */
.no-order-found,
.no-appointment-found {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 60px 40px;
    text-align: center;
}

.no-order-content,
.no-appointment-content {
    max-width: 500px;
    margin: 0 auto;
}

.no-order-icon,
.no-appointment-icon {
    width: 100px;
    height: 100px;
    background: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 48px;
    color: var(--text-light);
}

.no-order-content h3,
.no-appointment-content h3 {
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 15px;
}

.no-order-content p,
.no-appointment-content p {
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.6;
}

.no-order-suggestions,
.no-appointment-suggestions {
    background: var(--light);
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    text-align: left;
}

.no-order-suggestions h4,
.no-appointment-suggestions h4 {
    color: var(--dark);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.no-order-suggestions ul,
.no-appointment-suggestions ul {
    list-style: none;
    padding: 0;
}

.no-order-suggestions li,
.no-appointment-suggestions li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--text);
}

.no-order-suggestions li::before,
.no-appointment-suggestions li::before {
    content: "•";
    color: var(--primary);
    font-weight: 600;
    font-size: 1.2rem;
}

.no-appointment-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.no-appointment-actions .btn {
    min-width: 180px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    max-height: 90%;
    overflow-y: auto;
    transform: translateY(-20px);
    transition: var(--transition);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--primary);
    font-size: 1.3rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--primary);
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Button Variants */
.btn-warning {
    background: var(--warning);
    color: var(--white);
    border-color: var(--warning);
}

.btn-warning:hover {
    background: #c0392b;
    border-color: #c0392b;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success);
    color: var(--white);
    border-color: var(--success);
}

.btn-success:hover {
    background: #229954;
    border-color: #229954;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .tracking-section {
        padding: 40px 0;
    }
    
    .search-form-container {
        padding: 30px 20px;
        margin-bottom: 30px;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .header-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .order-header,
    .appointment-header {
        padding: 25px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .order-info h3,
    .appointment-info h3 {
        font-size: 1.3rem;
    }
    
    .progress-timeline,
    .appointment-timeline {
        padding: 30px 20px;
    }
    
    .progress-timeline::before,
    .appointment-timeline::before {
        left: 50px;
    }
    
    .step-icon {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .order-items,
    .service-details,
    .customer-info,
    .appointment-management,
    .support-section {
        padding: 30px 20px;
    }
    
    .order-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px;
    }
    
    .order-item .item-image {
        width: 80px;
        height: 80px;
        align-self: center;
    }
    
    .order-item .item-details {
        text-align: center;
        width: 100%;
    }
    
    .order-item .item-quantity,
    .order-item .item-subtotal {
        align-self: center;
        min-width: auto;
    }
    
    .quantity-badge {
        font-size: 16px;
        padding: 10px 16px;
    }
    
    .order-summary-grid,
    .appointment-info-grid {
        padding: 30px 20px;
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .item-row {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .service-card {
        flex-direction: column;
        text-align: center;
    }
    
    .management-actions {
        flex-direction: column;
    }
    
    .management-actions .btn {
        min-width: auto;
    }
    
    .support-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .no-appointment-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .form-header h2 {
        font-size: 1.3rem;
    }
    
    .order-info h3,
    .appointment-info h3 {
        font-size: 1.1rem;
    }
    
    .step-content h4 {
        font-size: 1rem;
    }
    
    .btn-large {
        padding: 12px 30px;
        font-size: 14px;
    }
    
    .no-order-icon,
    .no-appointment-icon {
        width: 80px;
        height: 80px;
        font-size: 36px;
    }
    
    .no-order-content h3,
    .no-appointment-content h3 {
        font-size: 1.5rem;
    }
}

/* Styles pour les états des boutons de gestion */
.action-disabled {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    justify-content: center;
}

.cancelled-actions .action-disabled {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.completed-actions .action-disabled {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.confirmed-actions .action-disabled {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.past-24h-actions .action-disabled {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.past-actions .action-disabled {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}