/* ==========================================================================
   Order Tracking — Light Luxury Theme (Ninico)
   platform/themes/ninico/public/css/order-tracking.css

   IMPORTANT:
   - The tracking <form> (order_id/email fields, GET action) is untouched —
     only decorative wrapper markup and CSS surround it.
   - The order-detail partial (plugins/ecommerce::themes.includes.order-
     tracking-detail) is NOT edited at all. Its existing classes (bb-order-*)
     are restyled here via CSS only, scoped under .ot-page.
   ========================================================================== */

.ot-page {
    --ot-primary: #d51243;
    --ot-primary-2: #ff5878;
    --ot-primary-dark: #a80d34;
    --ot-primary-soft: rgba(213, 18, 67, 0.07);
    --ot-ink: #16151a;
    --ot-slate: #4b4b52;
    --ot-muted: #8a8a92;
    --ot-bg: #fafafa;
    --ot-border: #ececec;
    --ot-success: #16a34a;
    --ot-success-bg: #f0fdf4;
    --ot-warn: #d97706;
    --ot-warn-bg: #fffbeb;
    --ot-danger: #dc2626;
    --ot-danger-bg: #fef2f2;
    --ot-radius-lg: 28px;
    --ot-radius-md: 18px;
    --ot-radius-sm: 12px;
    --ot-shadow-sm: 0 4px 20px rgba(20, 20, 20, 0.05);
    --ot-shadow-md: 0 20px 50px rgba(20, 20, 20, 0.08);
    --ot-shadow-lg: 0 40px 90px rgba(20, 20, 20, 0.12);
    --ot-ease: cubic-bezier(.22, .61, .36, 1);

    position: relative;
    font-family: 'Jost', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ot-slate);
}
.ot-page * { box-sizing: border-box; }
.ot-page h1, .ot-page h2, .ot-page h3, .ot-page h4, .ot-page h5 { color: var(--ot-ink); font-weight: 600; }
.ot-page svg { display: block; }

.ot-container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.ot-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============================= HERO ================================ */
.ot-hero {
    position: relative; overflow: hidden; border-radius: var(--ot-radius-lg);
    padding: 54px 44px; margin-bottom: 40px; text-align: center;
    background: linear-gradient(135deg, #16151a 0%, #2a1420 45%, #3a0d1e 100%);
    background-size: 200% 200%; animation: ot-gradient-shift 12s ease infinite;
    color: #fff;
}
@keyframes ot-gradient-shift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.ot-hero__blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.4; animation: ot-blob-float 16s ease-in-out infinite; pointer-events: none; }
.ot-hero__blob--1 { width: 300px; height: 300px; background: var(--ot-primary); top: -100px; left: -70px; }
.ot-hero__blob--2 { width: 260px; height: 260px; background: #ff6b8b; bottom: -90px; right: -50px; animation-delay: -6s; }
@keyframes ot-blob-float { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(4%, -3%, 0) scale(1.08); } }
.ot-hero__inner { position: relative; z-index: 1; }
.ot-hero__badge {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 12px; font-weight: 600; letter-spacing: 0.04em; margin-bottom: 18px;
}
.ot-hero__badge svg { width: 14px; height: 14px; color: #ff8aa3; }
.ot-hero h1 { color: #fff; font-size: clamp(28px, 4vw, 40px); margin: 0 0 10px; }
.ot-hero p { color: rgba(255, 255, 255, 0.68); font-size: 15px; margin: 0; }

/* ---------- Split layout ---------- */
.ot-shell { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; align-items: start; margin-bottom: 48px; }

/* ---------- Left: illustration + feature cards ---------- */
.ot-side {
    position: relative; overflow: hidden; border-radius: var(--ot-radius-lg);
    padding: 44px 38px; background: linear-gradient(155deg, #fff5f7 0%, #ffeef2 45%, #fde4ea 100%);
    border: 1px solid rgba(213, 18, 67, 0.08); box-shadow: var(--ot-shadow-md);
}
.ot-side__glow { position: absolute; inset: -20%; background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.9) 0%, transparent 55%); pointer-events: none; }

.ot-illustration { position: relative; height: 160px; margin-bottom: 28px; }
.ot-truck {
    position: absolute; bottom: 18px; left: 0; color: var(--ot-primary);
    animation: ot-truck-move 6s ease-in-out infinite;
}
.ot-truck svg { width: 90px; height: 60px; }
@keyframes ot-truck-move { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(28px); } }
.ot-road { position: absolute; bottom: 12px; left: 0; right: 0; height: 2px; background: repeating-linear-gradient(90deg, rgba(213,18,67,0.3) 0 10px, transparent 10px 20px); }
.ot-package { position: absolute; color: var(--ot-primary); opacity: 0.7; animation: ot-package-float 5s ease-in-out infinite; }
.ot-package svg { width: 26px; height: 26px; }
.ot-package--1 { top: 8px; right: 20%; animation-delay: -1s; }
.ot-package--2 { top: 34px; right: 4%; animation-delay: -2.6s; }
.ot-package--3 { top: 0; right: 40%; animation-delay: -3.8s; }
@keyframes ot-package-float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-10px) rotate(8deg); } }

