/* Order tracking page ([order_tracking], template/order_tracking), root #wpot.
   Same language as the account pages: white cards, the site's main color in icons and
   buttons. The id outranks the theme's rules on forms, buttons and headings. */
#wpot {
    --wpot-accent: var(--main-color, var(--wd-primary-color, #e2125d));
    --wpot-text: #1f2937;
    --wpot-muted: #6b7280;
    --wpot-line: #eef0f3;
    --wpot-soft: #f7f8fa;
    --wpot-field: #e3e6eb;
    --wpot-ok: #0f9d58;
    --wpot-radius: 18px;
    container: wpot / inline-size;
    display: flex;
    flex-direction: column;
    gap: 22px;
    max-width: 920px;
    margin: 30px auto 50px;
    color: var(--wpot-text);
    font-size: 14px;
    line-height: 1.8;
    text-align: start;
}
#wpot *, #wpot *::before, #wpot *::after { box-sizing: border-box; }
#wpot :where(h1, h2, p, ul, ol, dl, dd) { margin: 0; padding: 0; }
#wpot :where(ul, ol) { list-style: none; }
#wpot :is(h1, h2)::before, #wpot :is(h1, h2)::after { content: none; display: none; }
#wpot svg { display: block; flex-shrink: 0; }
#wpot [hidden] { display: none !important; }
#wpot .woocommerce-Price-amount { color: inherit; font-weight: inherit; }
#wpot :is(a, button, input):focus-visible { outline: 2px solid color-mix(in srgb, var(--wpot-accent) 55%, #fff); outline-offset: 2px; }

/* Search */
#wpot .wpot-search { display: flex; flex-direction: column; gap: 20px; padding: 26px; border: 1px solid var(--wpot-line); border-radius: var(--wpot-radius); background-color: #fff; }
#wpot .wpot-search-head { display: flex; align-items: center; gap: 16px; }
#wpot .wpot-search-icon { display: grid; place-items: center; flex: 0 0 60px; width: 60px; height: 60px; border-radius: 18px; background-color: color-mix(in srgb, var(--wpot-accent) 10%, #fff); color: var(--wpot-accent); }
#wpot .wpot-search-icon svg { width: 28px; height: 28px; }
#wpot .wpot-search h1 { margin-bottom: 4px; color: var(--wpot-text); font-size: 22px; font-weight: 800; line-height: 1.5; }
#wpot .wpot-search-head p { color: var(--wpot-muted); font-size: 13.5px; line-height: 1.9; }
#wpot .wpot-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 14px; align-items: end; margin: 0; }
#wpot .wpot-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
#wpot .wpot-field > span:first-child { color: var(--wpot-text); font-size: 13px; font-weight: 600; }
#wpot .wpot-input { position: relative; display: flex; align-items: center; }
#wpot .wpot-input svg { position: absolute; inset-inline-start: 14px; width: 18px; height: 18px; color: var(--wpot-muted); pointer-events: none; }
#wpot .wpot-input input {
    width: 100%;
    height: 48px;
    min-height: 48px;
    margin: 0;
    padding: 0 44px 0 14px;
    border: 1px solid var(--wpot-field);
    border-radius: 12px;
    background-color: var(--wpot-soft);
    box-shadow: none;
    color: var(--wpot-text);
    font: inherit;
    font-size: 14px;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
#wpot .wpot-input input::placeholder { color: #9ca3af; }
#wpot .wpot-input input:focus { border-color: var(--wpot-accent); background-color: #fff; outline: 0; box-shadow: 0 0 0 4px color-mix(in srgb, var(--wpot-accent) 12%, transparent); }
#wpot .wpot-input input[aria-invalid="true"] { border-color: #dc2626; }
#wpot .wpot-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 170px; height: 48px; margin: 0; padding: 0 20px; border: 1px solid var(--wpot-accent); border-radius: 12px; background-color: var(--wpot-accent); box-shadow: none; color: #fff; font: inherit; font-size: 14px; font-weight: 700; line-height: 1; cursor: pointer; transition: background-color .2s; }
#wpot .wpot-btn svg { width: 18px; height: 18px; }
#wpot .wpot-btn:hover { background-color: color-mix(in srgb, var(--wpot-accent) 88%, #000); color: #fff; }
#wpot .wpot-btn.is-loading { pointer-events: none; opacity: .8; }
#wpot .wpot-btn.is-loading svg { animation: wpot-spin .8s linear infinite; }
@keyframes wpot-spin { to { transform: rotate(360deg); } }
#wpot .wpot-message { padding: 10px 14px; border: 1px solid #fecaca; border-radius: 12px; background-color: #fef2f2; color: #b91c1c; font-size: 13px; }
#wpot .wpot-safe { display: flex; align-items: center; gap: 6px; color: var(--wpot-muted); font-size: 12px; }
#wpot .wpot-safe svg { width: 15px; height: 15px; color: var(--wpot-ok); }

/* Result */
#wpot .wpot-result { display: flex; flex-direction: column; gap: 18px; animation: wpot-in .35s ease both; }
@keyframes wpot-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
#wpot .wpot-card { display: flex; flex-direction: column; gap: 16px; padding: 22px; border: 1px solid var(--wpot-line); border-radius: var(--wpot-radius); background-color: #fff; }
#wpot .wpot-card-title { display: flex; align-items: center; gap: 10px; color: var(--wpot-text); font-size: 15.5px; font-weight: 800; line-height: 1.5; }
#wpot .wpot-card-icon { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; background-color: color-mix(in srgb, var(--tone, var(--wpot-accent)) 11%, #fff); color: var(--tone, var(--wpot-accent)); }
#wpot .wpot-card-icon svg { width: 20px; height: 20px; }
#wpot .wpot-summary-head { display: flex; align-items: center; gap: 12px; }
#wpot .wpot-summary-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
#wpot .wpot-summary-title h2 { color: var(--wpot-text); font-size: 19px; font-weight: 800; line-height: 1.5; }
#wpot .wpot-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; background-color: color-mix(in srgb, var(--tone, var(--wpot-accent)) 12%, #fff); color: color-mix(in srgb, var(--tone, var(--wpot-accent)) 80%, #000); font-size: 12px; font-weight: 700; line-height: 1.6; white-space: nowrap; }
#wpot .wpot-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background-color: var(--tone, var(--wpot-accent)); }
#wpot .tone-blue { --tone: #3b82f6; }
#wpot .tone-green { --tone: #0f9d58; }
#wpot .tone-amber { --tone: #f59e0b; }
#wpot .tone-red { --tone: #dc2626; }
#wpot .tone-gray { --tone: #94a3b8; }
#wpot .tone-violet { --tone: #8b5cf6; }
#wpot .wpot-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#wpot .wpot-facts > div { min-width: 0; padding: 12px 14px; border-radius: 12px; background-color: var(--wpot-soft); }
#wpot .wpot-facts dt { margin-bottom: 2px; color: var(--wpot-muted); font-size: 11.5px; font-weight: 400; line-height: 1.6; }
#wpot .wpot-facts dd { overflow: hidden; font-size: 13.5px; font-weight: 700; line-height: 1.6; text-overflow: ellipsis; white-space: nowrap; }

/* Tracking steps (the same as one order's details in My Account) */
#wpot .wpot-track { display: flex; align-items: flex-start; }
#wpot .wpot-step { position: relative; display: flex; flex: 1 1 0; flex-direction: column; align-items: center; gap: 8px; min-width: 0; text-align: center; }
#wpot .wpot-step:not(:last-child)::after { content: ""; position: absolute; top: 21px; inset-inline-start: calc(50% + 26px); inset-inline-end: calc(-50% + 26px); height: 3px; border-radius: 3px; background-color: var(--wpot-line); transition: background-color .4s; }
#wpot .wpot-step.is-done:not(:last-child)::after { background-color: var(--wpot-ok); }
#wpot .wpot-step-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; overflow: hidden; border: 2px solid var(--wpot-line); border-radius: 50%; background-color: #fff; color: transparent; transition: border-color .3s, background-color .3s, box-shadow .3s; }
#wpot .wpot-step-dot svg { width: 20px; height: 20px; }
#wpot .wpot-step-dot img { width: 26px; height: 26px; object-fit: contain; opacity: .45; filter: grayscale(1); }
#wpot .wpot-step.is-done .wpot-step-dot { border-color: var(--wpot-ok); background-color: var(--wpot-ok); color: #fff; }
#wpot .wpot-step.is-done .wpot-step-dot img { opacity: 1; filter: brightness(0) invert(1); }
#wpot .wpot-step.is-current .wpot-step-dot { border-color: var(--wpot-accent); background-color: color-mix(in srgb, var(--wpot-accent) 10%, #fff); box-shadow: 0 0 0 5px color-mix(in srgb, var(--wpot-accent) 12%, transparent); }
#wpot .wpot-step.is-current .wpot-step-dot img { opacity: 1; filter: none; }
#wpot .wpot-step-text { display: flex; flex-direction: column; gap: 2px; }
#wpot .wpot-step-label { padding-inline: 4px; color: var(--wpot-muted); font-size: 12.5px; font-weight: 600; line-height: 1.6; }
#wpot .wpot-step.is-done .wpot-step-label { color: var(--wpot-text); }
#wpot .wpot-step.is-current .wpot-step-label { color: var(--wpot-accent); font-weight: 800; }
#wpot .wpot-step-tip { display: none; max-width: 190px; padding-inline: 4px; color: var(--wpot-muted); font-size: 11.5px; line-height: 1.7; }
#wpot .wpot-step.is-current .wpot-step-tip { display: block; }

/* Items */
#wpot .wpot-items { display: flex; flex-direction: column; }
#wpot .wpot-item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--wpot-line); }
#wpot .wpot-item:first-child { padding-top: 0; }
#wpot .wpot-item:last-child { padding-bottom: 0; border-bottom: 0; }
#wpot .wpot-item-image { display: grid; place-items: center; flex: 0 0 60px; width: 60px; height: 60px; overflow: hidden; border: 1px solid var(--wpot-line); border-radius: 14px; background-color: var(--wpot-soft); color: #c3c8d0; }
#wpot .wpot-item-image img { width: 100%; height: 100%; object-fit: cover; }
#wpot .wpot-item-image svg { width: 24px; height: 24px; }
#wpot .wpot-item-body { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
#wpot .wpot-item-name { font-size: 14px; font-weight: 700; line-height: 1.7; overflow-wrap: anywhere; }
#wpot .wpot-item-qty { color: var(--wpot-muted); font-size: 12px; }
#wpot .wpot-item-price { font-size: 14px; font-weight: 800; white-space: nowrap; }

/* Not found */
#wpot .wpot-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 44px 16px; border: 1px dashed #e3e6eb; border-radius: var(--wpot-radius); background-color: #fff; text-align: center; animation: wpot-in .35s ease both; }
#wpot .wpot-empty-icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 6px; border-radius: 20px; background-color: #fef2f2; color: #dc2626; }
#wpot .wpot-empty-icon svg { width: 30px; height: 30px; }
#wpot .wpot-empty strong { font-size: 15px; }
#wpot .wpot-empty p { max-width: 380px; color: var(--wpot-muted); font-size: 13px; }

/* Phone verification (the part of the order kept until the code is entered) */
#wpot .wpot-lock { --tone: #d97706; border-color: color-mix(in srgb, var(--tone) 28%, #fff); background-color: color-mix(in srgb, var(--tone) 4%, #fff); }
#wpot .wpot-lock-head { display: flex; align-items: flex-start; gap: 12px; }
#wpot .wpot-lock-head .wpot-card-icon { background-color: color-mix(in srgb, var(--tone) 13%, #fff); }
#wpot .wpot-lock-head h2 { margin-bottom: 2px; color: var(--wpot-text); font-size: 15.5px; font-weight: 800; line-height: 1.6; }
#wpot .wpot-lock-head p { color: var(--wpot-muted); font-size: 13px; line-height: 1.9; }
#wpot .wpot-lock-start { display: flex; }
#wpot .wpot-otp { display: grid; grid-template-columns: minmax(0, 260px) auto 1fr; gap: 10px 14px; align-items: end; margin: 0; }
#wpot .wpot-otp .wpot-input input { padding: 0 44px 0 14px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 17px; font-weight: 700; letter-spacing: 6px; text-align: center; background-color: #fff; }
#wpot .wpot-otp .wpot-input input::placeholder { font-family: inherit; font-size: 13px; font-weight: 400; letter-spacing: 0; }
#wpot .wpot-resend { justify-self: start; align-self: center; min-height: 0; margin: 0; padding: 4px 2px; border: 0; background: none; box-shadow: none; color: var(--wpot-accent); font: inherit; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-transform: none; cursor: pointer; }
#wpot .wpot-resend:hover { background: none; color: color-mix(in srgb, var(--wpot-accent) 80%, #000); }
#wpot .wpot-resend:disabled { color: var(--wpot-muted); text-decoration: none; cursor: default; }
#wpot .wpot-resend.is-loading { opacity: .6; }
#wpot .wpot-lock-msg { padding: 9px 13px; border: 1px solid #bbf7d0; border-radius: 12px; background-color: #f0fdf4; color: #15803d; font-size: 13px; }
#wpot .wpot-lock-msg.is-error { border-color: #fecaca; background-color: #fef2f2; color: #b91c1c; }

/* Shipping info (what the store sent by SMS) */
#wpot .wpot-ship-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
#wpot .wpot-ship-date { color: var(--wpot-muted); font-size: 12.5px; }
#wpot .wpot-ship-date:empty { display: none; }
#wpot .wpot-ship-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }
#wpot .wpot-ship-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 14px; border-radius: 12px; background-color: var(--wpot-soft); }
#wpot .wpot-ship-label { color: var(--wpot-muted); font-size: 12px; }
#wpot .wpot-ship-item strong { color: var(--wpot-text); font-size: 14px; font-weight: 600; }
#wpot .wpot-ship-copy { display: flex; align-items: stretch; justify-content: space-between; overflow: hidden; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 1px dashed color-mix(in srgb, var(--wpot-accent) 40%, #fff); border-radius: 10px; background-color: #fff; box-shadow: none; color: var(--wpot-text); font: inherit; line-height: 1.6; text-transform: none; cursor: pointer; transition: border-color .2s; }
#wpot .wpot-ship-code { display: flex; flex: 1; align-items: center; min-width: 0; overflow: hidden; padding: 7px 10px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; font-weight: 600; letter-spacing: .5px; text-overflow: ellipsis; white-space: nowrap; direction: ltr; unicode-bidi: isolate; }
#wpot .wpot-ship-copy-label { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; padding: 7px 10px; border-inline-start: 1px dashed var(--wpot-line); background-color: color-mix(in srgb, var(--wpot-accent) 6%, #fff); color: var(--wpot-accent); font-size: 12px; font-weight: 600; transition: background-color .2s, color .2s; }
#wpot .wpot-ship-copy-label svg { width: 14px; height: 14px; }
#wpot .wpot-ship-copy:hover { border-color: var(--wpot-accent); background-color: #fff; }
#wpot .wpot-ship-copy.is-copied { border-color: var(--wpot-ok); border-style: solid; }
#wpot .wpot-ship-copy.is-copied .wpot-ship-copy-label { background-color: color-mix(in srgb, var(--wpot-ok) 10%, #fff); color: var(--wpot-ok); }
#wpot .wpot-ship-call { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; background-color: var(--wpot-ok); color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; transition: filter .2s; }
#wpot .wpot-ship-call:hover { color: #fff; filter: brightness(1.08); }
#wpot .wpot-ship-call svg { width: 15px; height: 15px; }
#wpot .wpot-ship-call bdi { direction: ltr; }
#wpot .wpot-ship-hint { margin-top: -4px; color: var(--wpot-muted); font-size: 12px; }

@container wpot (max-width: 760px) {
    #wpot .wpot-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    #wpot .wpot-btn { grid-column: 1 / -1; }
    #wpot .wpot-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container wpot (max-width: 520px) {
    #wpot .wpot-form { grid-template-columns: minmax(0, 1fr); }
    #wpot .wpot-otp { grid-template-columns: minmax(0, 1fr); }
    #wpot .wpot-resend { justify-self: center; }
    #wpot .wpot-lock-start .wpot-btn { width: 100%; }
    /* Steps top to bottom. */
    #wpot .wpot-track { flex-direction: column; }
    #wpot .wpot-step { flex-direction: row; align-items: flex-start; gap: 12px; width: 100%; padding-bottom: 18px; text-align: start; }
    #wpot .wpot-step:last-child { padding-bottom: 0; }
    #wpot .wpot-step:not(:last-child)::after { top: 46px; bottom: 2px; inset-inline-start: 20px; inset-inline-end: auto; width: 3px; height: auto; }
    #wpot .wpot-step-text { padding-top: 10px; }
    #wpot .wpot-step-tip { max-width: none; }
}
@media (max-width: 600px) {
    #wpot { gap: 16px; margin: 16px auto 30px; }
    #wpot .wpot-search { padding: 20px 18px; }
    #wpot .wpot-search-icon { flex-basis: 48px; width: 48px; height: 48px; border-radius: 14px; }
    #wpot .wpot-search h1 { font-size: 18px; }
    #wpot .wpot-card { padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) {
    #wpot * { transition: none !important; animation: none !important; }
}
