/* Universal Package Tracking Tool Scoped Styles */

:root {
  --uptt-primary: #0284c7;
  --uptt-primary-hover: #0369a1;
  --uptt-bg: #f8fafc;
  --uptt-card-bg: #ffffff;
  --uptt-border: #e2e8f0;
  --uptt-text: #0f172a;
  --uptt-muted: #64748b;
  --uptt-success-bg: #dcfce7;
  --uptt-success-text: #15803d;
  --uptt-delivery-bg: #e0f2fe;
  --uptt-delivery-text: #0369a1;
  --uptt-transit-bg: #fef3c7;
  --uptt-transit-text: #92400e;
}

body {
  margin: 0;
  line-height: 1.5;
}

.uptt-main {
  max-width: 980px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* Hero */
.uptt-hero-section {
  text-align: center;
  margin-bottom: 2rem;
}

.uptt-title {
  font-size: 2.15rem;
  font-weight: 800;
  color: var(--uptt-text);
  margin: 0 0 0.5rem;
  letter-spacing: -0.025em;
}

.uptt-subtitle {
  font-size: 1.05rem;
  color: var(--uptt-muted);
  max-width: 680px;
  margin: 0 auto;
}

/* Container */
.uptt-container {
  background: var(--uptt-card-bg);
  border: 1px solid var(--uptt-border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Search Card */
.uptt-search-card {
  margin-bottom: 1.5rem;
}

.uptt-search-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr auto;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  align-items: end;
}

@media (max-width: 768px) {
  .uptt-search-grid {
    grid-template-columns: 1fr;
  }
}

.uptt-search-col-num, .uptt-search-col-carrier, .uptt-search-col-btn {
  display: flex;
  flex-direction: column;
}

.uptt-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--uptt-text);
}

.uptt-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.uptt-input-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--uptt-muted);
  font-size: 1rem;
  pointer-events: none;
}

.uptt-text-input {
  width: 100%;
  padding: 0.75rem 0.85rem 0.75rem 2.4rem;
  font-size: 0.95rem;
  background: var(--uptt-bg);
  border: 1px solid var(--uptt-border);
  border-radius: 8px;
  color: var(--uptt-text);
  box-sizing: border-box;
  min-height: 44px;
}

.uptt-text-input:focus, .uptt-select:focus {
  outline: none;
  border-color: var(--uptt-primary);
}

.uptt-select {
  width: 100%;
  padding: 0.75rem 0.85rem;
  font-size: 0.95rem;
  background: var(--uptt-bg);
  border: 1px solid var(--uptt-border);
  border-radius: 8px;
  color: var(--uptt-text);
  min-height: 44px;
  box-sizing: border-box;
}

.uptt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 44px;
  transition: background-color 0.2s, border-color 0.2s;
  box-sizing: border-box;
  white-space: nowrap;
}

.uptt-btn-primary {
  background-color: var(--uptt-primary);
  color: #ffffff;
}

.uptt-btn-primary:hover {
  background-color: var(--uptt-primary-hover);
}

.uptt-btn-secondary {
  background-color: var(--uptt-bg);
  border-color: var(--uptt-border);
  color: var(--uptt-text);
}

.uptt-btn-secondary:hover {
  border-color: var(--uptt-primary);
  color: var(--uptt-primary);
}

.uptt-quick-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
}

.uptt-tag-label {
  color: var(--uptt-muted);
}

.uptt-sample-btn {
  background: var(--uptt-bg);
  border: 1px solid var(--uptt-border);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  color: var(--uptt-primary);
  cursor: pointer;
  min-height: 32px;
}

.uptt-sample-btn:hover {
  border-color: var(--uptt-primary);
}

/* Result Card */
.uptt-result-card {
  background: var(--uptt-bg);
  border: 1px solid var(--uptt-border);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.uptt-header-block {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.uptt-carrier-group {
  display: flex;
  flex-direction: column;
}

.uptt-carrier-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--uptt-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.uptt-status-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--uptt-text);
  margin: 0.2rem 0 0.4rem;
}

