/* OnTrac Tracking System Styles */

/* Admin Button Styles */
.header .rhs .button {
    background: #d22730;
    color: white;
    border: 2px solid #d22730;
    padding: 20px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 14px;
    white-space: nowrap;
    display: inline-block;
    line-height: 1.2;
}

.header .rhs .button:hover {
    background: #b91c23;
    border-color: #b91c23;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(210, 39, 48, 0.3);
}

/* Hero Tracking Section Styles */
.hero__tracking-section {
    margin-top: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.tracking-note {
    margin: 10px 0 5px 0;
    color: #888;
}

.admin-note {
    margin: 5px 0;
    font-size: 12px;
    color: #999;
}

.admin-link {
    color: #0d6efd;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.admin-link:hover {
    color: #0b5ed7;
    text-decoration: underline;
}

/* Admin Login Modal Styles */
.admin-login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10002;
}

.admin-login-modal {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.admin-login-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 10px 10px 0 0;
}

.admin-login-header h2 {
    margin: 0;
    color: #0d6efd;
    font-size: 20px;
}

.admin-login-content {
    padding: 20px;
}

.login-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-top: 15px;
    border: 1px solid #f5c6cb;
}

.login-error p {
    margin: 0;
    font-size: 14px;
}

/* Admin Panel Styles */
#tracking-admin-button {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background: #0d6efd;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

#tracking-admin-button:hover {
    background: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.tracking-admin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10001;
}

.tracking-admin-modal {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.tracking-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 10px 10px 0 0;
}

.tracking-admin-header h3 {
    margin: 0;
    color: #0d6efd;
    font-size: 24px;
}

.admin-header-actions {
    display: flex;
    align-items: center;
}

.admin-header-actions .btn {
    font-size: 12px;
    padding: 5px 10px;
    margin-right: 10px;
}

.tracking-admin-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.tracking-admin-close:hover {
    background: #f0f0f0;
    color: #333;
}

.tracking-admin-content {
    padding: 20px;
}

.tracking-admin-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
}

.tracking-admin-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Tracking Section Styles */
.tracking-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.tracking-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 36px;
    font-weight: bold;
}

