/* ==========================================================================
   Sipariş Detay Sayfası (order/details) özel stilleri
   Tüm sınıflar "odx-" prefix'i taşır — Bootstrap/tema sınıflarıyla çakışmaz.
   Sadece Themes/<Tema>/Views/Shared/_OrderDetails.cshtml tarafından kullanılır.
   ========================================================================== */

.odx,
.odx * {
  box-sizing: border-box;
}

/* ---------- Meta şeridi (Sipariş No / Kodu / Tarih / Durum) ---------- */
.odx-meta-bar {
  background: #fff;
  border: 1px solid #e4e6ea;
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  margin-bottom: 16px;
}

.odx-meta-item .odx-lbl {
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.odx-meta-item .odx-val {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.odx-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e8f7ee;
  color: #1e9e50;
  border: 1px solid #bfe8cd;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.odx-badge img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: middle;
}

/* Rozet varyantları — duruma göre renk */
.odx-badge-warn {
  background: #fff7e6;
  color: #b97909;
  border-color: #f3dfa8;
}

.odx-badge-danger {
  background: #fdecea;
  color: #c0392b;
  border-color: #f5c6c0;
}

/* ---------- Sol menü ile içerik kartı alt kenar eşitleme ----------
   Sol kolondaki #block-account-navigation margin-bottom:50px, içerik kartı
   .order-details-page margin-bottom:30px olduğundan alt kenarlar şaşıyor.
   Yalnızca sipariş detay sayfasında menü alt margin'i 30px'e çekilir. */
.row:has(.order-details-page) #block-account-navigation {
  margin-bottom: 30px !important;
}

/* ---------- Sayfa başlığı + aksiyon butonları ----------
   (Üst view: Views/Order/Details.cshtml — .odx-page-head sarmalayıcısı yalnızca
   bu sayfada kullanılır; bu CSS'i yüklemeyen temalar eski görünümde kalır) ---------- */
.odx-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 16px;
}

.odx-page-head > .generalTitle {
  margin: 0;
  flex: 1 1 auto;
  border-left: 3px solid var(--theme-color-primary, #c0392b) !important;
  border-bottom: none;
  padding-left: 10px;
  font-size: 22px;
  font-weight: 700;
  color: #222;
}

.odx-page-head .order-details-buttons {
  width: auto;
  height: auto;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.odx-page-head .order-details-buttons a {
  width: auto;
  margin: 0 !important;
  white-space: nowrap;
  text-align: center;
}

/* ---------- Üst düzen: kartlar + sağ özet paneli ---------- */
.odx-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}

.odx-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.odx-card {
  background: #fff;
  border: 1px solid #e4e6ea;
  border-radius: 8px;
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.odx-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f1f3;
  font-weight: 700;
  font-size: 14px;
  color: #222;
}

.odx-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 6px;
  background: #fdecea;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.odx-card-body {
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.6;
  color: #555;
  overflow-wrap: anywhere;
  word-break: break-word;
  flex: 1 1 auto;
}

.odx-card-body ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Adres kartlarındaki "E-mail:", "Telefon:" gibi satır içi etiketler —
   dl'deki dt ile aynı soluk gri ton */
.odx-card-body ul li .odx-lbl-inline {
  color: #999;
}

.odx-dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 10px;
  margin: 0;
}

.odx-dl dt {
  color: #999;
  font-weight: 400;
}

.odx-dl dd {
  color: #333;
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ---------- Sağ özet paneli ---------- */
.odx-summary {
  background: #fff;
  border: 1px solid #e4e6ea;
  border-radius: 8px;
  padding: 16px 18px;
  position: sticky;
  top: 16px;
}

.odx-summary-title {
  font-size: 14px;
  font-weight: 700;
  color: #222;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f1f3;
}

.odx-sum-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  padding: 5px 0;
  color: #555;
}

.odx-sum-row .odx-amt {
  white-space: nowrap;
}

.odx-sum-row.odx-total {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 2px solid #eee;
  font-size: 16px;
  font-weight: 700;
  color: #222;
}

.odx-sum-row.odx-total .odx-amt {
  color: #c0392b;
}

/* ---------- Alt bölümler: Ürünler / Sevkiyatlar / Notlar ---------- */
.odx-section-card {
  background: #fff;
  border: 1px solid #e4e6ea;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.odx-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f1f3;
}

.odx-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: #222;
  margin: 0;
}

.odx-section-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Bölüm başlığındaki butonlar — mockup'taki yumuşak gri stil
   (temanın kırmızı .btn-primary görünümünü yalnızca bu bölümde ezer) */
.odx-section-actions .btn,
.odx-section-actions .btn-primary {
  background: #f6f7f9;
  border: 1px solid #ddd;
  color: #444;
  box-shadow: none;
  font-size: 13px;
  line-height: 1.4;
  padding: 7px 14px;
  height: auto;
  border-radius: 6px;
  transition: none;
}

.odx-section-actions .btn:hover,
.odx-section-actions .btn-primary:hover,
.odx-section-actions .btn:focus,
.odx-section-actions .btn-primary:focus {
  background: #eceef1 !important;
  border: 1px solid #ccc !important;
  color: #333 !important;
}

.odx-tbl-wrap {
  overflow-x: auto;
}

.odx-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 0;
}

.odx-tbl thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #999;
  font-weight: 700;
  padding: 10px 16px;
  background: #fafbfc;
  border-bottom: 1px solid #f0f1f3;
  white-space: nowrap;
}

.odx-tbl tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #f5f6f8;
  color: #444;
  vertical-align: middle;
}

.odx-tbl tbody tr:last-child td {
  border-bottom: none;
}

.odx-tbl tbody tr:hover {
  background: #fafbfc;
}

.odx-tbl .odx-num {
  text-align: right;
  white-space: nowrap;
}

.odx-tbl .odx-center {
  text-align: center;
}

/* ---------- Ürün hücresi ---------- */
.odx-prod {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 220px;
}

.odx-prod-img img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #eee;
  background: #fafafa;
}

.odx-prod-name {
  font-weight: 600;
  color: #222;
  font-size: 14px;
  text-decoration: none;
}

.odx-prod-attrs {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

.odx-price {
  font-weight: 600;
  color: #222;
  white-space: nowrap;
}

/* ---------- Yardımcılar ---------- */
.odx-muted {
  color: #aaa;
}

.odx-link {
  color: #c0392b;
  font-weight: 600;
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
}

.odx-link:hover {
  text-decoration: underline;
}

.odx-note-line {
  font-size: 12px;
  color: #999;
  margin: 4px 0 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .odx-layout {
    grid-template-columns: 1fr;
  }

  .odx-summary {
    position: static;
  }
}

@media (max-width: 576px) {
  .odx-cards {
    grid-template-columns: 1fr;
  }
}

@media print {
  .odx-summary {
    position: static;
  }
}
