/* Address Management Styles */
.address-item {
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.address-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.address-item .card-body {
    padding: 1.5rem;
}

.address-item .badge {
    font-size: 0.75em;
    font-weight: 500;
}

.address-item .btn-group-vertical .btn {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.address-item .btn-group-vertical .btn:last-child {
    margin-bottom: 0;
}

/* Order Management Styles */
.order-item {
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.order-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.order-item .card-body {
    padding: 1.5rem;
}

.order-item .badge {
    font-size: 0.75em;
    font-weight: 500;
}

.order-item .btn-group-vertical .btn {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.order-item .btn-group-vertical .btn:last-child {
    margin-bottom: 0;
}

/* Order Status Filters */
#order-status-filters .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
}

#order-status-filters .btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* Timeline Styles for Order History */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -1.875rem;
    top: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.timeline-marker i {
    font-size: 0.5rem;
}

.timeline-content {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.375rem;
    border-left: 3px solid #007bff;
}

.timeline-content h6 {
    color: #007bff;
    margin-bottom: 0.5rem;
}

/* Address Form Modal */
.modal-lg .modal-dialog {
    max-width: 900px;
}

#address-modal .form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

#address-modal .form-control, 
#address-modal .form-select {
    border: 1px solid #ddd;
    border-radius: 0.375rem;
    padding: 0.75rem;
    font-size: 0.875rem;
}

#address-modal .form-control:focus, 
#address-modal .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#address-modal .form-select:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* Order Detail Modal */
#order-detail-modal .order-detail {
    font-size: 0.95rem;
}

#order-detail-modal .order-detail .bg-light {
    border: 1px solid #e9ecef;
}

#order-detail-modal .order-detail h6 {
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
}

/* Empty state */
.addresses-empty-state,
.orders-empty-state {
    padding: 3rem 1rem;
    text-align: center;
}

.addresses-empty-state i,
.orders-empty-state i {
    color: #dee2e6;
    margin-bottom: 1rem;
}

.addresses-empty-state h6,
.orders-empty-state h6 {
    color: #6c757d;
    font-weight: 500;
}

.addresses-empty-state p,
.orders-empty-state p {
    color: #868e96;
    font-size: 0.875rem;
}

/* Loading state */
.address-loading,
.order-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    flex-direction: column;
}

.address-loading .spinner-border,
.order-loading .spinner-border {
    margin-bottom: 1rem;
}

/* Pagination */
.pagination .page-link {
    color: #007bff;
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

.pagination .page-link:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

/* Responsive */
@media (max-width: 768px) {
    .address-item .btn-group-vertical,
    .order-item .btn-group-vertical {
        margin-top: 1rem;
    }
    
    .address-item .btn-group-vertical .btn,
    .order-item .btn-group-vertical .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .modal-lg .modal-dialog {
        max-width: 95%;
        margin: 1rem auto;
    }
    
    #address-modal .row .col-md-4,
    #address-modal .row .col-md-6,
    #address-modal .row .col-md-8 {
        margin-bottom: 1rem;
    }
    
    #order-status-filters {
        flex-wrap: wrap;
    }
    
    #order-status-filters .btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-marker {
        left: -1.375rem;
        width: 1rem;
        height: 1rem;
    }
    
    .timeline-marker i {
        font-size: 0.375rem;
    }
}

/* Address type badges */
.badge.bg-secondary {
    background-color: #6c757d !important;
}

.badge.bg-primary {
    background-color: #007bff !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.badge.bg-info {
    background-color: #17a2b8 !important;
}

.badge.bg-success {
    background-color: #28a745 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

/* Form validation styles */
.was-validated .form-control:invalid {
    border-color: #dc3545;
}

.was-validated .form-control:valid {
    border-color: #28a745;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

/* Section navigation active state */
.list-group-item-action.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.list-group-item-action.active:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}