.tracking-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tracking-form input {
    flex: 1;
    min-width: 300px;
    padding: 15px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.tracking-form input:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.tracking-form button {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Tracking Result Styles */
.tracking-result {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.tracking-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.tracking-header h3 {
    color: #0d6efd;
    margin-bottom: 10px;
    font-size: 24px;
}

.tracking-header p {
    margin: 5px 0;
    font-size: 16px;
    color: #666;
}

.tracking-timeline {
    margin: 30px 0;
}

.tracking-timeline h4 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

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

/* Removed conflicting vertical line */

.timeline-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #0d6efd;
    margin-right: 20px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.timeline-item.current .timeline-marker {
    background: #28a745;
    box-shadow: 0 0 0 5px rgba(40, 167, 69, 0.3);
}

.timeline-content {
    flex: 1;
    padding: 10px 0;
}

.timeline-content h5 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.timeline-content p {
    margin: 0 0 5px 0;
    color: #666;
    font-size: 14px;
}

.timeline-content small {
    color: #999;
    font-size: 12px;
}

.tracking-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.tracking-details h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.tracking-details p {
    margin: 5px 0;
    color: #666;
}

/* Error Styles */
.tracking-error {
    text-align: center;
    padding: 40px 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
}

.tracking-error h3 {
    margin: 0 0 10px 0;
    color: #721c24;
}

/* Package List Styles */
.package-item {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    border-left: 4px solid #0d6efd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.package-item strong {
    color: #0d6efd;
    font-size: 16px;
}

.package-item small {
    color: #666;
    display: block;
    margin-top: 5px;
}

/* Modern Tracking Display Styles */
/* Inspired by FedEx, UPS, and USPS tracking designs */

.tracking-result-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.tracking-error {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.tracking-error h3 {
    color: #d32f2f;
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 600;
}

.tracking-error p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.tracking-success {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

/* USPS-like red themed wrapper */
.usps-tracking { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #222; width: 65%; margin: 0 auto; }
.usps-header { background: #d22730; color: #fff; padding: 16px 20px; border-radius: 8px 8px 0 0; }
.usps-header-title { font-size: 20px; font-weight: 700; }
.usps-header-sub { font-size: 12px; opacity: 0.9; }

.usps-status-banner { display: flex; align-items: center; gap: 12px; background: #fef2f3; border: 1px solid #f3c7cb; border-left: 4px solid #d22730; padding: 14px 16px; border-radius: 0 0 8px 8px; }
.usps-status-banner .usps-status-icon { width: 28px; height: 28px; border-radius: 50%; background: #28a745; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.usps-status-banner.problem .usps-status-icon { background: #dc3545; }
.usps-status-banner.in-transit .usps-status-icon { background: #d22730; }
.usps-status-banner.warning { }
.usps-status-banner.warning .usps-status-icon { }
.usps-status-sub { font-size: 12px; color: #555; margin-top: 2px; }

/* USPS green progress bar */
.usps-progress { width: 100%; height: 6px; background: #e8f5ec; border-radius: 9999px; margin: 10px 0 0 0; overflow: hidden; }
.usps-progress-fill { height: 100%; background: #28a745; border-radius: 9999px; transition: width 0.3s ease; }

.usps-card { background: #fff; border: 1px solid #e5e5e5; border-radius: 8px; padding: 14px 16px; margin-top: 14px; }
.usps-card-title { font-size: 16px; font-weight: 700; color: #222; margin-bottom: 8px; }
.usps-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
.usps-info-row { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid #f0f0f0; padding: 8px 0; }
.usps-info-row span { color: #666; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.usps-info-row strong { color: #111; font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }

/* Red theme accents */
.timeline-item.current::before { background: #d22730; }
.status-card.in-transit { border-left-color: #d22730; }
.copy-icon:hover { fill: #d22730; }
.informed-delivery-link { border-color: #d22730; color: #d22730; }
.informed-delivery-link:hover { border-color: #b91c23; }

/* Precise USPS-like timeline overrides within red-themed wrapper */
.usps-tracking .timeline { padding-left: 30px; }
.usps-tracking .timeline::before { background: #d9d9d9; left: 15px; }
.usps-tracking .timeline-item { margin-bottom: 16px; padding-bottom: 8px; }
.usps-tracking .timeline-item.current::before { background: #28a745; box-shadow: none; border: 3px solid #fff; }
.usps-tracking .timeline-item.past::before { background: #0d6efd; border: 3px solid #fff; }
.usps-tracking .timeline-item.warning::before { background: #0d6efd; border: 3px solid #fff; }
.usps-tracking .timeline-item.problem::before { background: #0d6efd; border: 3px solid #fff; }
.usps-tracking .timeline-content { background: transparent; border: none; box-shadow: none; padding: 0; min-width: auto; max-width: none; }
.usps-tracking .timeline-item-title { font-size: 14px; font-weight: 700; color: #222; }
.usps-tracking .timeline-item-subtitle, .usps-tracking .timeline-item-time { font-size: 12px; color: #555; }

/* Responsiveness: full width on small screens */
@media (max-width: 992px) {
  .usps-tracking { width: 100%; }
}

/* Header Section */
.tracking-header {
    background: #f8f9fa;
    color: #333;
    padding: 30px;
    position: relative;
    border-bottom: 1px solid #e0e0e0;
}

.tracking-number-section {
    position: relative;
    z-index: 1;
}

.tracking-number-label {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.tracking-number-display {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.tracking-number-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
    background: white;
    padding: 12px 20px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    color: #333;
}

.copy-icon {
    width: 20px;
    height: 20px;
    cursor: pointer;
    fill: #666;
    transition: transform 0.2s ease;
}

.copy-icon:hover {
    transform: scale(1.1);
    fill: #333;
}

.informed-delivery-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    transition: all 0.2s ease;
    background: white;
}

.informed-delivery-link:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #333;
}

/* Status Card */
.status-card {
    background: #f8f9fa;
    border-left: 4px solid #d22730;
    padding: 25px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.status-card.delivered {
    border-left-color: #28a745;
}

.status-card.in-transit {
    border-left-color: #d22730;
}

.status-card.problem {
    border-left-color: #dc3545;
}

.status-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.status-message {
    font-size: 16px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

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

.status-detail {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-detail-icon {
    width: 20px;
    height: 20px;
    fill: #666;
}

.status-detail-text {
    font-size: 14px;
    color: #666;
}

/* Main Content Grid */
.tracking-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 400px;
    width: 100%;
}

.tracking-left-panel {
    padding: 30px;
    border-right: 1px solid #e0e0e0;
    background: #fafafa;
}

.tracking-right-panel {
    padding: 30px;
    background: white;
}

/* Timeline Section */
.timeline-section {
    margin-top: 20px;
}

/* Make tracking history container dynamic with internal scroll */
.tracking-right-panel .timeline-section {
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-right: 6px; /* prevent scrollbar from overlapping content */
}

.timeline-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.timeline-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.timeline-status {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    padding: 6px 12px;
    background: #f0f0f0;
    border-radius: 15px;
}

.timeline-status.faded {
    opacity: 0.5;
}

/* Timeline - Clean Professional Design */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #e0e0e0;
}

.timeline-item {
    position: relative;
    margin-bottom: 10px;
    padding-bottom: 7px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -22px;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d22730;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(210, 39, 48, 0.2);
    z-index: 2;
}

.timeline-item.current::before {
    background: #d22730;
    box-shadow: 0 0 0 4px rgba(210, 39, 48, 0.2);
}

.timeline-item.past::before {
    background: #28a745;
}

.timeline-item.future::before {
    background: #e0e0e0;
}

.timeline-content {
    background: white;
    padding: 8px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.timeline-item.current .timeline-content {
    border-color: #d22730;
    box-shadow: 0 4px 12px rgba(210, 39, 48, 0.15);
}

.timeline-item-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
    line-height: 1.2;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.timeline-item-subtitle {
    font-size: 13px;
    color: #666;
    line-height: 1.1;
    margin-bottom: 2px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.timeline-item-time {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
    font-weight: 500;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Current step blue blinking indicator button */
.timeline-item .timeline-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.current-step-btn {
    display: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #0d6efd;
    border: none;
    outline: 0;
    padding: 0;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.15);
    animation: blink-blue 1s ease-in-out infinite;
    flex: 0 0 12px;
    position: relative;
    z-index: 3;
}

/* Force show on current item even if global button rules try to hide */
.timeline .timeline-item.current .current-step-btn {
    display: none !important;
}

/* Replace the default green current dot with a blinking blue one */
.usps-tracking .timeline-item.current::before,
.timeline .timeline-item.current::before {
    background: #0d6efd !important;
    border: none !important;
    width: 12px !important;
    height: 12px !important;
    border-radius: 9999px !important;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.15) !important;
    animation: blink-blue 1s ease-in-out infinite !important;
}

@keyframes blink-blue {
    0% { opacity: 0.3; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1); }
    100% { opacity: 0.3; transform: scale(0.9); }
}

/* Package Details */
.package-details {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.package-details h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

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

.detail-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.detail-value {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.detail-value.status {
    color: #d22730;
}

.detail-value.delivered {
    color: #28a745;
}

.detail-value.problem {
    color: #dc3545;
}

/* Progress Bar */
.progress-section {
    margin: 25px 0;
}

.progress-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.progress-bar {
    background: #f0f0f0;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #d22730 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* Action Buttons */
.tracking-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.tracking-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tracking-action:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.tracking-action-icon {
    width: 16px;
    height: 16px;
    fill: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tracking-content {
        grid-template-columns: 1fr;
    }
    
    .tracking-left-panel {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .tracking-number-value {
        font-size: 20px;
        padding: 8px 12px;
    }
    
    .status-details {
        grid-template-columns: 1fr;
    }
    
    .tracking-actions {
        flex-direction: column;
    }
    
    .timeline-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

/* Hide/Show Timeline Toggle */
.hide-history-toggle {
    display: inline-block;
    margin-top: 20px;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.hide-history-toggle:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* Loading State */
.tracking-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.tracking-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top: 2px solid #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success States */
.tracking-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
}

/* --- Mobile responsiveness fixes for tracking timeline/cards --- */
@media (max-width: 480px) {
  .timeline-content {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  .usps-tracking,
  .tracking-result-container,
  .tracking-content,
  .tracking-right-panel {
    overflow-x: hidden;
  }
  .usps-info-grid {
    grid-template-columns: 1fr !important;
  }
  /* Avoid over-tall images; fit to width */
  img, video, iframe {
    max-width: 100% !important;
    height: auto !important;
  }
}

/* Status Colors */
.status-received { color: #0d6efd; }
.status-transit { color: #ffc107; }
.status-delivered { color: #28a745; }
.status-delayed { color: #dc3545; }

/* Public Tracking Results */
.tracking-result-container {
    margin-top: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    background: white;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #333;
    line-height: 1.5;
    padding: 20px;
}

.tracking-success {
    display: grid;
    grid-template-columns: 1fr 0.67fr;
    gap: 30px;
    margin-top: 20px;
    width: 100%;
}

.tracking-left-column {
    background: white;
}

.tracking-right-column {
    background: white;
}

.tracking-number-section {
    margin-bottom: 20px;
}

.tracking-number-label {
    font-weight: bold;
    font-variant: small-caps;
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.tracking-number-display {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.tracking-number-value {
    font-size: 24px;
    font-weight: bold;
    color: #333399;
    letter-spacing: 1px;
}

.copy-icon {
    width: 18px;
    height: 18px;
    cursor: pointer;
    fill: #666;
}

.informed-delivery-link {
    color: #00529B;
    text-decoration: none;
    font-size: 14px;
}

.informed-delivery-link:hover {
    text-decoration: underline;
}

.tracking-actions {
    display: flex;
    gap: 25px;
    margin-bottom: 40px;
}

.tracking-action {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #00529B;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
}

.tracking-action:hover {
    color: #003d7a;
    text-decoration: underline;
}

.tracking-action-icon {
    width: 16px;
    height: 16px;
    background: #00529B;
    border-radius: 2px;
    position: relative;
}

.tracking-action-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 1px;
}

.latest-update-card {
    background-color: #E6F4FA;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.latest-update-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 12px;
    color: #333;
}

.latest-update-message {
    color: #333;
    margin-bottom: 15px;
    line-height: 1.6;
}

.update-divider {
    border: none;
    border-top: 1px solid #ccc;
    margin: 15px 0;
}

.tracking-plus-section {
    font-size: 14px;
}

.tracking-plus-link {
    color: #00529B;
    font-weight: bold;
    text-decoration: underline;
}

.tracking-plus-link:hover {
    text-decoration: none;
}

.latest-update-section {
    background: #E6F4FA;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.latest-update-separator {
    height: 1px;
    background: #ccc;
    margin: 15px 0;
}

.timeline-section {
    position: relative;
}

.timeline-header {
    margin-bottom: 20px;
}

.timeline-status {
    font-size: 14px;
    color: #999;
    margin-bottom: 5px;
}

.timeline-status.faded {
    color: #ccc;
}

/* Removed duplicate timeline styles */

.timeline-item.current .timeline-content h5 {
    color: #00529B;
    font-weight: 700;
}

.timeline-item.future .timeline-content h5 {
    color: #999;
}

.timeline-content p {
    margin: 0 0 4px 0;
    color: #666;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
}

.timeline-content small {
    color: #999;
    font-size: 13px;
    font-weight: 400;
}

.hide-history-toggle {
    color: #00529B;
    text-decoration: none;
    font-size: 14px;
    display: block;
    margin-top: 15px;
    padding-left: 5px;
}

.hide-history-toggle:hover {
    text-decoration: underline;
}

.hide-timeline-link {
    color: #00529B;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 25px;
    display: inline-block;
}

.hide-timeline-link:hover {
    text-decoration: underline;
}

.tracking-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

.tracking-error h3 {
    margin: 0 0 10px 0;
    color: #721c24;
    font-size: 18px;
    font-weight: 600;
} 