.ot-side h2 { font-size: clamp(24px, 2.8vw, 30px); margin: 0 0 10px; }
.ot-side p.ot-side__text { color: var(--ot-slate); font-size: 14.5px; line-height: 1.7; margin: 0 0 28px; max-width: 400px; }

.ot-feature-list { display: flex; flex-direction: column; gap: 14px; }
.ot-feature-card {
    display: flex; align-items: center; gap: 14px; background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--ot-radius-sm); padding: 14px 16px;
    transition: transform .3s var(--ot-ease), box-shadow .3s var(--ot-ease);
}
.ot-feature-card:hover { transform: translateY(-3px); box-shadow: var(--ot-shadow-sm); }
.ot-feature-card__icon {
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 12px; background: #fff; color: var(--ot-primary);
    box-shadow: var(--ot-shadow-sm);
}
.ot-feature-card__icon svg { width: 19px; height: 19px; }
.ot-feature-card h4 { font-size: 14px; margin: 0 0 2px; }
.ot-feature-card p { font-size: 12px; color: var(--ot-muted); margin: 0; }

/* ---------- Right: glass form card ---------- */
.ot-form-panel { display: flex; }
.ot-card {
    width: 100%; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8); border-radius: var(--ot-radius-lg);
    box-shadow: var(--ot-shadow-lg); padding: 40px 36px;
}
.ot-card__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 54px; height: 54px; border-radius: 16px; margin-bottom: 18px;
    background: var(--ot-primary-soft); color: var(--ot-primary);
}
.ot-card__icon svg { width: 24px; height: 24px; }
.ot-card h3 { font-size: 21px; margin: 0 0 8px; }
.ot-card__desc { color: var(--ot-muted); font-size: 13.5px; margin: 0 0 26px; line-height: 1.6; }

.ot-field-label {
    display: block; font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--ot-slate); margin-bottom: 8px;
}

/* Restyle the original .tptrack__id / .tptrack__email fields (untouched markup) */
.ot-page .tptrack__id, .ot-page .tptrack__email { margin-bottom: 20px !important; position: relative; }
.ot-page .tptrack__id > div, .ot-page .tptrack__email > div { position: relative; }
.ot-page .tptrack__id input, .ot-page .tptrack__email input {
    width: 100%; height: 56px; padding: 16px 16px 16px 46px; border-radius: var(--ot-radius-md);
    border: 1.5px solid var(--ot-border); background: rgba(250, 250, 250, 0.7);
    font-family: inherit; font-size: 14.5px; color: var(--ot-ink);
    transition: border-color .3s var(--ot-ease), box-shadow .3s var(--ot-ease), background .3s var(--ot-ease);
}
.ot-page .tptrack__id input:focus, .ot-page .tptrack__email input:focus {
    outline: none; border-color: var(--ot-primary); background: #fff;
    box-shadow: 0 0 0 4px rgba(213, 18, 67, 0.1);
}
.ot-page .tptrack__id span, .ot-page .tptrack__email span {
    position: absolute; left: 4px; top: 50%; transform: translateY(-50%);
    display: flex; align-items: center; justify-content: center; width: 38px; height: 38px;
    color: var(--ot-muted); z-index: 2; transition: color .3s var(--ot-ease);
}
.ot-page .tptrack__id > div:focus-within span, .ot-page .tptrack__email > div:focus-within span { color: var(--ot-primary); }

