/* ═══════════════════════════════════════════════
   VIP Order Tracker — vot.css
   Beautiful on mobile AND desktop
═══════════════════════════════════════════════ */

/* ── TRACK BUTTON ── */
#vot-btn-wrap { text-align: center; margin: 24px 0; }

#vot-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #4D148C;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 16px 40px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 6px 20px rgba(77,20,140,0.35);
}
#vot-open-btn:hover { background: #3a0f6e; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(77,20,140,0.4); }
#vot-open-btn svg { flex-shrink: 0; }

/* ── OVERLAY ── */
#vot-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0,0,0,0.72);
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(4px);
    animation: vot-fade 0.22s ease;
    box-sizing: border-box;
}
#vot-overlay[hidden] { display: none !important; }
@keyframes vot-fade { from { opacity:0; } to { opacity:1; } }

/* ── X CLOSE BUTTON ── */
#vot-close {
    position: fixed;
    z-index: 1000000;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #FF6200;
    border: 3px solid rgba(255,255,255,0.45);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 22px rgba(0,0,0,0.65);
    transition: background 0.15s, transform 0.15s;
}
#vot-close:hover { background: #d95200; transform: scale(1.1); }
#vot-close svg {
    stroke: #ffffff !important;
    fill: none !important;
    width: 22px !important;
    height: 22px !important;
    stroke-width: 3 !important;
    stroke-linecap: round !important;
}

/* ── MODAL ── */
#vot-modal {
    background: #fff;
    border-radius: 18px;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,0.4);
    animation: vot-up 0.28s cubic-bezier(0.34,1.1,0.64,1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    scrollbar-width: thin;
    scrollbar-color: #4D148C #f0f0f0;
}
#vot-modal::-webkit-scrollbar { width: 5px; }
#vot-modal::-webkit-scrollbar-track { background: #f0f0f0; }
#vot-modal::-webkit-scrollbar-thumb { background: #4D148C; border-radius: 3px; }
@keyframes vot-up {
    from { transform: translateY(24px) scale(0.98); opacity:0; }
    to   { transform: translateY(0) scale(1); opacity:1; }
}

/* ══ SEARCH SCREEN ══ */
#vot-search { padding: 48px 44px 44px; }
#vot-search-header { text-align: center; margin-bottom: 36px; }
#vot-search-header img { height: 56px; width: auto; object-fit: contain; }
#vot-search-header h2 { font-size: 24px; font-weight: 800; color: #111; margin: 16px 0 8px; letter-spacing: -0.3px; }
#vot-search-header p  { font-size: 15px; color: #777; margin: 0; }

#vot-input-row { display: flex; gap: 10px; }
#vot-input {
    flex: 1;
    padding: 15px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    color: #111;
    background: #fafafa;
}
#vot-input:focus { border-color: #4D148C; background: #fff; box-shadow: 0 0 0 3px rgba(77,20,140,0.1); }
#vot-track-btn {
    padding: 15px 32px;
    background: #FF6200;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, transform 0.1s;
    flex-shrink: 0;
}
#vot-track-btn:hover { background: #d95200; transform: translateY(-1px); }

#vot-error {
    margin-top: 14px;
    padding: 12px 16px;
    background: #fff3f3;
    border: 1px solid #f5c6c6;
    border-radius: 8px;
    color: #cc0000;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}

/* ══ RESULT SCREEN ══ */
#vot-result { padding: 0 0 40px; }
#vot-result-header {
    background: linear-gradient(135deg, #4D148C 0%, #6b1fb5 100%);
    padding: 18px 24px;
    border-radius: 18px 18px 0 0;
    display: flex;
    align-items: center;
    gap: 16px;
}
#vot-back {
    background: none;
    border: 1.5px solid rgba(255,255,255,0.45);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.15s;
    white-space: nowrap;
}
#vot-back:hover { background: rgba(255,255,255,0.15); }