.uptt-track-meta {
  font-size: 0.85rem;
  color: var(--uptt-muted);
}

.uptt-delivery-window {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

@media (max-width: 600px) {
  .uptt-delivery-window {
    align-items: flex-start;
  }
}

.uptt-delivery-time-lbl {
  font-size: 0.75rem;
  color: var(--uptt-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.uptt-delivery-time-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--uptt-text);
}

.uptt-location-badge {
  font-size: 0.8rem;
  color: var(--uptt-muted);
  margin-top: 0.2rem;
}

/* Progress Strip */
.uptt-progress-strip {
  position: relative;
  padding: 1rem 0;
  margin-bottom: 1.25rem;
}

.uptt-steps-row {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.uptt-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
}

.uptt-step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--uptt-card-bg);
  border: 2px solid var(--uptt-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--uptt-muted);
  font-weight: 700;
}

.uptt-step-completed .uptt-step-circle {
  background: var(--uptt-success-bg);
  border-color: #16a34a;
  color: var(--uptt-success-text);
}

.uptt-step-active .uptt-step-circle {
  background: var(--uptt-delivery-bg);
  border-color: var(--uptt-primary);
  color: var(--uptt-primary);
  font-size: 1rem;
}

.uptt-step-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--uptt-text);
  text-align: center;
}

.uptt-progress-line-track {
  position: absolute;
  top: 26px;
  left: 10%;
  right: 10%;
  height: 4px;
  background: var(--uptt-border);
  z-index: 1;
  border-radius: 2px;
}

.uptt-progress-line-fill {
  height: 100%;
  width: 66%;
  background: var(--uptt-primary);
  border-radius: 2px;
  transition: width 0.3s;
}

/* Metrics Grid */
.uptt-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--uptt-border);
}

.uptt-metric-box {
  background: var(--uptt-card-bg);
  border: 1px solid var(--uptt-border);
  border-radius: 8px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
}

.uptt-metric-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--uptt-text);
}

.uptt-metric-lbl {
  font-size: 0.75rem;
  color: var(--uptt-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.2rem;
}

/* Tabs */
.uptt-nav-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--uptt-border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.uptt-tab-btn {
  background: none;
  border: none;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--uptt-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  min-height: 44px;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.uptt-tab-btn:hover {
  color: var(--uptt-text);
}

.uptt-tab-btn.uptt-tab-active {
  color: var(--uptt-primary);
  border-bottom-color: var(--uptt-primary);
}

.uptt-tab-panel {
  display: none;
}

.uptt-tab-panel.uptt-panel-active {
  display: block;
}

.uptt-timeline-card, .uptt-watchlist-card {
  background: var(--uptt-bg);
  border: 1px solid var(--uptt-border);
  border-radius: 10px;
  padding: 1.25rem;
}

.uptt-panel-heading {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--uptt-text);
  margin: 0 0 0.25rem;
}

.uptt-panel-intro {
  font-size: 0.85rem;
  color: var(--uptt-muted);
  margin: 0 0 1.25rem;
}

/* Timeline */
.uptt-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--uptt-border);
  margin-left: 0.5rem;
}

.uptt-tl-item {
  position: relative;
}

.uptt-tl-dot {
  position: absolute;
  left: -1.95rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--uptt-muted);
  border: 2px solid var(--uptt-card-bg);
}

.uptt-tl-latest .uptt-tl-dot {
  background: var(--uptt-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.25);
}

.uptt-tl-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.uptt-tl-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--uptt-muted);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.uptt-tl-time {
  font-weight: 600;
  color: var(--uptt-text);
}

.uptt-tl-loc {
  color: var(--uptt-muted);
}

.uptt-tl-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--uptt-text);
  margin: 0.1rem 0 0.15rem;
}

.uptt-tl-desc {
  font-size: 0.85rem;
  color: var(--uptt-muted);
  margin: 0;
}

/* Watchlist */
.uptt-watchlist-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.uptt-watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.uptt-watch-item {
  background: var(--uptt-card-bg);
  border: 1px solid var(--uptt-border);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.uptt-watch-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.uptt-watch-carrier {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--uptt-primary);
  text-transform: uppercase;
}

