/* ============================================================
   WooCommerce Order Tracker v2.0 — Modern Dark Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700&display=swap');

:root {
  --wot-bg:           #0f1117;
  --wot-surface:      #181c27;
  --wot-surface-2:    #1e2333;
  --wot-border:       rgba(255,255,255,0.07);
  --wot-accent:       #6c63ff;
  --wot-accent-glow:  rgba(108,99,255,0.35);
  --wot-success:      #22d3a0;
  --wot-success-glow: rgba(34,211,160,0.25);
  --wot-danger:       #ff5e6c;
  --wot-danger-glow:  rgba(255,94,108,0.20);
  --wot-text:         #e8eaf6;
  --wot-text-muted:   #6b7280;
  --wot-text-dim:     #374151;
  --wot-radius:       18px;
  --wot-radius-sm:    10px;
  --wot-font:         'Sora', sans-serif;
  --wot-shadow:       0 8px 40px rgba(0,0,0,0.45);
  --wot-transition:   0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Wrapper ── */
.wot-tracker-wrap {
  font-family: var(--wot-font);
  background: var(--wot-surface);
  border: 1px solid var(--wot-border);
  border-radius: var(--wot-radius);
  padding: 28px 28px 24px;
  margin: 28px 0;
  box-shadow: var(--wot-shadow);
  overflow: hidden;
  position: relative;
  animation: wot-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Decorative top gradient line */
.wot-tracker-wrap::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--wot-accent), var(--wot-success), var(--wot-accent));
  background-size: 200% 100%;
  animation: wot-shimmer 3s linear infinite;
  border-radius: var(--wot-radius) var(--wot-radius) 0 0;
}

/* ── Header ── */
.wot-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.wot-header-icon {
  width: 44px;
  height: 44px;
  background: var(--wot-surface-2);
  border: 1px solid var(--wot-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--wot-accent);
  animation: wot-spin-slow 8s linear infinite;
}

.wot-header-icon svg {
  width: 22px;
  height: 22px;
}

.wot-header-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.wot-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wot-text-muted);
}

.wot-current-status {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.wot-status--active  { color: var(--wot-accent); }
.wot-status--success { color: var(--wot-success); }
.wot-status--danger  { color: var(--wot-danger); }

.wot-progress-pill {
  background: var(--wot-surface-2);
  border: 1px solid var(--wot-border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--wot-text-muted);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

/* ── Progress Bar ── */
.wot-progress-bar-wrap {
  margin-bottom: 28px;
}

.wot-progress-bar {
  height: 5px;
  background: var(--wot-surface-2);
  border-radius: 999px;
  overflow: hidden;
}

.wot-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--wot-accent), var(--wot-success));
  border-radius: 999px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
  position: relative;
  box-shadow: 0 0 10px var(--wot-accent-glow);
}

.wot-progress-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--wot-success);
  box-shadow: 0 0 12px var(--wot-success-glow);
  animation: wot-pulse-dot 1.8s ease-in-out infinite;
}

/* ── Steps ── */
.wot-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.wot-step {
  display: flex;
  gap: 14px;
  animation: wot-fade-up 0.4s both;
}

.wot-step:nth-child(1) { animation-delay: 0.05s; }
.wot-step:nth-child(2) { animation-delay: 0.10s; }
.wot-step:nth-child(3) { animation-delay: 0.15s; }
.wot-step:nth-child(4) { animation-delay: 0.20s; }
.wot-step:nth-child(5) { animation-delay: 0.25s; }
.wot-step:nth-child(6) { animation-delay: 0.30s; }

/* Node column */
.wot-step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 36px;
}

.wot-step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  transition: var(--wot-transition);
  z-index: 1;
}

/* Done */
.wot-step--done .wot-step-circle {
  background: var(--wot-success);
  box-shadow: 0 0 0 4px var(--wot-success-glow);
}

.wot-icon-check {
  width: 16px;
  height: 16px;
  color: #0f1117;
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: wot-draw-check 0.5s ease forwards 0.3s;
}

/* Current */
.wot-step--current .wot-step-circle {
  background: var(--wot-accent);
  box-shadow: 0 0 0 4px var(--wot-accent-glow);
}

.wot-pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--wot-accent);
  opacity: 0.4;
  animation: wot-pulse-ring 1.8s ease-out infinite;
}