.ot-page .text-danger.small { display: block; margin: -12px 0 16px; font-size: 12.5px; color: var(--ot-danger); }

/* Submit button */
.ot-page .tptrack__btn { margin-top: 4px; }
.ot-page .tptrack__submition {
    position: relative; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; color: #fff; border: none;
    background: linear-gradient(135deg, var(--ot-primary-2), var(--ot-primary));
    background-size: 160% 160%;
    border-radius: 999px; padding: 17px 30px; font-size: 15px; font-weight: 600; cursor: pointer;
    transition: transform .35s var(--ot-ease), box-shadow .35s var(--ot-ease), background-position .5s var(--ot-ease);
}
.ot-page .tptrack__submition:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(213, 18, 67, 0.32); background-position: 100% 0%; }
.ot-page .tptrack__submition svg, .ot-page .tptrack__submition i { transition: transform .3s var(--ot-ease); }
.ot-page .tptrack__submition:hover svg, .ot-page .tptrack__submition:hover i { transform: translateX(4px); }
.ot-page .tptrack__submition.is-loading { pointer-events: none; opacity: 0.9; }
.ot-page .tptrack__submition .ot-spinner {
    display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff; border-radius: 50%; animation: ot-spin .7s linear infinite;
}
.ot-page .tptrack__submition.is-loading .ot-spinner { display: inline-block; }
.ot-page .tptrack__submition.is-loading .ot-btn-label { opacity: 0.7; }
@keyframes ot-spin { to { transform: rotate(360deg); } }
.ot-ripple { position: absolute; border-radius: 50%; transform: scale(0); animation: ot-ripple .6s var(--ot-ease); background: rgba(255,255,255,0.5); pointer-events: none; }
@keyframes ot-ripple { to { transform: scale(3); opacity: 0; } }

/* Not found alert (restyle original .text-danger from tracking.blade.php) */
.ot-page p.text-danger.mt-40 {
    text-align: left !important; background: var(--ot-danger-bg); color: var(--ot-danger);
    border: 1px solid #fecaca; border-radius: var(--ot-radius-md); padding: 16px 18px; font-size: 14px; margin-top: 24px !important;
}

/* ---------- Live status summary (built from real $order fields) ---------- */
.ot-status-card {
    position: relative; overflow: hidden; border-radius: var(--ot-radius-lg);
    background: linear-gradient(155deg, var(--ot-ink) 0%, #2a2730 100%);
    color: #fff; padding: 36px 34px; margin-bottom: 28px;
}
.ot-status-card__glow { position: absolute; inset: 0; background: radial-gradient(circle at 20% 20%, rgba(213,18,67,0.35) 0%, transparent 45%); pointer-events: none; }
.ot-status-card__inner { position: relative; z-index: 1; }
.ot-status-card__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.ot-status-badge {
    display: inline-flex; align-items: center; gap: 9px; padding: 9px 18px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 13.5px; font-weight: 700;
}
.ot-status-badge__dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; animation: ot-pulse 1.8s ease-in-out infinite; }
@keyframes ot-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.4); } }
.ot-status-card__code { font-size: 13px; color: rgba(255, 255, 255, 0.6); }
.ot-status-card__code strong { color: #fff; }

.ot-progress-track { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.12); overflow: hidden; margin-bottom: 10px; }
.ot-progress-fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--ot-primary-2), var(--ot-primary)); width: 0%; transition: width 1.2s var(--ot-ease); }
.ot-progress-label { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255, 255, 255, 0.55); margin-bottom: 24px; }

