/*
 * WooCommerce Delivery ETA & Shipping Notice - Final Perfect CSS
 * Version: 1.1.7 - Dynamic delivery dates
 */

/* Main ETA block - BASE BLUE (no date selected) */
.wc-eta-rs {
    display: block;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 1px solid #2196f3;
    border-left: 4px solid #1976d2;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: all 0.3s ease;
}

/* WAPF pozadine za različita stanja */
.wc-eta-rs.wapf-cannot {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border: 1px solid #ef4444;
    border-left: 4px solid #dc2626;
}

.wc-eta-rs.wapf-tight {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #eab308;
    border-left: 4px solid #d97706;
}

.wc-eta-rs.wapf-ok {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #10b981;
    border-left: 4px solid #059669;
}

/* Flex layout SAMO za tradicionalne ETA blokove sa truck ikonom */
.wc-eta-rs:not(.wc-eta-rs-timeline) {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* OVERRIDE za timeline - MORA BIT BLOCK NE FLEX! */
.wc-eta-rs-timeline {
    display: grid !important; /* Override .wc-eta-rs flex */
}

.wc-eta-rs-timeline-header {
    /* RED 1: Poruka centrirana - elegantan stil */
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    margin-bottom: 0; /* Uklonjen margin - grid gap će odrediti razmak */
}

.wc-eta-rs:hover {
    border-color: #1976d2;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.2);
}

/* Truck animation - BLUE BASE */
.wc-eta-rs-truck {
    width: 32px;
    height: 20px;
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    border-radius: 4px 4px 2px 2px;
    position: relative;
    flex-shrink: 0;
    animation: wc-eta-truck-drive 3s ease-in-out infinite;
}

.wc-eta-rs-truck::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 6px;
    width: 16px;
    height: 8px;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    border-radius: 3px 3px 0 0;
}

.wc-eta-rs-truck::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 4px;
    width: 8px;
    height: 8px;
    background: #424242;
    border-radius: 50%;
    box-shadow: 16px 0 0 #424242;
}

@keyframes wc-eta-truck-drive {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(3px) translateY(-1px); }
    50% { transform: translateX(6px) translateY(0); }
    75% { transform: translateX(3px) translateY(1px); }
}

/* Content area */
.wc-eta-rs-content {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.wc-eta-rs-main {
    font-weight: 600;
    font-size: 14px;
    color: #1565c0;
    line-height: 1.4;
    margin-bottom: 4px;
}

.wc-eta-rs-sub {
    font-size: 12px;
    color: #1976d2;
    line-height: 1.3;
    opacity: 0.8;
}

/* === DIRECT CONTENT STYLING (WAPF bez wrapper div-a) === */
.wc-eta-rs-content[data-wapf="direct"] {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: all 0.3s ease;

    /* Default base styling */
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 1px solid #2196f3;
    border-left: 4px solid #1976d2;
}

.wc-eta-rs-content[data-wapf="direct"] .wc-eta-rs-text {
    flex: 1;
    min-width: 0;
}

.wc-eta-rs-content[data-wapf="direct"] .wc-eta-rs-main {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 6px;
}

.wc-eta-rs-content[data-wapf="direct"] .wc-eta-rs-sub {
    font-size: 12px;
    line-height: 1.3;
    opacity: 0.9;
    margin-top: 6px;
}

/* WAPF DIRECT CONTENT - RISK LEVEL COLORS */
.wc-eta-rs-content[data-wapf="direct"].wc-eta-rs-risk-ok {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%) !important;
    border-color: #4caf50 !important;
    border-left-color: #2e7d32 !important;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15) !important;
}

.wc-eta-rs-content[data-wapf="direct"].wc-eta-rs-risk-ok .wc-eta-rs-main {
    color: #1b5e20 !important;
}

.wc-eta-rs-content[data-wapf="direct"].wc-eta-rs-risk-ok .wc-eta-rs-sub {
    color: #2e7d32 !important;
}

