.trk-modal {
    --primary-color: #3498db;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --neutral-color: #95a5a6;
    --text-color: #2c3e50;
    --light-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --timeline-line-width: 2px;
    --timeline-marker-size: 16px;
    --compact-spacing: 12px;
}

/* Main container */
/* .trk-modal-container {
    color: var(--text-color);
    padding: 15px;
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
} */

/* Header section */
.trk-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.trk-modal-parcel-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.trk-modal-parcel-code {
    font-size: 1.25rem;
    font-weight: 600;
    font-family: monospace;
    color: #3498db;
}

.trk-modal-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}


.trk-modal-status-indicator {
    align-self: flex-start;
}

/* Status colors */
.trk-modal-status-new {
    background-color: var(--primary-color);
}

.trk-modal-status-distribution {
    background-color: var(--success-color);
}

.trk-modal-status-canceled {
    background-color: var(--danger-color);
}

.trk-modal-status-relanced {
    background-color: var(--warning-color);
}

.trk-modal-status-no-response {
    background-color: var(--neutral-color);
}

/* Compact Timeline */
.trk-modal-timeline {
    position: relative;
    padding-left: 30px;
}

.trk-modal-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--timeline-marker-size) / 2);
    width: var(--timeline-line-width);
    background-color: var(--border-color);
    transform: translateX(-50%);
}

.trk-modal-timeline-item {
    position: relative;
    margin-bottom: var(--compact-spacing);
    padding-bottom: var(--compact-spacing);
    border-bottom: 1px dashed var(--border-color);
}

.trk-modal-timeline-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.trk-modal-timeline-marker {
    position: absolute;
    top: 3px;
    left: calc(-30px + var(--timeline-marker-size) / 2);
    width: var(--timeline-marker-size);
    height: var(--timeline-marker-size);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 1px var(--border-color);
    transform: translateX(-50%);
}

.trk-modal-timeline-date {
    font-size: 0.8rem;
    color: var(--neutral-color);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.trk-modal-timeline-date::before {
    content: '•';
    margin-right: 6px;
    color: var(--neutral-color);
}

.trk-modal-timeline-status-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.trk-modal-timeline-status,
.trk-modal-timeline-situation {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.trk-modal-timeline-details {
    font-size: 0.85rem;
    color: var(--text-color);
}

.trk-modal-timeline-detail-item {
    display: flex;
    margin-bottom: 4px;
    align-items: flex-start;
}

.trk-modal-timeline-detail-item i {
    margin-right: 8px;
    color: var(--neutral-color);
    font-size: 0.8rem;
    min-width: 14px;
    text-align: center;
}

/* Tabs */
.trk-modal-tabs {
    margin-top: 20px;
}

.trk-modal-nav-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.trk-modal-nav-item {
    margin-bottom: -1px;
}

.trk-modal-nav-link {
    display: block;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    color: var(--neutral-color);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
}

.trk-modal-nav-link:hover {
    border-color: var(--border-color);
    color: var(--primary-color);
}

.trk-modal-nav-link.active {
    color: var(--primary-color);
    background-color: white;
    border-color: var(--border-color) var(--border-color) white;
    font-weight: 600;
}

.trk-modal-nav-link i {
    margin-right: 5px;
}

.trk-modal-tab-content {
    padding: 15px;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 4px 4px;
    background: white;
}

/* Call history - compact version */
.trk-modal-call-history {
    display: grid;
    gap: 8px;
}

.trk-modal-call-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 4px;
    background-color: var(--light-bg);
}

.trk-modal-call-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    margin-right: 10px;
    font-size: 0.8rem;
}

.trk-modal-call-details {
    flex: 1;
}

.trk-modal-call-time {
    font-size: 0.75rem;
    color: var(--neutral-color);
}

.trk-modal-call-livreur,
.trk-modal-call-phone {
    font-size: 0.8rem;
    line-height: 1.3;
}

/* Amana tracking - compact version */
.trk-modal-amana-history {
    display: grid;
    gap: 8px;
}

.trk-modal-amana-item {
    display: grid;
    grid-template-columns: 80px 1fr 1fr;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-radius: 4px;
    background-color: var(--light-bg);
    font-size: 0.85rem;
}

.trk-modal-amana-time {
    font-size: 0.75rem;
    color: var(--neutral-color);
}

.trk-modal-amana-code {
    font-weight: 600;
}

