/* ============================================================
   ORDER TRACKING (Sipariş Takibi) — order-tracking.css
============================================================ */

.ot-page {
    min-height: 60vh;
    padding: 20px 0 60px;
    background: var(--bg-page, #fafafa);
}

.ot-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ─────────────── HEADER ─────────────── */
.ot-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px 24px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.ot-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 600;
    color: var(--text, #1f2937);
}

.ot-order-no {
    margin: 0 0 4px;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--primary, #f97316);
}

.ot-date {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted, #6b7280);
}

.ot-date-icon { width: 14px; height: 14px; }

/* Status badge */
.ot-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
}

.ot-status-badge-icon { width: 18px; height: 18px; }

.ot-status-gray  { background: #f3f4f6; color: #4b5563; }
.ot-status-blue  { background: #dbeafe; color: #1e40af; }
.ot-status-amber { background: #fef3c7; color: #92400e; }
.ot-status-green { background: #d1fae5; color: #065f46; }
.ot-status-red   { background: #fee2e2; color: #991b1b; }

/* ─────────────── TIMELINE STEPPER ─────────────── */
.ot-timeline {
    margin-bottom: 24px;
    padding: 24px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.ot-timeline-list {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    gap: 8px;
}

/* Bağlantı çizgisi */
.ot-timeline-list::before {
    content: '';
    position: absolute;
    top: 22px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: var(--border, #e5e7eb);
    z-index: 0;
}

.ot-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.ot-step-marker {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--border, #e5e7eb);
    color: var(--text-muted, #9ca3af);
    transition: all 200ms ease;
    margin-bottom: 8px;
}

.ot-step-icon { width: 20px; height: 20px; }

.ot-step-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted, #6b7280);
    line-height: 1.3;
    max-width: 80px;
}

.ot-step.is-done .ot-step-marker {
    background: var(--success, #16a34a);
    border-color: var(--success, #16a34a);
    color: #fff;
}

.ot-step.is-done .ot-step-label {
    color: var(--text, #1f2937);
    font-weight: 600;
}

.ot-step.is-current .ot-step-marker {
    background: var(--primary, #f97316);
    border-color: var(--primary, #f97316);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, .18);
    animation: ot-pulse 2s ease-in-out infinite;
}

.ot-step.is-current .ot-step-label {
    color: var(--primary, #f97316);
    font-weight: 700;
}

@keyframes ot-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(249, 115, 22, .18); }
    50%      { box-shadow: 0 0 0 8px rgba(249, 115, 22, .08); }
}

/* ─────────────── GRID (Main + Sidebar) ─────────────── */
.ot-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
}

@media (max-width: 860px) {
    .ot-grid { grid-template-columns: 1fr; }
}

.ot-main { display: flex; flex-direction: column; gap: 20px; }
.ot-side { display: flex; flex-direction: column; gap: 16px; }

/* ─────────────── CARDS ─────────────── */
.ot-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.ot-card-title {
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text, #1f2937);
}

.ot-card-icon { width: 20px; height: 20px; color: var(--primary, #f97316); }

/* İptal kartı */
.ot-card-cancelled {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    margin-bottom: 24px;
}

.ot-cancelled-icon { width: 28px; height: 28px; flex-shrink: 0; color: #dc2626; }
.ot-card-cancelled h2 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.ot-card-cancelled p  { margin: 0; font-size: 13px; line-height: 1.5; }

/* ─────────────── ITEMS ─────────────── */
.ot-items {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.ot-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border, #f3f4f6);
}

.ot-item:last-child { border-bottom: 0; }

.ot-item-qty {
    flex-shrink: 0;
    font-weight: 600;
    color: var(--primary, #f97316);
    min-width: 28px;
}

.ot-item-body { flex: 1; min-width: 0; }

.ot-item-name {
    display: block;
    font-size: 14px;
    color: var(--text, #1f2937);
}

.ot-item-variants {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-muted, #6b7280);
}

.ot-item-price {
    flex-shrink: 0;
    font-weight: 600;
    font-size: 14px;
    color: var(--text, #1f2937);
}

/* ─────────────── TOTALS ─────────────── */
.ot-totals {
    margin: 0;
    padding: 16px 0 0;
}

.ot-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
}

.ot-total-row dt { margin: 0; color: var(--text-muted, #6b7280); display: inline-flex; align-items: center; gap: 6px; }
.ot-total-row dd { margin: 0; font-weight: 500; color: var(--text, #1f2937); }
.ot-total-icon { width: 14px; height: 14px; }
.ot-total-discount dt small { font-size: 11px; opacity: 0.7; font-weight: normal; }
.ot-total-discount dd { color: var(--success, #16a34a); font-weight: 600; }

.ot-total-grand {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid var(--border, #e5e7eb);
    font-size: 16px;
    font-weight: 700;
}

.ot-total-grand dt { color: var(--text, #1f2937); font-weight: 700; }
.ot-total-grand dd { color: var(--primary, #f97316); font-size: 18px; }

/* ─────────────── STATUS LOG ─────────────── */
.ot-log {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ot-log-item {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 10px;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--border, #f3f4f6);
}

.ot-log-item:last-child { border-bottom: 0; }

.ot-log-time {
    color: var(--text-muted, #9ca3af);
    font-family: ui-monospace, monospace;
    font-size: 12px;
}

.ot-log-status { font-weight: 500; color: var(--text, #1f2937); }

.ot-log-note {
    grid-column: 2;
    color: var(--text-muted, #6b7280);
    font-size: 12px;
    margin-top: 2px;
}

/* ─────────────── SIDEBAR ─────────────── */
.ot-card-info { padding: 16px 20px; }

.ot-side-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text, #1f2937);
}

.ot-side-icon { width: 18px; height: 18px; color: var(--primary, #f97316); }

.ot-info-rows { margin: 0; }

.ot-info-rows div {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--border, #f3f4f6);
}

.ot-info-rows div:last-child { border-bottom: 0; }
.ot-info-rows dt { color: var(--text-muted, #6b7280); margin: 0; }
.ot-info-rows dd { color: var(--text, #1f2937); margin: 0; font-weight: 500; }

.ot-info-text {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--text, #1f2937);
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ot-info-text:last-child { margin-bottom: 0; }
.ot-inline-icon { width: 14px; height: 14px; color: var(--text-muted, #9ca3af); flex-shrink: 0; }

.ot-phone-link { color: var(--primary, #f97316); text-decoration: none; }
.ot-phone-link:hover { text-decoration: underline; }

/* Payment badge */
.ot-pay-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.ot-pay-badge.is-paid     { background: #d1fae5; color: #065f46; }
.ot-pay-badge.is-pending  { background: #fef3c7; color: #92400e; }
.ot-pay-badge.is-failed   { background: #fee2e2; color: #991b1b; }
.ot-pay-badge.is-refunded { background: #e0e7ff; color: #3730a3; }

/* ─────────────── BUTTONS ─────────────── */
.ot-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 150ms ease;
    border: 0;
    cursor: pointer;
    width: 100%;
}

.ot-btn-primary {
    background: var(--primary, #f97316);
    color: #fff;
}

.ot-btn-primary:hover { background: var(--primary-dk, #ea580c); }

.ot-btn-secondary {
    background: #fff;
    color: var(--primary, #f97316);
    border: 2px solid var(--primary, #f97316);
}

.ot-btn-secondary:hover { background: var(--primary-lt, #fff7ed); }

/* ─────────────── 404 NOT FOUND ─────────────── */
.ot-not-found { padding: 80px 0; }

.ot-card-error {
    text-align: center;
    padding: 40px 30px;
    max-width: 460px;
    margin: 0 auto;
}

.ot-error-icon {
    width: 56px;
    height: 56px;
    color: var(--danger, #dc2626);
    margin-bottom: 16px;
}

.ot-card-error h1 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text, #1f2937);
}

.ot-card-error p {
    margin: 0 0 16px;
    color: var(--text-muted, #6b7280);
    line-height: 1.5;
}

.ot-order-no-display {
    padding: 10px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ot-order-no-display code {
    font-family: ui-monospace, monospace;
    font-size: 14px;
    color: var(--text, #1f2937);
}

/* ─────────────── SEARCH FORM (Parametresiz) ─────────────── */
.ot-search-page { padding: 80px 0; }

.ot-search-card {
    text-align: center;
    padding: 40px 30px;
    max-width: 500px;
    margin: 0 auto;
}

.ot-search-icon {
    width: 56px;
    height: 56px;
    color: var(--primary, #f97316);
    margin-bottom: 16px;
}

.ot-search-card h1 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text, #1f2937);
}

.ot-search-card p {
    margin: 0 0 24px;
    color: var(--text-muted, #6b7280);
    line-height: 1.5;
}

.ot-search-form {
    text-align: left;
    margin-bottom: 24px;
}

.ot-search-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text, #1f2937);
}

.ot-search-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.ot-search-input-group input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid var(--border, #d1d5db);
    border-radius: 10px;
    font-size: 14px;
    font-family: ui-monospace, monospace;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.ot-search-input-group input:focus {
    outline: none;
    border-color: var(--primary, #f97316);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, .15);
}

.ot-search-input-group .ot-btn {
    width: auto;
    flex-shrink: 0;
}

.ot-search-hint {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted, #6b7280);
}

.ot-search-back {
    display: inline-block;
    color: var(--text-muted, #6b7280);
    text-decoration: none;
    font-size: 13px;
}

.ot-search-back:hover { color: var(--primary, #f97316); }