.wc-eta-rs-content[data-wapf="direct"].wc-eta-rs-risk-ok .wc-eta-rs-truck {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%) !important;
}

.wc-eta-rs-content[data-wapf="direct"].wc-eta-rs-risk-ok .wc-eta-rs-truck::before {
    background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%) !important;
}

.wc-eta-rs-content[data-wapf="direct"].wc-eta-rs-risk-tight {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%) !important;
    border-color: #ffc107 !important;
    border-left-color: #f57c00 !important;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2) !important;
    animation: subtle-pulse 3s infinite;
}

.wc-eta-rs-content[data-wapf="direct"].wc-eta-rs-risk-tight .wc-eta-rs-main {
    color: #e65100 !important;
}

.wc-eta-rs-content[data-wapf="direct"].wc-eta-rs-risk-tight .wc-eta-rs-sub {
    color: #f57c00 !important;
}

.wc-eta-rs-content[data-wapf="direct"].wc-eta-rs-risk-tight .wc-eta-rs-truck {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%) !important;
}

.wc-eta-rs-content[data-wapf="direct"].wc-eta-rs-risk-tight .wc-eta-rs-truck::before {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%) !important;
}

.wc-eta-rs-content[data-wapf="direct"].wc-eta-rs-risk-cannot_guarantee {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%) !important;
    border-color: #f44336 !important;
    border-left-color: #c62828 !important;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.2) !important;
    animation: warning-pulse 2s infinite;
}

.wc-eta-rs-content[data-wapf="direct"].wc-eta-rs-risk-cannot_guarantee .wc-eta-rs-main {
    color: #b71c1c !important;
}

.wc-eta-rs-content[data-wapf="direct"].wc-eta-rs-risk-cannot_guarantee .wc-eta-rs-sub {
    color: #c62828 !important;
}

.wc-eta-rs-content[data-wapf="direct"].wc-eta-rs-risk-cannot_guarantee .wc-eta-rs-truck {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%) !important;
}

.wc-eta-rs-content[data-wapf="direct"].wc-eta-rs-risk-cannot_guarantee .wc-eta-rs-truck::before {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%) !important;
}

/* === REGULAR WAPF TARGET COLORS (for non-direct content) === */
.wc-eta-rs-risk-ok {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%) !important;
    border-color: #4caf50 !important;
    border-left-color: #2e7d32 !important;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15) !important;
}

.wc-eta-rs-risk-ok .wc-eta-rs-main {
    color: #1b5e20 !important;
    font-weight: 700;
}

.wc-eta-rs-risk-ok .wc-eta-rs-sub {
    color: #2e7d32 !important;
    opacity: 0.9;
}

.wc-eta-rs-risk-ok .wc-eta-rs-truck {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%) !important;
}

.wc-eta-rs-risk-ok .wc-eta-rs-truck::before {
    background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%) !important;
}

.wc-eta-rs-risk-tight {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%) !important;
    border-color: #ffc107 !important;
    border-left-color: #f57c00 !important;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2) !important;
    animation: subtle-pulse 3s infinite;
}

.wc-eta-rs-risk-tight .wc-eta-rs-main {
    color: #e65100 !important;
    font-weight: 700;
}

.wc-eta-rs-risk-tight .wc-eta-rs-sub {
    color: #f57c00 !important;
    opacity: 0.9;
}

.wc-eta-rs-risk-tight .wc-eta-rs-truck {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%) !important;
}

.wc-eta-rs-risk-tight .wc-eta-rs-truck::before {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%) !important;
}

.wc-eta-rs-risk-cannot_guarantee {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%) !important;
    border-color: #f44336 !important;
    border-left-color: #c62828 !important;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.2) !important;
    animation: warning-pulse 2s infinite;
}

.wc-eta-rs-risk-cannot_guarantee .wc-eta-rs-main {
    color: #b71c1c !important;
    font-weight: 700;
}

