/**
 * Global Fotos Order Tracking — Frontend CSS
 * Version: 2.0.0
 */

/* ── Wrapper ──────────────────────────────────────────────────────────────── */
.gf-ot-wrap {
  max-width: 560px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 15px;
  color: #1d2327;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.gf-ot-header {
  text-align: center;
  padding: 32px 24px 20px;
  background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
  border-radius: 12px 12px 0 0;
  color: #fff;
}
.gf-ot-header-icon { font-size: 40px; margin-bottom: 8px; }
.gf-ot-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}
.gf-ot-subtitle {
  margin: 0;
  font-size: 13px;
  opacity: 0.8;
}

/* ── Form wrap ────────────────────────────────────────────────────────────── */
.gf-ot-form-wrap {
  padding: 24px;
  background: #fff;
  border: 1px solid #dcdcde;
  border-top: none;
}
.gf-ot-input-group {
  display: flex;
  gap: 8px;
}
.gf-ot-input {
  flex: 1;
  padding: 12px 16px;
  font-size: 15px;
  border: 2px solid #dcdcde;
  border-radius: 8px;
  outline: none;
  transition: border-color .15s;
  min-width: 0;
}
.gf-ot-input:focus { border-color: #0073aa; }
.gf-ot-form-help {
  margin: 8px 0 0;
  font-size: 12px;
  color: #72777c;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.gf-ot-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
.gf-ot-btn-primary {
  background: #0073aa;
  color: #fff !important;
}
.gf-ot-btn-primary:hover {
  background: #005a87;
  transform: translateY(-1px);
}
.gf-ot-btn-icon { font-size: 16px; }

/* ── Notices ─────────────────────────────────────────────────────────────── */
.gf-ot-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 8px;
  margin: 0 24px 16px;
  font-size: 14px;
  background: #f8f9fa;
  border: 1px solid #dcdcde;
}
.gf-ot-notice-error {
  background: #fdecea;
  border-color: #f5c6c6;
  color: #c0392b;
}
.gf-ot-notice-info {
  background: #e8f4fd;
  border-color: #b8d8f0;
  color: #1a5276;
}
.gf-ot-notice-warning {
  background: #fef9e7;
  border-color: #f7d070;
  color: #7d6608;
}
.gf-ot-notice-icon { flex-shrink: 0; }

/* ── AJAX result visibility ───────────────────────────────────────────────── */
.gf-ot-ajax-result { min-height: 0; }
.gf-ot-result-visible { animation: gfOtFadeIn .25s ease; }
@keyframes gfOtFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Result card ─────────────────────────────────────────────────────────── */
.gf-ot-result {
  background: #fff;
  border: 1px solid #dcdcde;
  border-top: none;
  padding: 0 24px 24px;
}
.gf-ot-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 14px;
  border-bottom: 1px solid #eee;
  flex-wrap: wrap;
  gap: 8px;
}
.gf-ot-result-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1d2327;
}