.wot-step-emoji {
  font-size: 16px;
  position: relative;
  z-index: 1;
}

/* Future */
.wot-step--future .wot-step-circle {
  background: var(--wot-surface-2);
  border: 2px solid var(--wot-border);
}

.wot-step-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--wot-text-dim);
}

/* Vertical line */
.wot-step-line {
  flex: 1;
  width: 2px;
  background: var(--wot-surface-2);
  margin: 4px 0;
  border-radius: 2px;
  overflow: hidden;
  min-height: 20px;
}

.wot-step-line-fill {
  width: 100%;
  height: 0;
  background: var(--wot-success);
  border-radius: 2px;
  transition: height 0.8s ease 0.5s;
}

.wot-step-line-fill--active {
  height: 100%;
}

/* Content */
.wot-step-content {
  padding: 7px 0 20px;
  min-width: 0;
}

.wot-step-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--wot-text);
  margin: 0 0 3px;
  line-height: 1.3;
  transition: var(--wot-transition);
}

.wot-step--future .wot-step-title {
  color: var(--wot-text-dim);
  font-weight: 400;
}

.wot-step--current .wot-step-title {
  color: var(--wot-accent);
}

.wot-step-desc {
  font-size: 12.5px;
  color: var(--wot-text-muted);
  margin: 0 0 6px;
  line-height: 1.5;
  max-width: 320px;
}

.wot-step-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--wot-text-muted);
  background: var(--wot-surface-2);
  border: 1px solid var(--wot-border);
  border-radius: 999px;
  padding: 3px 9px;
  letter-spacing: 0.02em;
}

.wot-step-time svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

/* ── Cancelled Block ── */
.wot-cancelled-block {
  background: rgba(255, 94, 108, 0.08);
  border: 1px solid rgba(255, 94, 108, 0.2);
  border-radius: var(--wot-radius-sm);
  padding: 14px 18px;
  margin-top: 8px;
}

.wot-cancelled-block p {
  margin: 0;
  font-size: 13.5px;
  color: var(--wot-danger);
}

/* ── History ── */
.wot-history {
  border-top: 1px solid var(--wot-border);
  margin-top: 8px;
  padding-top: 14px;
}

.wot-history-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--wot-font);
  font-size: 13px;
  font-weight: 500;
  color: var(--wot-text-muted);
  cursor: pointer;
  transition: color var(--wot-transition);
}

.wot-history-toggle:hover {
  color: var(--wot-text);
}

.wot-history-toggle svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.wot-chevron {
  margin-left: auto;
  transition: transform var(--wot-transition);
}

.wot-history-toggle[aria-expanded="true"] .wot-chevron {
  transform: rotate(180deg);
}

.wot-history-body {
  padding-top: 14px;
}

.wot-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wot-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.wot-timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wot-accent);
  flex-shrink: 0;
  margin-top: 5px;
}

.wot-timeline-item div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wot-timeline-item strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--wot-text);
}

.wot-timeline-item time {
  font-size: 11.5px;
  color: var(--wot-text-muted);
}

/* ── Animations ── */
@keyframes wot-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes wot-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

@keyframes wot-spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes wot-pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--wot-success-glow); }
  50%       { opacity: 0.6; box-shadow: 0 0 18px var(--wot-success-glow); }
}

@keyframes wot-pulse-ring {
  0%   { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(2.2); opacity: 0; }
}

@keyframes wot-draw-check {
  to { stroke-dashoffset: 0; }
}

/* ── Responsive ── */
@media (max-width: 540px) {
  .wot-tracker-wrap {
    padding: 20px 16px 18px;
    border-radius: 14px;
  }

  .wot-current-status {
    font-size: 15px;
  }

  .wot-step-desc {
    display: none;
  }
}

/* ── Light theme override (optional — uncomment if your theme is light) ── */
/*
.wot-tracker-wrap {
  --wot-bg:         #ffffff;
  --wot-surface:    #f8f9fb;
  --wot-surface-2:  #eef0f6;
  --wot-border:     rgba(0,0,0,0.08);
  --wot-text:       #111827;
  --wot-text-muted: #6b7280;
  --wot-text-dim:   #d1d5db;
}
*/