.wc-eta-rs-risk-cannot_guarantee .wc-eta-rs-sub {
    color: #c62828 !important;
    opacity: 0.9;
}

.wc-eta-rs-risk-cannot_guarantee .wc-eta-rs-truck {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%) !important;
}

.wc-eta-rs-risk-cannot_guarantee .wc-eta-rs-truck::before {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%) !important;
}

/* Context variations - NO PINK ANYMORE */
.wc-eta-rs-product {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #2196f3;
    border-left-color: #1976d2;
}

.wc-eta-rs-product .wc-eta-rs-main {
    color: #1565c0;
}

.wc-eta-rs-product .wc-eta-rs-sub {
    color: #1976d2;
    opacity: 0.8;
}

.wc-eta-rs-cart {
    /* Green theme (same as checkout) */
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    border-color: #66bb6a;
    border-left-color: #2e7d32;
}

.wc-eta-rs-cart .wc-eta-rs-main {
    color: #2e7d32;
}

.wc-eta-rs-cart .wc-eta-rs-sub {
    color: #2e7d32;
    opacity: 0.8;
}

.wc-eta-rs-checkout {
    /* Standard (no WAPF) should be BLUE like the base */
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #2196f3;
    border-left-color: #1976d2;
    margin: 10px 0;
}

.wc-eta-rs-checkout .wc-eta-rs-main {
    color: #1565c0;
    font-size: 14px;
}

.wc-eta-rs-checkout .wc-eta-rs-sub {
    color: #1976d2;
    opacity: 0.8;
}

/* Enforce BLUE only when it's NOT a WAPF target (i.e., standard checkout) */
.wc-eta-rs-checkout:not(.wc-eta-rs-wapf-target) {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
    border-color: #2196f3 !important;
    border-left-color: #1976d2 !important;
}

.wc-eta-rs-checkout:not(.wc-eta-rs-wapf-target) .wc-eta-rs-main {
    color: #1565c0 !important;
}

.wc-eta-rs-checkout:not(.wc-eta-rs-wapf-target) .wc-eta-rs-sub {
    color: #1976d2 !important;
}

/* If some theme/plugin applies background/border on inner main block, clear it for standard checkout */
.wc-eta-rs-checkout:not(.wc-eta-rs-wapf-target) .wc-eta-rs-main {
    background: transparent !important;
    border: 0 !important;
}

.wc-eta-rs-compact {
    padding: 10px 15px;
    margin: 8px 0;
    min-height: auto;
}

.wc-eta-rs-compact .wc-eta-rs-main {
    font-size: 13px;
    margin-bottom: 0;
}

.wc-eta-rs-compact .wc-eta-rs-truck {
    width: 24px;
    height: 16px;
}

@keyframes subtle-pulse {
    0%, 100% { 
        box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2); 
    }
    50% { 
        box-shadow: 0 3px 12px rgba(255, 193, 7, 0.3); 
    }
}

@keyframes warning-pulse {
    0%, 100% { 
        box-shadow: 0 2px 8px rgba(244, 67, 54, 0.2);
        border-left-color: #c62828;
    }
    50% { 
        box-shadow: 0 4px 16px rgba(244, 67, 54, 0.4);
        border-left-color: #b71c1c;
    }
}

