/* Thai Parcel Tracker v2 — tracking.css */

.tpt-wrap {
  max-width: 580px;
  margin: 2rem auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Thai', 'Helvetica Neue', sans-serif;
  color: #1a1a1a;
}

/* Header */
.tpt-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1.5rem;
}
.tpt-header-icon {
  font-size: 36px;
  line-height: 1;
  flex-shrink: 0;
}
.tpt-title {
  margin: 0 0 3px;
  font-size: 21px;
  font-weight: 700;
  color: #111;
  line-height: 1.2;
}
.tpt-subtitle {
  margin: 0;
  font-size: 13px;
  color: #888;
  line-height: 1.5;
}

/* Section label */
.tpt-section-label {
  font-size: 12px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}

/* Carriers */
.tpt-carriers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 1.25rem;
}
.tpt-carrier {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px 12px;
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, background .15s, transform .1s;
}
.tpt-carrier:hover {
  border-color: var(--carrier-color);
  background: var(--carrier-bg);
  transform: translateY(-1px);
}
.tpt-carrier.active {
  border-color: var(--carrier-color);
  background: var(--carrier-bg);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--carrier-color) 18%, transparent);
}
.tpt-carrier-emoji {
  font-size: 26px;
  line-height: 1;
}
.tpt-carrier-name {
  font-size: 11.5px;
  font-weight: 600;
  color: #444;
  text-align: center;
  line-height: 1.3;
}
.tpt-carrier.active .tpt-carrier-name {
  color: var(--carrier-color);
}
.tpt-carrier-check {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--carrier-color);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .15s, transform .15s;
}
.tpt-carrier-check svg { stroke: #fff; }
.tpt-carrier.active .tpt-carrier-check {
  opacity: 1;
  transform: scale(1);
}

/* Input */
.tpt-input-row {
  margin-bottom: .75rem;
}
.tpt-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.tpt-input-icon {
  position: absolute;
  left: 13px;
  stroke: #aaa;
  pointer-events: none;
  flex-shrink: 0;
}
.tpt-input {
  width: 100%;
  height: 48px;
  padding: 0 42px 0 40px;
  font-size: 15px;
  font-family: inherit;
  border: 1.5px solid #ddd;
  border-radius: 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  color: #111;
  background: #fff;
  letter-spacing: .3px;
}
.tpt-input:focus {
  border-color: #5b4ec8;
  box-shadow: 0 0 0 3px rgba(91,78,200,.12);
}
.tpt-input::placeholder { color: #bbb; }
.tpt-clear {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  transition: background .12s, color .12s;
}
.tpt-clear:hover { background: #f0f0f0; color: #555; }
.tpt-clear svg { stroke: currentColor; }

/* Error */
.tpt-error {
  background: #fff0ee;
  border: 1.5px solid #fbb;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #8a1e1e;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Track button */
.tpt-btn-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 50px;
  background: #5b4ec8;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 4px 14px rgba(91,78,200,.3);
  margin-bottom: .75rem;
}
.tpt-btn-track:hover {
  background: #4a3fbf;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(91,78,200,.35);
}
.tpt-btn-track:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(91,78,200,.2);
}
.tpt-btn-track svg { flex-shrink: 0; }
.tpt-arrow { margin-left: auto; opacity: .7; }

/* Note */
.tpt-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #aaa;
  margin: 0;
  line-height: 1.5;
}
.tpt-note svg { stroke: #ccc; flex-shrink: 0; }

/* Responsive */
@media (max-width: 480px) {
  .tpt-carriers { grid-template-columns: repeat(2, 1fr); }
  .tpt-title { font-size: 18px; }
}