.uptt-watch-status {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
}

.uptt-status-delivery {
  background: var(--uptt-delivery-bg);
  color: var(--uptt-delivery-text);
}

.uptt-status-transit {
  background: var(--uptt-transit-bg);
  color: var(--uptt-transit-text);
}

.uptt-status-delivered {
  background: var(--uptt-success-bg);
  color: var(--uptt-success-text);
}

.uptt-watch-num {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.85rem;
  color: var(--uptt-text);
  word-break: break-all;
}

.uptt-watch-dest {
  font-size: 0.8rem;
  color: var(--uptt-muted);
}

.uptt-watch-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--uptt-border);
}

.uptt-watch-btn-view, .uptt-watch-btn-remove {
  background: none;
  border: none;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.uptt-watch-btn-view {
  color: var(--uptt-primary);
  font-weight: 600;
}

.uptt-watch-btn-remove {
  color: #b91c1c;
}

/* Toolbar */
.uptt-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--uptt-border);
  flex-wrap: wrap;
  gap: 1rem;
}

.uptt-toolbar-left {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.uptt-toolbar-right {
  display: flex;
  align-items: center;
}

.uptt-privacy-badge {
  font-size: 0.8rem;
  color: var(--uptt-muted);
}

/* Toast */
.uptt-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #0f172a;
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  z-index: 9999;
}

.uptt-toast-show {
  opacity: 1;
  transform: translateY(0);
}

/* Ad Slot Container (Strict min-height: 280px) */
.uptt-ad-container {
  min-height: 280px;
  background: var(--uptt-bg);
  border: 1px dashed var(--uptt-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
  color: var(--uptt-muted);
  font-size: 0.85rem;
}

/* Related Tools */
.uptt-related-section {
  margin: 2.5rem 0;
}

.uptt-related-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--uptt-text);
}

.uptt-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.uptt-related-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.15rem;
  background: var(--uptt-card-bg);
  border: 1px solid var(--uptt-border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--uptt-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.uptt-related-card:hover {
  border-color: var(--uptt-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.uptt-related-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--uptt-primary);
}

.uptt-related-desc {
  font-size: 0.825rem;
  line-height: 1.4;
  color: var(--uptt-muted);
}

/* Guide & FAQ */
.uptt-guide-section, .uptt-faq-section, .uptt-disclaimer {
  margin: 2.5rem 0;
}

.uptt-guide-section h2, .uptt-faq-section h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--uptt-text);
}

.uptt-guide-section h3, .uptt-faq-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem;
  color: var(--uptt-text);
}

.uptt-guide-section p, .uptt-guide-section ol, .uptt-faq-section p {
  color: var(--uptt-muted);
  font-size: 0.925rem;
  line-height: 1.6;
}

.uptt-guide-section ol {
  padding-left: 1.25rem;
}

.uptt-guide-section li {
  margin-bottom: 0.5rem;
}

.uptt-faq-item {
  border-bottom: 1px solid var(--uptt-border);
  padding: 1rem 0;
}

.uptt-disclaimer {
  background: var(--uptt-card-bg);
  border: 1px solid var(--uptt-border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  color: var(--uptt-muted);
}
/* tf:dark-palette — generated by migrate_chrome.py */
/* Neutrals inherit the shared chrome tokens so all tools share one
   ground; brand hues are kept and lightened, never inverted. */
[data-theme="dark"] {
  --uptt-primary: #81bcda;
  --uptt-primary-hover: #69aed4;
  --uptt-bg: var(--tf-surface);
  --uptt-card-bg: var(--tf-surface);
  --uptt-border: var(--tf-surface);
  --uptt-text: var(--tf-ink);
  --uptt-muted: var(--tf-ink-faint);
  --uptt-success-bg: var(--tf-surface);
  --uptt-success-text: #5ed089;
  --uptt-delivery-bg: var(--tf-surface);
  --uptt-delivery-text: #69aed4;
  --uptt-transit-bg: var(--tf-surface);
  --uptt-transit-text: #d38f66;
}