/* Responsive design */
@media (max-width: 600px) {
    .wc-eta-rs, .wc-eta-rs-content[data-wapf="direct"] {
        padding: 12px;
        gap: 10px;
    }

    .wc-eta-rs-truck {
        width: 28px;
        height: 18px;
    }

    .wc-eta-rs-main {
        font-size: 13px;
    }

    .wc-eta-rs-sub {
        font-size: 11px;
    }

    .wc-eta-rs-compact {
        padding: 8px 12px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wc-eta-rs-truck {
        animation: none;
    }

    .wc-eta-rs, .wc-eta-rs-content[data-wapf="direct"] {
        transition: none;
    }

    .wc-eta-rs-risk-cannot_guarantee,
    .wc-eta-rs-risk-tight,
    .wc-eta-rs-content[data-wapf="direct"].wc-eta-rs-risk-cannot_guarantee,
    .wc-eta-rs-content[data-wapf="direct"].wc-eta-rs-risk-tight {
        animation: none;
    }
}

/* Admin Styles for ETA Information */
.wc-eta-rs-admin-info {
    background: #f8f9fa !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 15px !important;
    margin-top: 20px !important;
}

.wc-eta-rs-admin-info h3 {
    margin-top: 0 !important;
    margin-bottom: 15px !important;
    color: #23282d !important;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

/* Dropdown/Toggle Styles */
.wc-eta-rs-header {
    user-select: none;
    transition: all 0.2s ease;
    border-radius: 4px;
    padding: 2px;
    margin: -2px;
}

.wc-eta-rs-header:hover {
    background-color: rgba(0, 115, 170, 0.08) !important;
}

.wc-eta-rs-toggle {
    font-size: 14px !important;
    color: #666 !important;
    font-weight: normal !important;
    transition: color 0.2s ease;
}

.wc-eta-rs-header:hover .wc-eta-rs-toggle {
    color: #0073aa !important;
}

.wc-eta-rs-details {
    animation: wc-eta-slide-down 0.3s ease-out;
}

@keyframes wc-eta-slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wc-eta-info-table {
    width: 100% !important;
    border-collapse: collapse !important;
}

.wc-eta-info-table tr {
    border-bottom: 1px solid #eee !important;
}

.wc-eta-info-table tr:last-child {
    border-bottom: none !important;
}

.wc-eta-info-table td {
    padding: 8px 0 !important;
    vertical-align: top !important;
}

.wc-eta-info-table td:first-child {
    font-weight: 600 !important;
    width: 180px !important;
}

/* Order list column styling */
.column-wc_eta_rs_delivery {
    width: 150px;
}

.wc-eta-rs-order-column {
    font-size: 11px !important;
    line-height: 1.4 !important;
}

.wc-eta-rs-order-column div {
    margin-bottom: 2px;
}

.wc-eta-rs-order-column strong {
    font-weight: 600 !important;
}

/* Meta box styling */
#wc_eta_rs_delivery_info .inside {
    padding: 10px !important;
}

#wc_eta_rs_delivery_info table {
    width: 100% !important;
    border-collapse: collapse !important;
}

#wc_eta_rs_delivery_info td {
    padding: 5px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

#wc_eta_rs_delivery_info td:first-child {
    font-weight: 600 !important;
    width: 70px !important;
}

/* Risk level indicators */
.wc-eta-risk-ok {
    color: #00a32a !important;
}

.wc-eta-risk-tight {
    color: #dba617 !important;
}

.wc-eta-risk-cannot_guarantee {
    color: #d63638 !important;
}

/* Timeline Design - DVA BLISKA REDA SA LEPŠIM IZGLEDOM */
.wc-eta-rs-timeline {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #0ea5e9;
    border-left: 4px solid #0ea5e9;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.1);
    
    /* CSS Grid za dva BLISKA reda */
    display: grid !important;
    grid-template-rows: auto auto !important;
    grid-template-columns: 1fr !important;
    gap: 15px !important; /* Smanjen gap sa 25px na 15px */
}

/* RED 1: Grid item - PUNA ŠIRINA */
.wc-eta-rs-timeline-row1 {
    grid-row: 1;
    grid-column: 1;
    justify-self: stretch; /* Puna širina kao na slici */
    align-self: start;
    width: 100%;
}

/* Poruka u prvom redu */
.wc-eta-rs-timeline-header {
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #0f172a;
    line-height: 1.3;
}

/* RED 2: Grid item - ISTA ŠIRINA KAO PORUKA */
.wc-eta-rs-timeline-row2 {
    grid-row: 2;
    grid-column: 1;
    justify-self: stretch; /* Umesto center - puna širina */
    align-self: start;
    width: 100%; /* Eksplicitno puna širina */
}