/* Summary */
#vot-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 20px 24px 0;
    border: 1px solid #efefef;
    border-radius: 12px;
    overflow: hidden;
}
.vot-summary-item { padding: 16px 18px; background: #fafafa; }
.vot-summary-item:nth-child(odd)  { border-right: 1px solid #efefef; }
.vot-summary-item:nth-child(1),
.vot-summary-item:nth-child(2)    { border-bottom: 1px solid #efefef; }
.vot-summary-label { display: block; font-size: 10px; color: #999; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; font-weight: 700; }
.vot-summary-val   { display: block; font-size: 14px; color: #111; font-weight: 700; line-height: 1.4; }

.vot-status-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; color: #fff; background: #4D148C; }
.vot-status-badge.delivered        { background: #00823d; }
.vot-status-badge.out-for-delivery { background: #FF6200; }
.vot-status-badge.in-transit       { background: #1a51d4; }
.vot-status-badge.delayed          { background: #cc0000; }

/* Timeline */
#vot-timeline { padding: 28px 24px 0; }
#vot-timeline h3 { font-size: 11px; font-weight: 700; color: #bbb; text-transform: uppercase; letter-spacing: 1.2px; margin: 0 0 24px; }

.vot-step { display: flex; gap: 16px; position: relative; padding-bottom: 28px; }
.vot-step:last-child { padding-bottom: 0; }
.vot-step:not(:last-child)::before {
    content: ''; position: absolute;
    left: 11px; top: 26px; bottom: 0;
    width: 2px; background: #e8e8e8; border-radius: 1px;
}
.vot-step.done:not(:last-child)::before { background: #4D148C; }

.vot-step-dot {
    width: 24px; height: 24px;
    border-radius: 50%;
    border: 2.5px solid #ddd;
    background: #fff;
    flex-shrink: 0; margin-top: 2px;
    position: relative; z-index: 1;
    transition: all 0.25s ease;
}
.vot-step.done    .vot-step-dot { background: #4D148C; border-color: #4D148C; }
.vot-step.current .vot-step-dot { background: #FF6200; border-color: #FF6200; box-shadow: 0 0 0 5px rgba(255,98,0,0.15); animation: vot-pulse 2s ease infinite; }
@keyframes vot-pulse {
    0%,100% { box-shadow: 0 0 0 4px rgba(255,98,0,0.15); }
    50%      { box-shadow: 0 0 0 9px rgba(255,98,0,0.06); }
}
.vot-step.done .vot-step-dot::after {
    content: ''; position: absolute;
    top: 4px; left: 3px;
    width: 9px; height: 5px;
    border-left: 2px solid #fff; border-bottom: 2px solid #fff;
    transform: rotate(-45deg);
}

.vot-step-info { flex: 1; min-width: 0; padding-top: 1px; }
.vot-step-label { font-size: 14px; font-weight: 700; color: #ccc; margin-bottom: 4px; }
.vot-step.done    .vot-step-label { color: #111; }
.vot-step.current .vot-step-label { color: #FF6200; }
.vot-step-location { font-size: 12px; color: #666; margin-bottom: 2px; }
.vot-step-date     { font-size: 12px; color: #999; }

/* ══════════════════════════════
   DESKTOP — centered modal
══════════════════════════════ */
@media (min-width: 640px) {
    #vot-overlay {
        justify-content: center;
        align-items: center;
        padding: 40px 20px;
        padding-top: 40px;
    }
    #vot-modal {
        max-width: 620px;
        max-height: 88vh;
        height: auto;
        border-radius: 18px;
    }
    /* X button positioned by JS outside modal top-right */
    #vot-close {
        top: auto;
        right: auto;
    }
}

/* ══════════════════════════════
   MOBILE — bottom sheet style
══════════════════════════════ */
@media (max-width: 639px) {
    #vot-overlay {
        justify-content: flex-start;
        padding: 0;
        padding-top: 110px;
    }
    #vot-modal {
        width: 100%;
        height: calc(100vh - 110px);
        max-height: 100%;
        border-radius: 22px 22px 0 0;
        margin: 0;
    }
    #vot-close {
        top: 54px;
        right: 14px;
        width: 52px;
        height: 52px;
    }
    #vot-close svg { width: 21px !important; height: 21px !important; }
    #vot-search { padding: 32px 20px 28px; }
    #vot-search-header img { height: 44px; }
    #vot-search-header h2  { font-size: 20px; }
    #vot-search-header p   { font-size: 14px; }
    #vot-input-row  { flex-direction: column; gap: 10px; }
    #vot-input      { padding: 14px 16px; font-size: 16px; border-radius: 10px; }
    #vot-track-btn  { padding: 14px; font-size: 16px; width: 100%; }
    #vot-result-header { padding: 14px 16px; border-radius: 22px 22px 0 0; }
    #vot-summary    { margin: 16px 16px 0; }
    .vot-summary-item { padding: 12px 14px; }
    .vot-summary-val  { font-size: 13px; }
    #vot-timeline   { padding: 22px 18px 0; }
    .vot-step-label { font-size: 13px; }
}

/* ══ RESULT SCREEN REDESIGN ══ */

/* Header — purple bar with Back + logo + status */
#vot-result-header {
    background: linear-gradient(135deg, #4D148C 0%, #6b1fb5 100%) !important;
    padding: 16px 20px !important;
    border-radius: 18px 18px 0 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    flex-wrap: nowrap !important;
}
#vot-back {
    background: rgba(255,255,255,0.12) !important;
    border: 1.5px solid rgba(255,255,255,0.35) !important;
    color: #fff !important;
    padding: 8px 14px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    transition: background 0.15s !important;
}
#vot-back:hover { background: rgba(255,255,255,0.22) !important; }

#vot-result-logo { flex-shrink: 0; }

/* Status pill in header */
.vot-header-status-pill {
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 5px 14px !important;
    border-radius: 20px !important;
    background: rgba(255,255,255,0.2) !important;
    color: #fff !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}
.vot-header-status-pill.delivered        { background: #00823d !important; }
.vot-header-status-pill.out-for-delivery { background: #FF6200 !important; }
.vot-header-status-pill.in-transit       { background: rgba(41,171,226,0.8) !important; }
.vot-header-status-pill.delayed          { background: #cc0000 !important; }

/* Summary — clean list rows, NOT grid */
#vot-summary {
    display: flex !important;
    flex-direction: column !important;
    margin: 20px 20px 0 !important;
    border: 1px solid #efefef !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    grid-template-columns: unset !important;
}
.vot-summary-item {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 13px 16px !important;
    background: #fff !important;
    border-bottom: 1px solid #f5f5f5 !important;
    border-right: none !important;
}
.vot-summary-item:last-child { border-bottom: none !important; }
.vot-summary-label {
    font-size: 11px !important;
    color: #999 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    font-weight: 700 !important;
    flex-shrink: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 2px !important;
    width: 110px !important;
}
.vot-summary-val {
    font-size: 14px !important;
    color: #111 !important;
    font-weight: 600 !important;
    text-align: right !important;
    flex: 1 !important;
    line-height: 1.4 !important;
}

/* Status pill in summary */
.vot-status-pill {
    display: inline-block !important;
    padding: 4px 14px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #fff !important;
    background: #4D148C !important;
}
.vot-status-pill.delivered        { background: #00823d !important; }
.vot-status-pill.out-for-delivery { background: #FF6200 !important; }
.vot-status-pill.in-transit       { background: #1a51d4 !important; }
.vot-status-pill.delayed          { background: #cc0000 !important; }

/* Mobile result overrides */
@media (max-width: 639px) {
    #vot-result-header { border-radius: 22px 22px 0 0 !important; padding: 14px 16px !important; }
    #vot-summary { margin: 16px 16px 0 !important; }
    .vot-summary-label { width: 90px !important; font-size: 10px !important; }
    .vot-summary-val   { font-size: 13px !important; }
}

/* Desktop result overrides */
@media (min-width: 640px) {
    #vot-result-header { border-radius: 18px 18px 0 0 !important; }
    #vot-summary { margin: 24px 28px 0 !important; }
    .vot-summary-item { padding: 14px 20px !important; }
    .vot-summary-label { width: 120px !important; }
    #vot-timeline { padding: 28px 28px 0 !important; }
}