.ot-status-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ot-status-meta__item { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--ot-radius-sm); padding: 14px 16px; }
.ot-status-meta__label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255, 255, 255, 0.5); margin-bottom: 4px; }
.ot-status-meta__value { font-size: 14px; font-weight: 600; color: #fff; word-break: break-word; }
.ot-copy-btn {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 6px;
    background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.2); color: #fff;
    border-radius: 999px; padding: 5px 12px; font-size: 11.5px; font-weight: 600; cursor: pointer;
    transition: background .25s var(--ot-ease);
}
.ot-copy-btn:hover { background: rgba(255, 255, 255, 0.22); }
.ot-copy-btn svg { width: 12px; height: 12px; }
.ot-copy-btn.is-copied { background: var(--ot-success); border-color: var(--ot-success); }

/* =====================================================================
   RESTYLE: plugin-rendered order detail partial (bb-order-* classes)
   No blade edits — CSS overrides only, scoped under .ot-page
   ===================================================================== */
.ot-page .bb-order-detail-wrapper { display: flex; flex-direction: column; gap: 20px; }
.ot-page .bb-order-detail-wrapper .card {
    border: 1px solid var(--ot-border) !important; border-radius: var(--ot-radius-lg) !important;
    box-shadow: var(--ot-shadow-sm) !important; background: #fff;
}
.ot-page .bb-order-detail-wrapper .card-body { padding: 28px 26px !important; }
.ot-page .bb-section-title { font-size: 16px !important; color: var(--ot-ink) !important; padding-bottom: 12px; border-bottom: 1px solid var(--ot-border); margin-bottom: 16px !important; }

.ot-page .bb-order-info-list { display: flex; flex-direction: column; gap: 10px; }
.ot-page .bb-order-info-item { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 8px 0; border-bottom: 1px dashed var(--ot-border); }
.ot-page .bb-order-info-item:last-child { border-bottom: none; }
.ot-page .bb-order-info-item .label { color: var(--ot-muted); }
.ot-page .bb-order-info-item .value { color: var(--ot-ink); font-weight: 600; text-align: right; }

.ot-page .bb-order-product-cards { display: flex; flex-direction: column; gap: 14px; }
.ot-page .bb-order-product-card {
    border: 1px solid var(--ot-border); border-radius: var(--ot-radius-md); padding: 16px;
    transition: box-shadow .3s var(--ot-ease), border-color .3s var(--ot-ease);
}
.ot-page .bb-order-product-card:hover { box-shadow: var(--ot-shadow-sm); border-color: rgba(213,18,67,0.2); }
.ot-page .bb-order-product-card-content { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.ot-page .bb-order-product-card-image img { width: 76px; height: 76px; object-fit: cover; border-radius: var(--ot-radius-sm); border: 1px solid var(--ot-border); }
.ot-page .bb-order-product-card-details { flex: 1; min-width: 180px; }
.ot-page .bb-order-product-card-name { font-weight: 600; color: var(--ot-ink); font-size: 14.5px; }
.ot-page .bb-order-product-card-name a { color: var(--ot-ink); text-decoration: none; }
.ot-page .bb-order-product-card-name a:hover { color: var(--ot-primary); }
.ot-page .bb-order-product-card-sku { font-size: 12px; color: var(--ot-muted); margin-top: 2px; }
.ot-page .bb-order-product-card-meta { margin-top: 6px; font-size: 12.5px; color: var(--ot-muted); }
.ot-page .bb-order-product-card-info { margin-left: auto; }
.ot-page .bb-order-product-card-price { display: flex; flex-direction: column; gap: 3px; text-align: right; font-size: 12.5px; }
.ot-page .bb-order-product-card-price-item .label { color: var(--ot-muted); margin-right: 6px; }
.ot-page .bb-order-product-card-price-item.total .value { color: var(--ot-primary); font-weight: 700; font-size: 14px; }

.ot-page .bb-order-totals { border-top: 1px solid var(--ot-border); margin-top: 18px; padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.ot-page .bb-order-total-item { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ot-slate); }
.ot-page .bb-order-total-item.grand-total { font-size: 16px; font-weight: 700; color: var(--ot-ink); padding-top: 8px; border-top: 1px dashed var(--ot-border); }
.ot-page .bb-order-total-item.grand-total .value { color: var(--ot-primary); }

.ot-page .alert.alert-danger {
    background: var(--ot-danger-bg); color: var(--ot-danger); border: 1px solid #fecaca;
    border-radius: var(--ot-radius-md); padding: 16px 18px; font-size: 14px;
}

/* ---------- Scroll reveal ---------- */
[data-ot-anim] { opacity: 0; transform: translate3d(0, 22px, 0); transition: opacity .8s var(--ot-ease), transform .8s var(--ot-ease); }
[data-ot-anim="fade-left"] { transform: translate3d(-24px, 0, 0); }
[data-ot-anim="fade-right"] { transform: translate3d(24px, 0, 0); }
[data-ot-anim="zoom"] { transform: scale3d(0.94, 0.94, 1); }
[data-ot-anim].is-visible { opacity: 1; transform: translate3d(0, 0, 0) scale3d(1, 1, 1); }

@media (prefers-reduced-motion: reduce) {
    [data-ot-anim] { opacity: 1; transform: none; transition: none; }
    .ot-page * { animation: none !important; transition: none !important; }
}

/* ---------- FAQ / Help sections ---------- */
.ot-section { margin-bottom: 48px; }
.ot-section__head { text-align: center; max-width: 600px; margin: 0 auto 34px; }
.ot-eyebrow { display: inline-block; font-weight: 600; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ot-primary); margin-bottom: 10px; }
.ot-section__head h2 { font-size: clamp(22px, 3vw, 30px); margin: 0 0 8px; }
.ot-section__head p { color: var(--ot-muted); font-size: 14px; margin: 0; }

