/* Tema 3 — Sipariş sorgulama modal */
.t3-order-modal {
  --order-bg: #e6e9ed;
  --order-surface: #eceff3;
  --order-border: #cfd6de;
  --order-text: #0f172a;
  --order-muted: #64748b;
  --order-accent: #059669;
  --order-accent-dark: #047857;
  position: fixed;
  inset: 0;
  z-index: 410;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}
.t3-order-modal[hidden] { display: none !important; }
.t3-order-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}
.t3-order-dialog {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: min(90vh, 720px);
}
.t3-order-close {
  position: absolute;
  top: -10px;
  right: -10px;
  z-index: 5;
  width: 32px;
  height: 32px;
  border: 1px solid var(--order-border);
  border-radius: 50%;
  background: var(--order-surface);
  color: #475569;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.t3-order-close:hover {
  background: var(--order-bg);
  color: var(--order-text);
  transform: scale(1.05);
}

.t3-order-shell {
  width: 100%;
  max-height: min(90vh, 720px);
  overflow: auto;
  background: var(--order-bg);
  border: 1px solid var(--order-border);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.18);
}
.t3-order-view { padding: 1.35rem 1.35rem 1.5rem; }

.t3-order-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.t3-order-head-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--order-accent), var(--order-accent-dark));
  color: #fff;
}
.t3-order-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--order-text);
}
.t3-order-sub {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--order-muted);
}

.t3-order-form { display: flex; flex-direction: column; gap: 0.65rem; }
.t3-order-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}
.t3-order-input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--order-border);
  border-radius: 10px;
  background: #f8fafc;
  font: inherit;
  font-size: 0.92rem;
  color: var(--order-text);
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.t3-order-input:focus {
  outline: none;
  border-color: var(--order-accent);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
  background: #fff;
}
.t3-order-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--order-accent), var(--order-accent-dark));
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}
.t3-order-submit:hover:not(:disabled) {
  transform: translateY(-1px);
}
.t3-order-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.t3-order-hint {
  margin: 0.85rem 0 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #94a3b8;
}

.t3-order-msg {
  margin: 0.85rem 0 0;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
}
.t3-order-msg-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.t3-order-result-toolbar {
  margin-bottom: 0.85rem;
}
.t3-order-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--order-border);
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.t3-order-back-btn svg {
  transform: rotate(180deg);
}
.t3-order-back-btn:hover {
  border-color: #a7f3d0;
  color: var(--order-accent);
}

.t3-order-loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 0;
  font-size: 0.88rem;
  color: var(--order-muted);
}
.t3-order-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid #e2e8f0;
  border-top-color: var(--order-accent);
  border-radius: 50%;
  animation: t3-order-spin 0.7s linear infinite;
}
@keyframes t3-order-spin { to { transform: rotate(360deg); } }

.t3-order-detail { display: flex; flex-direction: column; gap: 0.85rem; }
.t3-order-hero {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--order-border);
}
.t3-order-hero-top { padding: 1rem 1.1rem; border-bottom: 1px solid #f1f5f9; }
.t3-order-hero-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--order-accent);
}
.t3-order-hero-no {
  margin: 0.25rem 0 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--order-text);
  word-break: break-all;
}
.t3-order-hero-meta {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.t3-order-status {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.t3-order-status-pending { background: #fef3c7; color: #b45309; }
.t3-order-status-processing { background: #e0f2fe; color: #0369a1; }
.t3-order-status-completed { background: #d1fae5; color: #047857; }
.t3-order-status-cancelled { background: #f3f4f6; color: #4b5563; }
.t3-order-status-refunded { background: #ede9fe; color: #6d28d9; }
.t3-order-date { font-size: 0.72rem; color: var(--order-muted); }

.t3-order-total-band {
  padding: 0.9rem 1.1rem;
  background: linear-gradient(135deg, var(--order-accent), var(--order-accent-dark));
  color: #fff;
}
.t3-order-total-label { margin: 0; font-size: 0.78rem; opacity: 0.9; }
.t3-order-total-val { margin: 0.2rem 0 0; font-size: 1.45rem; font-weight: 800; }

.t3-order-rows { padding: 0.35rem 1.1rem 0.85rem; font-size: 0.82rem; }
.t3-order-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #f8fafc;
}
.t3-order-row:last-child { border-bottom: none; }
.t3-order-row span:first-child { color: var(--order-muted); }
.t3-order-row span:last-child { color: var(--order-text); font-weight: 600; text-align: right; }
.t3-order-row-discount span:last-child { color: var(--order-accent); }

.t3-order-card {
  padding: 0.95rem 1rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--order-border);
}
.t3-order-card-title {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--order-text);
}
.t3-order-item {
  padding: 0.65rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.t3-order-item:last-child { border-bottom: none; padding-bottom: 0; }
.t3-order-item-cat {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--order-accent);
}
.t3-order-item-name {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--order-text);
}
.t3-order-item-meta {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--order-muted);
  line-height: 1.45;
}
.t3-order-item-price {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--order-accent);
}
.t3-order-item-target {
  margin-top: 0.45rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 0.75rem;
  color: #334155;
  word-break: break-all;
}
.t3-order-item-target strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  color: #94a3b8;
}
.t3-order-note {
  margin-top: 0.45rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 0.75rem;
  color: #92400e;
}
.t3-order-empty {
  padding: 1rem 0;
  text-align: center;
}
.t3-order-empty h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: var(--order-text);
}
.t3-order-empty p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--order-muted);
}

.t3-mobile-order-btn {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  background: #ecfdf5;
  color: #047857;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}
body.t3-order-open { overflow: hidden; }