/* ── Status badge ─────────────────────────────────────────────────────────── */
.gf-ot-status-badge {
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
}
.gf-ot-status-pending    { background: #fff3cd; color: #856404; }
.gf-ot-status-packed     { background: #e8d5f5; color: #6a1d8a; }
.gf-ot-status-dispatched { background: #d1ecf1; color: #0c5460; }
.gf-ot-status-delivered  { background: #d4edda; color: #155724; }

/* ── Details grid ─────────────────────────────────────────────────────────── */
.gf-ot-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 18px 0;
}
@media (max-width: 400px) {
  .gf-ot-details-grid { grid-template-columns: 1fr; }
}
.gf-ot-detail {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.gf-ot-detail-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #72777c;
  font-weight: 600;
}
.gf-ot-detail-value {
  font-size: 15px;
  font-weight: 600;
  color: #1d2327;
}
.gf-ot-detail-value code {
  font-family: monospace;
  font-size: 13px;
  background: #f6f7f7;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── Notes ───────────────────────────────────────────────────────────────── */
.gf-ot-notes {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.gf-ot-notes p { margin: 4px 0 0; font-size: 14px; }

/* ── Timeline ─────────────────────────────────────────────────────────────── */
.gf-ot-timeline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  margin: 20px 0;
  padding: 0 8px;
}
.gf-ot-timeline::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 8px;
  right: 8px;
  height: 2px;
  background: #dcdcde;
  z-index: 0;
}
.gf-ot-timeline-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}
.gf-ot-timeline-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #dcdcde;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #dcdcde;
  transition: all .2s;
}
.gf-ot-step-done .gf-ot-timeline-dot {
  background: #46b450;
  box-shadow: 0 0 0 2px #46b450;
}
.gf-ot-step-current .gf-ot-timeline-dot {
  background: #0073aa;
  box-shadow: 0 0 0 2px #0073aa;
  animation: gf-pulse 1.5s ease infinite;
}
@keyframes gf-pulse {
  0%, 100% { box-shadow: 0 0 0 2px #0073aa; }
  50%       { box-shadow: 0 0 0 6px rgba(0,115,170,.2); }
}
.gf-ot-timeline-label {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  color: #72777c;
}
.gf-ot-step-current .gf-ot-timeline-label { color: #0073aa; }
.gf-ot-step-done    .gf-ot-timeline-label { color: #46b450; }

/* ── Actions ─────────────────────────────────────────────────────────────── */
.gf-ot-actions { text-align: center; margin: 18px 0 0; }

/* ── QR ─────────────────────────────────────────────────────────────────── */
.gf-ot-qr-wrap {
  text-align: center;
  padding: 20px 0 0;
  border-top: 1px solid #eee;
  margin-top: 18px;
}
.gf-ot-qr-label { font-size: 12px; color: #72777c; margin: 0 0 8px; }
.gf-ot-qr-img { border: 2px solid #eee; border-radius: 6px; padding: 4px; }

/* ── WhatsApp ───────────────────────────────────────────────────────────── */
.gf-ot-whatsapp-wrap {
  text-align: center;
  padding: 18px 24px;
  background: #fff;
  border: 1px solid #dcdcde;
  border-top: none;
  border-radius: 0 0 12px 12px;
}
.gf-ot-whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #25d366;
  color: #fff !important;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  text-decoration: none !important;
  transition: background .15s;
}
.gf-ot-whatsapp-btn:hover { background: #1ebe5d; }

/* ── Live Courier Tracking (embedded) ─────────────────────────────────── */
.gf-ot-live-tracking {
  margin-top: 18px;
  border-top: 1px solid #eee;
  padding-top: 18px;
}

.gf-ot-live-tracking-header {
  text-align: center;
  margin-bottom: 12px;
}
.gf-ot-live-tracking-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #1d2327;
  letter-spacing: .2px;
}

.gf-ot-live-tracking-iframe-wrap {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #dcdcde;
  background: #fff;
}

.gf-ot-live-tracking-iframe {
  width: 100%;
  height: 900px;
  border: 0;
  display: block;
  border-radius: 12px;
}

.gf-ot-live-tracking-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 16px;
}

.gf-ot-live-tracking-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid #dcdcde;
  border-top-color: #0073aa;
  animation: gfOtSpin .9s linear infinite;
}

@keyframes gfOtSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.gf-ot-live-tracking-fallback-actions {
  margin-top: 10px;
  text-align: center;
}

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .gf-ot-header { padding: 24px 16px 16px; }
  .gf-ot-form-wrap { padding: 16px; }
  .gf-ot-input-group { flex-direction: column; }
  .gf-ot-btn-primary { width: 100%; justify-content: center; }
  .gf-ot-result { padding: 0 16px 16px; }
  .gf-ot-notice { margin: 0 16px 12px; }
  .gf-ot-whatsapp-wrap { padding: 14px 16px; }

  .gf-ot-live-tracking-iframe { height: 720px; }
}