/* Responsive styles */
@media (max-width: 767px) {
    .trk-modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .trk-modal-timeline {
        padding-left: 25px;
    }

    .trk-modal-timeline-marker {
        left: calc(-25px + var(--timeline-marker-size) / 2);
    }

    .trk-modal-amana-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .trk-modal-nav-tabs {
        flex-wrap: wrap;
    }

    .trk-modal-nav-link {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Animation for modal entry */
@keyframes trk-modal-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.trk-modal-container {
    animation: trk-modal-fade-in 0.3s ease-out;
}







/* Modal Info Tab Styles */
.trk-info-container {
    padding: 1.5rem;
}

/* Contact Cards */
.trk-contact-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.trk-contact-card {
    flex: 1;
    min-width: 250px;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #3498db;
}

.trk-contact-title {
    font-weight: 600;
    color: #444;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trk-contact-title i {
    color: #3498db;
}

.trk-contact-name {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.trk-contact-phone {
    color: #666;
    margin-bottom: 0.75rem;
}

.trk-contact-actions {
    display: flex;
    gap: 0.5rem;
}

.trk-contact-actions.inline {
    display: inline-flex;
    margin-left: 0.5rem;
}

.trk-action-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s ease;
}

.trk-action-button.whatsapp {
    background-color: #25D366;
}

.trk-action-button.call {
    background-color: #3498db;
}

.trk-action-button:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

/* Parcel Info Grid */
.trk-info-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.trk-info-row {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #eee;
}

.trk-info-row:last-child {
    border-bottom: none;
}

.trk-info-item {
    flex: 1;
    min-width: 250px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
}

.trk-info-item:not(:last-child) {
    border-right: 1px solid #eee;
}

.trk-info-label {
    font-weight: 600;
    color: #555;
    width: 40%;
    padding-right: 1rem;
}

.trk-info-value {
    width: 60%;
}

/* Tracking code styling */
.trk-tracking-code {
    background-color: #e9f7fe;
    color: #3498db;
    font-family: monospace;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

/* Status badges */
.trk-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
}

.trk-badge i {
    font-size: 0.85rem;
}

.trk-badge.success {
    background-color: #d4edda;
    color: #155724;
}

.trk-badge.warning {
    background-color: #fff3cd;
    color: #856404;
}

.trk-badge.info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.trk-badge.danger {
    background-color: #f8d7da;
    color: #721c24;
}

.trk-badge.secondary {
    background-color: #e2e3e5;
    color: #383d41;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .trk-info-item {
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .trk-info-row:last-child .trk-info-item:last-child {
        border-bottom: none;
    }
}

.trk-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: darkkhaki;
}

.no-data {
    color: #9ca3af;
    font-style: italic;
}

.trk-timeline-icon {
    color: #6c757d;
    background: white;
    z-index: 1;
    position: relative;
    top: -4px;
}


/* Products cards */
.pi-card {
    background-color: var(--pi-bg-color);
    border-radius: var(--pi-card-radius);
    box-shadow: var(--pi-card-shadow);
    margin: 16px 24px;
    overflow: hidden;
}

.pi-card-content {
    padding: 16px 20px;
}

.pi-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25em 0.5em;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    border-radius: 9999px;
    margin-left: 8px;
}

.pi-badge-primary {
    background-color: var(--pi-primary-light);
    color: var(--pi-primary-color);
}
.pi-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.pi-product-item {
    display: flex;
    border: 1px solid var(--pi-border-color);
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pi-product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.pi-product-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    background-color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pi-product-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.pi-product-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pi-product-name {
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--pi-text-color);
    margin-bottom: 6px;
}

.pi-product-variant {
    font-size: 0.8125rem;
    color: var(--pi-text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 768px) {
    .pi-products {
        grid-template-columns: 1fr;
    }
}

/* Bons Section Styling */
.trk-bons-section {
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.trk-bons-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.trk-bons-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.trk-bons-label i {
    color: #6c757d;
    font-size: 16px;
}

.trk-bons-btn {
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.trk-bons-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.trk-bons-btn i {
    margin-right: 6px;
}

/* Dropdown Menu Styling */
#parcelBonsMenu {
    min-width: 200px;
    border-radius: 8px;
    border: none;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    padding: 8px 0;
}

#parcelBonsMenu .dropdown-item {
    padding: 8px 16px;
    border-radius: 4px;
    margin: 2px 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    text-decoration: none;
}

#parcelBonsMenu .dropdown-item:hover {
    background-color: #f8f9fa;
    transform: translateX(2px);
}

#parcelBonsMenu .dropdown-item i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
    font-size: 14px;
}

#parcelBonsMenu .dropdown-item-text {
    color: #6c757d;
}

/* Loading state */
.trk-bons-loading {
    text-align: center;
    padding: 15px;
    color: #6c757d;
}

.trk-bons-loading .spinner-border {
    color: #007bff;
}

/* Change comparison styles for edit request modal */
.change-comparison {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.change-comparison .old-value {
    color: #6c757d;
    text-decoration: line-through;
    font-size: 0.9rem;
}

.change-comparison .new-value {
    color: #28a745 !important;
    font-weight: 600 !important;
}

.change-comparison .fas.fa-arrow-right {
    color: #007bff;
    font-size: 0.8rem;
}

/* Responsive adjustments for change comparison */
@media (max-width: 768px) {
    .change-comparison {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .change-comparison .fas.fa-arrow-right {
        display: none;
    }
}

/* Responsive Design */
@media (max-width: 576px) {
    .trk-bons-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .trk-bons-label {
        justify-content: center;
    }
    
    .trk-bons-btn {
        width: 100%;
        text-align: center;
    }
}

/* Alternative compact header integration */
.trk-modal-header-compact .trk-bons-section {
    margin: 10px 0 0 0;
    padding: 10px 15px;
    background: rgba(0, 123, 255, 0.05);
    border: 1px solid rgba(0, 123, 255, 0.1);
}

.trk-modal-header-compact .trk-bons-container {
    gap: 10px;
}

.trk-modal-header-compact .trk-bons-label {
    font-size: 13px;
}

.trk-modal-header-compact .trk-bons-btn {
    padding: 6px 12px;
    font-size: 13px;
}
