#pk-tracking-app {
  max-width: 500px;
  margin: 40px auto;
  padding: 28px 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1a1a1a;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 20px rgba(0,0,0,.12);
}

/* Force all text inside the app to stay dark regardless of Kadence theme */
#pk-tracking-app,
#pk-tracking-app h1,
#pk-tracking-app h2,
#pk-tracking-app h3,
#pk-tracking-app p {
  color: #1a1a1a;
}

#pk-tracking-app a[href*="wa.me"] {
  color: #25D366 !important;
}

.pk-track-header {
  text-align: center;
  margin-bottom: 32px;
}

.pk-track-logo {
  max-height: 64px;
  object-fit: contain;
}

.pk-track-brand {
  font-size: 26px;
  color: #C8102E;
  margin: 0;
}

/* State containers */
.pk-track-state {
  text-align: center;
  padding: 40px 20px;
}

.pk-track-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #eee;
  border-top-color: #C8102E;
  border-radius: 50%;
  animation: pk-spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes pk-spin {
  to { transform: rotate(360deg); }
}

.pk-track-icon {
  font-size: 52px;
  margin-bottom: 12px;
}

/* Order info */
.pk-track-order-info {
  text-align: center;
  margin-bottom: 28px;
}

.pk-track-greeting {
  font-size: 22px;
  margin-bottom: 4px;
}

.pk-track-number {
  font-size: 13px;
  color: #999;
}

/* Progress bar */
.pk-track-progress {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  -ms-flex-pack: justify;
  justify-content: space-between;
  margin: 0 0 28px;
}

.pk-track-step {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-flex: 0;
  -webkit-flex: 0 0 auto;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  gap: 6px;
}

.pk-track-step-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #eee;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;
  font-size: 20px;
  -webkit-transition: background 0.4s;
  transition: background 0.4s;
}

.pk-track-step.done .pk-track-step-icon {
  background: #C8102E;
}

.pk-track-step.active .pk-track-step-icon {
  background: #C8102E;
  box-shadow: 0 0 0 4px rgba(200,16,46,.15);
}

.pk-track-step-label {
  font-size: 11px;
  color: #bbb;
  text-align: center;
  max-width: 54px;
  line-height: 1.2;
}

.pk-track-step.done .pk-track-step-label,
.pk-track-step.active .pk-track-step-label {
  color: #C8102E;
  font-weight: 600;
}

.pk-track-line {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  -ms-flex: 1;
  flex: 1;
  height: 3px;
  background: #eee;
  margin: 0 4px;
  margin-top: -18px;
  -webkit-transition: background 0.4s;
  transition: background 0.4s;
}

.pk-track-line.done {
  background: #C8102E;
}

/* Status message */
.pk-track-status-msg {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  padding: 16px;
  border-radius: 12px;
  background: #fef3f3;
  color: #C8102E;
  margin-bottom: 16px;
  min-height: 54px;
}

.pk-track-status-msg.delivering {
  background: #fff7ed;
  color: #ea580c;
}

.pk-track-status-msg.delivered {
  background: #f0fdf4;
  color: #16a34a;
}

/* Cancelled */
.pk-track-cancelled {
  text-align: center;
  padding: 16px;
  color: #dc2626;
}

/* Refresh note */
.pk-track-refresh-note {
  text-align: center;
  font-size: 12px;
  color: #bbb;
  margin-top: 16px;
}

/* Manual lookup form (fallback when token is missing/invalid) */
.pk-track-lookup-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
  margin: 0 auto;
}

.pk-track-lookup-form input {
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid #ddd;
  border-radius: 10px;
  width: 100%;
  box-sizing: border-box;
}

.pk-track-lookup-form button {
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: #C8102E;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.pk-track-lookup-form button:disabled {
  opacity: .6;
  cursor: default;
}

.pk-track-lookup-error {
  color: #dc2626;
  font-size: 13px;
  margin: 0;
}

#pk-track-recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pk-track-recent-item {
  display: block;
  padding: 10px 14px;
  border: 1px solid #eee;
  border-radius: 10px;
  text-align: left;
  background: #fafafa;
  color: #1a1a1a;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}

.pk-track-recent-item:hover {
  background: #f3f3f3;
}
