/* VRL Tracking Plugin Styles */
.vrl-tracking-container {
   max-width: 626px;
    min-width: 577px;
    width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    /* background: #fff; */
    background: transparent;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

@media (max-width: 600px) {
    .vrl-tracking-container {
        min-width: auto;
        width: 100%;
    }
}


.vrl-tracking-form {
      padding: 25px;
      background: linear-gradient(135deg, #cc996682 0%, #b8875a73 100%);
    color: white;
    text-align: center;
}

.vrl-tracking-title {
    margin: 0 0 30px 0;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.vrl-icon {
    width: 32px;
    height: 32px;
}

.vrl-input-section {
     display: flex;
    flex-direction: column;
    gap: 15px;
}

.vrl-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
#vrl-tracking-number {
    width: 100%;
    padding: 18px 60px 18px 24px;
    border: none;
    border-radius: 9px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#vrl-tracking-number:focus {
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

#vrl-tracking-number::placeholder {
    color: #888;
}

.vrl-paste-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #CC9966;
    border: none;
    border-radius: 9px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vrl-paste-btn:hover {
    background: #B8875A;
    transform: translateY(-50%) scale(1.1);
}

.vrl-paste-btn svg {
    width: 18px;
    height: 18px;
}

.vrl-track-btn {
    background: white;
    color: #CC9966;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    white-space: nowrap;
}

.vrl-track-btn:hover {
    background: #f8f8f8;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.vrl-search-icon {
    width: 20px;
    height: 20px;
}

.vrl-loading {
    padding: 60px 40px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.vrl-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e5e5e5;
    border-top: 5px solid #CC9966;
    border-radius: 50%;
    animation: vrl-spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes vrl-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.vrl-loading p {
    margin: 0;
    color: #666;
    font-size: 18px;
    font-weight: 500;
}

.vrl-result {
    /* padding: 40px; */
}

/* Enhanced Status Card with Horizontal Layout */
.vrl-status-card {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
   padding: 19px;
    border-radius: 16px;
    margin-bottom: 30px;
    display: flex;    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 120px;
    position: relative;
    overflow: hidden;
        margin-top: 11px;
}

/* .vrl-status-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: skewX(-15deg);
    transform-origin: top;
} */

.vrl-status-card.delivered {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.vrl-status-card.in-transit {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
}

.vrl-status-card.pending {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

.vrl-status-card.failed {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.vrl-status-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.vrl-status-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vrl-status-info {
    flex: 1;
}

.vrl-status-title {
    font-size: 32px;
    font-weight: 900;
   margin: 9px 2px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
        color: white;
}

.vrl-status-location {
    font-size: 18px;
    opacity: 0.9;
    margin: 0 0 3px 0 !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vrl-status-date {
    font-size: 16px;
    opacity: 0.8;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vrl-status-right {
    text-align: right;
    flex-shrink: 0;
}

.vrl-tracking-number {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    font-family: 'Courier New', monospace;
}

.vrl-edd {
    font-size: 14px;
    opacity: 0.8;
    margin: 0;
}

/* Enhanced Details Grid - Better use of width */
.vrl-details-grid {
    display: grid;
    /* grid-template-columns: 1fr 1fr 1fr; */
    gap: 25px;
    margin-top: 30px;
}

.vrl-detail-card {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.vrl-detail-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-color: #CC9966;
}

.vrl-detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #CC9966, #B8875A);
}

.vrl-detail-card h4 {
    margin: 0 0 20px 0;
    color: #CC9966;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vrl-detail-icon {
    width: 24px;
    height: 24px;
    background: #CC9966;
    border-radius: 6px;
    padding: 4px;
    color: white;
}

.vrl-detail-item {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f5f5f5;
}

.vrl-detail-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.vrl-detail-label {
    font-weight: 700;
    color: #555;
    margin-bottom: 6px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vrl-detail-value {
    color: #333;
    font-size: 16px;
    line-height: 1.4;
}

.vrl-error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    padding: 40px;
    border-radius: 16px;
    border: 2px solid #f44336;
    text-align: center;
    margin: 20px 0;
}

.vrl-error-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
    color: #f44336;
}

.vrl-error h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
}

.vrl-error p {
    margin: 0;
    font-size: 16px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .vrl-tracking-container {
        margin: 0 15px;
             border-radius: 9px;
    }
    
    .vrl-tracking-form {
        padding: 15px;
    }
    
    .vrl-tracking-title {
        font-size: 22px;
    }
    
    .vrl-input-section {
            display: flex;
    flex-direction: column;
    gap: 15px;
    }
    
   
    
    #vrl-tracking-number {
        padding: 16px 55px 16px 20px;
        font-size: 16px;
    }
    
    .vrl-track-btn {
        padding: 16px 25px;
        font-size: 16px;
    }
    
    .vrl-result {
        /* padding: 25px; */
    }
    
    .vrl-status-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        min-height: auto;
     padding: 19px;
    }
    
    .vrl-status-left {
        flex-direction: column;
        gap: 15px;
    }
    
    .vrl-status-right {
        text-align: center;
    }
    
    .vrl-status-title {
        font-size: 28px;
    }
    
    .vrl-details-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .vrl-detail-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .vrl-tracking-container {
        margin: 0 10px;
    }
    
    .vrl-tracking-form {
        padding: 15px;
    }
    
    .vrl-tracking-title {
        font-size: 20px;
        flex-direction: column;
        gap: 10px;
    }
    
    .vrl-result {
        /* padding: 20px; */
    }
    
    .vrl-status-card {
       padding: 19px;
    }
    
    .vrl-status-title {
        font-size: 24px;
    }
    
    .vrl-tracking-number {
        font-size: 20px;
    }
    
    .vrl-detail-card {
        padding: 15px;
    }
    
    .vrl-detail-card h4 {
        font-size: 16px;
    }
}

/* Large screens - better use of space */
@media (min-width: 1200px) {
    .vrl-details-grid {
        /* grid-template-columns: 1fr 1fr 1fr; */
        gap: 30px;
    }
    
    .vrl-status-card {
      padding: 19px;
    }
    
    .vrl-status-title {
        font-size: 36px;
    }
    
    .vrl-tracking-number {
        font-size: 28px;
    }
}

.vrl-track-btn:hover{
    color: black;
}
.vrl-track-btn:active , .vrl-track-btn:focus{
  background: white !important;
    color: #CC9966 !important;
}


/* Additional styles for new tracking format */

.vrl-tracking-history {
    grid-column: 1 / -1; /* Span full width */
}

.vrl-tracking-event {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid #ddd;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.vrl-tracking-event:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.vrl-tracking-event.delivered {
    border-left-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.vrl-tracking-event.in-transit {
    border-left-color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

.vrl-tracking-event.arrived {
    border-left-color: #17a2b8;
    background: rgba(23, 162, 184, 0.1);
}

.vrl-tracking-event.redirected {
    border-left-color: #fd7e14;
    background: rgba(253, 126, 20, 0.1);
}

.vrl-tracking-event.failed {
    border-left-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.vrl-tracking-event.pending {
    border-left-color: #6c757d;
    background: rgba(108, 117, 125, 0.1);
}

.vrl-tracking-event-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-right: 15px;
    margin-top: 2px;
}

.vrl-tracking-event-icon svg {
    width: 100%;
    height: 100%;
}

.vrl-tracking-event-details {
    flex: 1;
}

.vrl-tracking-event-status {
    font-weight: bold;
    font-size: 16px;
    color: #fff;
    margin-bottom: 5px;
}

.vrl-tracking-event-location {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 5px;
}

.vrl-tracking-event-desc {
    color: #aaa;
    font-size: 13px;
    margin-bottom: 5px;
    font-style: italic;
}

.vrl-tracking-event-time {
    color: #999;
    font-size: 12px;
}

.vrl-delivery-date {
    color: #28a745;
    font-size: 12px;
    font-weight: bold;
    margin-top: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .vrl-tracking-event {
        flex-direction: column;
        text-align: center;
    }
    
    .vrl-tracking-event-icon {
        margin-right: 0;
        margin-bottom: 10px;
        align-self: center;
    }
    
    .vrl-details-grid {
        grid-template-columns: 1fr;
    }
}

/* Enhanced status icons colors */
.vrl-tracking-event.delivered .vrl-tracking-event-icon svg {
    color: #28a745;
}

.vrl-tracking-event.in-transit .vrl-tracking-event-icon svg {
    color: #ffc107;
}

.vrl-tracking-event.arrived .vrl-tracking-event-icon svg {
    color: #17a2b8;
}

.vrl-tracking-event.redirected .vrl-tracking-event-icon svg {
    color: #fd7e14;
}

.vrl-tracking-event.failed .vrl-tracking-event-icon svg {
    color: #dc3545;
}

.vrl-tracking-event.pending .vrl-tracking-event-icon svg {
    color: #6c757d;
}

/* Transit Details table (new HTML API response) */
.vrl-transit-details .vrl-transit-table-wrap {
    overflow-x: auto;
    margin-top: 8px;
}
.vrl-transit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.vrl-transit-table th,
.vrl-transit-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.vrl-transit-table th {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}
.vrl-transit-table td {
    color: #e0e0e0;
}
.vrl-transit-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}
@media (max-width: 600px) {
    .vrl-transit-table { font-size: 12px; }
    .vrl-transit-table th, .vrl-transit-table td { padding: 8px; }
}

/* —— Sample design: Booking Details + Transit Details (stepper + table) —— */
.vrl-result-card {
    margin-top: 12px;
    background: #faf8f7;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.vrl-booking-card {
    background: #faf8f7;
}

.vrl-booking-header {
    background: #e67e22;
    color: #2c3e50;
    font-weight: 700;
    font-size: 15px;
    padding: 10px 16px;
}

.vrl-booking-body {
    padding: 16px;
    background: #faf8f7;
}

.vrl-booking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px 24px;
}

.vrl-booking-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vrl-booking-label {
    font-weight: 600;
    color: #555;
    font-size: 13px;
}

.vrl-booking-value {
    color: #333;
    font-size: 14px;
}

.vrl-transit-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 20px 16px 12px;
    padding-top: 8px;
    border-top: 1px solid #e0d5c9;
}

.vrl-transit-separator-text {
    background: #faf8f7;
    padding: 0 12px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.vrl-transit-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #610b02;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
}

.vrl-stepper-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 16px 20px;
    gap: 0;
}

/* Horizontal connector lines between steps (web) – like competitor */
.vrl-stepper-item {
    flex: 1;
    min-width: 70px;
    max-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

/* Line from left (from previous step) to center of current step */
.vrl-stepper-item:not(:first-child)::before {
    position: absolute;
    content: "";
    border-bottom: 2px solid #bdc3c7;
    width: 100%;
    top: 20px;
    left: -50%;
    z-index: 0;
}

.vrl-stepper-item.completed:not(:first-child)::before {
    border-bottom-color: #bf211e;
    border-bottom-width: 3px;
}

/* Line from center to right (to next step) when this step is completed */
.vrl-stepper-item.completed:not(:last-child)::after {
    position: absolute;
    content: "";
    border-bottom: 3px solid #bf211e;
    width: 100%;
    top: 20px;
    left: 50%;
    z-index: 1;
}

.vrl-stepper-item.active:not(:first-child)::before {
    border-bottom-color: #bdc3c7;
}

.vrl-step-counter-wrap {
    display: flex;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.vrl-step-counter {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.vrl-step-counter.vrl-step-square {
    border-radius: 6px;
}

.vrl-stepper-item.completed .vrl-step-counter {
    background: #c0392b;
}

.vrl-stepper-item.active .vrl-step-counter {
    background: #bdc3c7;
}

.vrl-step-icon {
    width: 18px;
    height: 18px;
    display: block;
    filter: brightness(0) invert(1);
}

.vrl-step-name {
    font-size: 11px;
    line-height: 1.3;
    color: #2c3e50;
}

.vrl-step-name .text-secondary,
.vrl-step-name.text-secondary {
    color: #95a5a6;
}

.vrl-step-date {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    color: #7f8c8d;
}

.vrl-transit-table-wrap {
    margin: 0 16px 16px;
    overflow-x: auto;
}

.vrl-transit-table-design {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.vrl-transit-table-design thead {
    background: #c0392b;
    color: #fff;
}

.vrl-transit-table-design th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
}

.vrl-transit-table-design tbody tr {
    background: #faf8f7;
}

.vrl-transit-table-design tbody tr:nth-child(even) {
    background: #f3efe9;
}

.vrl-transit-table-design td {
    padding: 10px 12px;
    color: #333;
    border-bottom: 1px solid #e8e0d8;
}

/* Responsive: sample design — desktop keeps horizontal stepper */
@media (max-width: 768px) {
    .vrl-booking-grid {
        grid-template-columns: 1fr;
    }
    
    .vrl-booking-row {
        flex-direction: row;
        align-items: baseline;
        gap: 6px;
        padding: 8px 0;
        border-bottom: 1px solid #e8e0d8;
    }
    
    .vrl-booking-row:last-of-type {
        border-bottom: none;
    }
    
    .vrl-booking-label {
        flex-shrink: 0;
    }
    
    .vrl-booking-value {
        flex: 1;
        word-break: break-word;
    }
    
    /* Vertical stepper on mobile */
    .vrl-stepper-wrapper {
        flex-direction: column;
        flex-wrap: nowrap;
        overflow: visible;
        justify-content: flex-start;
        padding-bottom: 16px;
        -webkit-overflow-scrolling: auto;
    }
    
    .vrl-stepper-line {
        display: none;
    }
    
    /* Hide horizontal connector pseudo-elements on mobile; vertical line only */
    .vrl-stepper-item::before,
    .vrl-stepper-item::after {
        display: none !important;
    }
    
    .vrl-stepper-item {
        flex: none;
        width: 100%;
        min-width: auto;
        max-width: none;
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
    }
    
    .vrl-step-counter-wrap {
        position: relative;
        padding-bottom: 4px;
    }
    
    .vrl-step-counter-wrap::after {
        content: '';
        position: absolute;
        left: 50%;
        top: 44px;
        bottom: -12px;
        width: 3px;
        background: #bdc3c7;
        transform: translateX(-50%);
    }
    
    .vrl-stepper-item.completed .vrl-step-counter-wrap::after {
        background: #c0392b;
    }
    
    .vrl-stepper-item:last-child .vrl-step-counter-wrap::after {
        display: none;
    }
    
    .vrl-step-counter {
        margin-bottom: 0;
    }
    
    .vrl-step-name {
        flex: 1;
        margin-left: 14px;
        font-size: 13px;
        padding-top: 4px;
    }
    
    .vrl-step-name .text-secondary,
    .vrl-step-name.text-secondary {
        color: #95a5a6;
    }
    
    .vrl-step-date {
        display: inline-block;
        margin-top: 4px;
        padding: 2px 8px;
        background: #c0392b;
        color: #fff;
        border-radius: 4px;
        font-size: 11px;
    }
    
    .vrl-transit-separator {
        margin-left: 12px;
        margin-right: 12px;
    }
    
    .vrl-transit-toggle {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .vrl-booking-grid {
        grid-template-columns: 1fr;
    }
    
    .vrl-booking-header {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .vrl-booking-body {
        padding: 12px;
    }
    
    .vrl-transit-table-design {
        font-size: 12px;
    }
    
    .vrl-transit-table-design th,
    .vrl-transit-table-design td {
        padding: 8px;
    }
}