/* Timeline u drugom redu - PUNA ŠIRINA KAO PORUKA */
.wc-eta-rs-timeline-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    position: relative;
    padding: 0 10px; /* Malo padding da se ne lepi uz ivice */
    margin: 0;
    box-sizing: border-box;
}

/* FALLBACK za browsere bez Grid podrške */
@supports not (display: grid) {
    .wc-eta-rs-timeline {
        display: block !important;
    }
    
    .wc-eta-rs-timeline-row1 {
        display: block !important;
        margin-bottom: 15px !important;
        width: 100% !important;
    }
    
    .wc-eta-rs-timeline-row2 {
        display: block !important;
        width: 100% !important;
        clear: both !important;
    }
}

/* Poboljšanje za starije browsere - statičke linije */
@supports not (width: calc(50% + 25px)) {
    .wc-eta-rs-timeline-step:not(:last-child)::after {
        left: 60%;
        right: 10%;
        width: auto;
    }
}

/* Jedan korak u timeline - IKONA I TEKST CENTRIRAN */
.wc-eta-rs-timeline-step {
    flex: 1;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centriraj ikonu i tekst */
    padding: 0 5px;
    min-width: 80px;
}

/* SVI koraci - ikona i tekst uvek centrirani */
.wc-eta-rs-timeline-step:first-child,
.wc-eta-rs-timeline-step:nth-child(2),
.wc-eta-rs-timeline-step:last-child {
    align-items: center; /* Uvek centriraj sadržaj */
}

/* Timeline content - centriraj tekst pod ikonom */
.wc-eta-rs-timeline-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

/* Povezane linije između koraka - PRILAGOĐENO ŠIROKOM RASPOREDU */
.wc-eta-rs-timeline-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 25px; /* Centar ikone */
    left: calc(50% + 30px); /* Malo dalje od ikone */
    width: calc(100% - 60px); /* Širina do sledeće ikone */
    height: 2px;
    background: #cbd5e1;
    z-index: 1;
}

/* Prva linija (od prvog do drugog koraka) */
.wc-eta-rs-timeline-step:first-child::after {
    left: calc(50% + 35px);
    width: calc(100% - 35px);
}

/* Druga linija (od drugog do trećeg koraka) */
.wc-eta-rs-timeline-step:nth-child(2)::after {
    left: calc(50% + 30px);
    width: calc(100% - 60px);
}

.wc-eta-rs-timeline-step.completed:not(:last-child)::after {
    background: #10b981;
}

.wc-eta-rs-timeline-step.active:not(:last-child)::after {
    background: #0ea5e9;
}

/* Ikona */
.wc-eta-rs-timeline-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #10b981;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 20px;
}

.wc-eta-rs-timeline-step.active .wc-eta-rs-timeline-icon {
    background: #0ea5e9;
}

.wc-eta-rs-timeline-step.completed .wc-eta-rs-timeline-icon {
    background: #f59e0b;
}

/* Treća ikona - različite boje za WAPF ali isti poklon */
.wapf-cannot .wc-eta-rs-timeline-step:nth-child(3) .wc-eta-rs-timeline-icon {
    background: #ef4444;
}

.wapf-tight .wc-eta-rs-timeline-step:nth-child(3) .wc-eta-rs-timeline-icon {
    background: #eab308;
}

.wapf-ok .wc-eta-rs-timeline-step:nth-child(3) .wc-eta-rs-timeline-icon {
    background: #10b981;
}

/* Datum label - CENTRIRAN ISPOD IKONE */
.wc-eta-rs-timeline-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    text-align: center;
    width: 100%;
    /* Uklonio white-space: nowrap da se tekst može prelomiti ako treba */
}

/* Status tekst - CENTRIRAN ISPOD IKONE */
.wc-eta-rs-timeline-date {
    font-size: 13px;
    color: #1e293b;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    width: 100%;
    /* Uklonio white-space: nowrap da se tekst može prelomiti ako treba */
}