.ot-help-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ot-help-card {
    display: block; text-decoration: none; text-align: center; background: #fff; border: 1px solid var(--ot-border);
    border-radius: var(--ot-radius-md); padding: 22px 16px; box-shadow: var(--ot-shadow-sm);
    transition: transform .3s var(--ot-ease), box-shadow .3s var(--ot-ease);
}
.ot-help-card:hover { transform: translateY(-5px); box-shadow: var(--ot-shadow-md); }
.ot-help-card__icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ot-primary-soft); color: var(--ot-primary); margin-bottom: 10px; }
.ot-help-card__icon svg { width: 20px; height: 20px; }
.ot-help-card h4 { font-size: 13.5px; margin: 0; color: var(--ot-ink); }

.ot-faq-list { display: flex; flex-direction: column; max-width: 760px; margin: 0 auto; }
.ot-faq { border-bottom: 1px solid var(--ot-border); }
.ot-faq__trigger {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    background: none; border: none; padding: 18px 4px; font-family: inherit;
    font-weight: 600; font-size: 15px; color: var(--ot-ink); text-align: left; cursor: pointer;
}
.ot-faq__chevron { width: 18px; height: 18px; flex-shrink: 0; color: var(--ot-primary); transition: transform .35s var(--ot-ease); }
.ot-faq.is-open .ot-faq__chevron { transform: rotate(180deg); }
.ot-faq__panel { max-height: 0; overflow: hidden; transition: max-height .4s var(--ot-ease); }
.ot-faq__panel p { margin: 0 0 18px; padding: 0 4px; color: var(--ot-muted); font-size: 13.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .ot-shell { grid-template-columns: 1fr; }
    .ot-side { order: 2; }
    .ot-status-meta { grid-template-columns: 1fr; }
    .ot-help-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .ot-hero { padding: 40px 24px; border-radius: var(--ot-radius-md); }
    .ot-side, .ot-card { padding: 28px 22px; border-radius: var(--ot-radius-md); }
    .ot-help-grid { grid-template-columns: 1fr 1fr; }
    .ot-page .bb-order-product-card-info { margin-left: 0; width: 100%; }
    .ot-page .bb-order-product-card-price { text-align: left; }
}

/* Sticky track button on small screens */
@media (max-width: 480px) {
    .ot-page .tptrack__btn { position: sticky; bottom: 12px; z-index: 6; }
}