/* WAPF Timeline Variations - Compact */
.wc-eta-rs-timeline.wapf-ok {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #22c55e;
}

.wc-eta-rs-timeline.wapf-ok .wc-eta-rs-timeline-header {
    color: #16a34a;
}

.wc-eta-rs-timeline.wapf-tight {
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    border-color: #f59e0b;
}

.wc-eta-rs-timeline.wapf-tight .wc-eta-rs-timeline-header {
    color: #d97706;
}

.wc-eta-rs-timeline.wapf-cannot {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border-color: #ef4444;
}

.wc-eta-rs-timeline.wapf-cannot .wc-eta-rs-timeline-header {
    color: #dc2626;
}

/* Responsive - bliži redovi */
@media (max-width: 768px) {
    .wc-eta-rs-timeline {
        gap: 12px !important;
        padding: 16px;
    }
    
    .wc-eta-rs-timeline-header {
        font-size: 16px;
        padding: 8px 12px;
    }
    
    .wc-eta-rs-timeline-steps {
        padding: 0 8px;
        margin: 0;
    }
    
    .wc-eta-rs-timeline-step {
        padding: 0 3px;
        min-width: 60px;
    }
    
    .wc-eta-rs-timeline-content {
        align-items: center; /* Forće centriranje na tabletu */
    }
    
    .wc-eta-rs-timeline-step:not(:last-child)::after {
        top: 20px;
        left: calc(50% + 25px);
        width: calc(100% - 50px);
    }
    
    .wc-eta-rs-timeline-step:first-child::after {
        left: calc(50% + 20px);
        width: calc(100% - 20px);
    }
    
    .wc-eta-rs-timeline-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .wc-eta-rs-timeline {
        gap: 10px !important;
        padding: 14px;
    }
    
    .wc-eta-rs-timeline-header {
        font-size: 15px;
        padding: 6px 10px;
    }
    
    .wc-eta-rs-timeline-steps {
        padding: 0 5px;
        margin: 0;
    }
    
    .wc-eta-rs-timeline-step {
        padding: 0 1px;
        min-width: 50px;
    }
    
    .wc-eta-rs-timeline-content {
        align-items: center; /* Forće centriranje na mobilnom */
    }
    
    .wc-eta-rs-timeline-step:not(:last-child)::after {
        top: 17px;
        left: calc(50% + 20px);
        width: calc(100% - 40px);
    }
    
    .wc-eta-rs-timeline-step:first-child::after {
        left: calc(50% + 18px);
        width: calc(100% - 18px);
    }
    
    .wc-eta-rs-timeline-label {
        font-size: 9px;
    }
    
    .wc-eta-rs-timeline-date {
        font-size: 11px;
    }
    
    .wc-eta-rs-timeline-icon {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .wc-eta-rs-timeline-label {
        font-size: 10px;
    }
    
    .wc-eta-rs-timeline-date {
        font-size: 12px;
    }
}

/* Timeline Footer - Compact */
.wc-eta-rs-timeline-footer {
    text-align: center;
    margin-top: 10px;
    font-size: 10px;
    color: #64748b;
    font-style: italic;
    line-height: 1.3;
}

@media (max-width: 480px) {
    .wc-eta-rs-timeline-footer {
        font-size: 9px;
        margin-top: 8px;
    }
}

/* Bez animacija - jednostavno */

/* Prevent duplicates - only show one ETA block at a time */
.wc-eta-rs + .wc-eta-rs,
.wc-eta-rs-timeline + .wc-eta-rs,
.wc-eta-rs + .wc-eta-rs-timeline,
.wc-eta-rs-timeline + .wc-eta-rs-timeline {
    display: none !important;
}

/* But allow WAPF content to replace timeline */
.wc-eta-rs-content[data-wapf="direct"] + .wc-eta-rs-timeline,
.wc-eta-rs-timeline + .wc-eta-rs-content[data-wapf="direct"] {
    display: none !important;
}


