/* =======================================================
   OB Maliyet Hesaplayıcı (Trendyol Temalı - Mavi)
   ======================================================= */

:root {
  --obmal-primary: #2563eb;       /* Canlı Mavi (Ana Renk) */
  --obmal-primary-hover: #1d4ed8;
  --obmal-dark-bg: #1e293b;       /* Koyu Lacivert/Siyah */
  --obmal-dark-surface: #0f172a;
  --obmal-border: #e2e8f0;
  --obmal-text: #334155;          /* Genel Metin */
  --obmal-input-text: #1e293b;    /* Koyu Metin */
  --obmal-muted: #64748b;         /* Silik Metin */
  --obmal-success: #10b981;       /* Kâr/Toplam Yeşili */
  --obmal-radius: 12px;
}

.ob-maliyet {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--obmal-text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.ob-maliyet * { box-sizing: border-box; }

.ob-maliyet__head { margin: 0 0 1.2rem; }
.ob-maliyet__title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 0.5rem; 
  color: #1e293b;
  letter-spacing: -0.02em;
  text-align: center;
}

/* ================= MOD SEÇİCİ (SEKMELER) ================= */
.ob-maliyet__tabs-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.ob-maliyet-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  width: 100%;
  max-width: 450px; 
}

.ob-maliyet-modes .seg {
  height: 40px;
  border-radius: 7px;
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 14px;
  color: var(--obmal-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ob-maliyet-modes .seg:hover {
  color: var(--obmal-primary);
}

.ob-maliyet-modes .seg.is-active {
  background: #ffffff;
  color: var(--obmal-input-text);
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* ================= GRID / KARTLAR ================= */
.ob-maliyet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.ob-maliyet-card {
  background: #ffffff;
  border-radius: var(--obmal-radius);
  border: 1px solid var(--obmal-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Sol Kart: Form */
.ob-maliyet-card.form {
  padding: 1.25rem;
}

.ob-maliyet__panels { flex: 1 1 auto; }
.ob-maliyet__panel { display: none; }
.ob-maliyet__panel.is-active { display: block; }

/* Sağ Kart: Sonuçlar */
.ob-maliyet-card.results {
  background: linear-gradient(145deg, var(--obmal-dark-bg), var(--obmal-dark-surface));
  color: #f1f5f9;
  border: none;
  padding: 1.25rem; 
}

/* ---------- FORM BİLEŞENLERİ ---------- */
.ob-maliyet__grid--form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.ob-maliyet__field--full { grid-column: 1 / -1; }

.lbl {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--obmal-text);
  margin-bottom: 0.35rem;
  letter-spacing: 0.01em;
}

.amount-row {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0;
  position: relative;
  transition: all 0.2s ease-in-out;
  height: 48px;
}

.amount-row:focus-within {
  background-color: #fff;
  border-color: var(--obmal-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.ob-maliyet .currency {
  position: absolute;
  left: 14px !important;
  font-size: 15px;
  font-weight: 600;
  color: var(--obmal-muted);
  pointer-events: none;
  z-index: 2;
}

.ob-maliyet .inp {
  flex: 1;
  height: 48px;
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  color: var(--obmal-input-text);
  outline: none;
  padding: 0 16px 0 38px !important; /* Temanın ezmesini engellemek için zorunlu kılındı */
  border-radius: 8px;
  transition: all 0.2s ease-in-out;
}
.ob-maliyet .ob-maliyet__field--full .inp { 
  padding-left: 16px !important; 
  background: #f8fafc; 
  border: 1px solid #cbd5e1; 
}
.ob-maliyet .ob-maliyet__field--full .inp:focus { 
  background-color: #fff; 
  border-color: var(--obmal-primary); 
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15); 
}

.ob-maliyet .inp::placeholder { color: #94a3b8; font-weight: 400; }

.hint {
  font-size: 12px;
  color: var(--obmal-muted);
  margin-top: 4px;
  display: block;
  line-height: 1.4;
}

/* ---------- AKSİYON BUTONLARI ---------- */
.actions {
  margin-top: auto;
  padding-top: 1.5rem;
  display: flex;
  flex-direction: row;
  gap: 12px;
}

.btn.lg {
  flex: 1;
  min-width: 0;
  height: 44px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn.primary {
  background: var(--obmal-primary);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn.primary:hover {
  background: var(--obmal-primary-hover);
  transform: translateY(-1px);
}

.btn.ghost {
  background: #fff;
  border: 1px solid var(--obmal-border);
  color: var(--obmal-muted);
}
.btn.ghost:hover {
  background: #f8fafc;
  color: var(--obmal-text);
}

/* ---------- SONUÇ KARTLARI (Koyu Tema) ---------- */
.sec-hd {
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  margin-top: 0; 
  margin-bottom: 0.8rem;
}

.results-container {
  display: flex;
  flex-direction: column;
}

.res {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0; 
  font-size: 14px;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.res-hd {
  font-weight: 400;
  color: #cbd5e1;
}

.res-val {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

/* Büyük Vurgu (Toplam Maliyet) */
.res.strong.big {
  background: var(--obmal-success);
  margin-top: 1rem; 
  margin-bottom: 0.5rem;
  padding: 16px 1.25rem;
  border-radius: 8px;
  border: none;
}
.res.strong.big .res-hd { color: #ffffff; font-size: 16px; font-weight: 700; }
.res.strong.big .res-val { font-size: 24px; font-weight: 800; }

/* Not Alanı */
.note {
  margin-top: 1.5rem;
  font-size: 12px;
  line-height: 1.5;
  color: #94a3b8;
}
.note-strong { font-weight: 700; color: #cbd5e1; }
.note strong { color: #cbd5e1; }

/* ---------- ALT AÇIKLAMA BLOĞU ---------- */
.ob-maliyet__explain {
  margin-top: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--obmal-border);
  background: #f8fafc;
  padding: 1.25rem 1.5rem;
}

.ob-maliyet__explain-lead {
  margin: 0 0 1rem;
  color: var(--obmal-text);
  line-height: 1.6;
  font-size: 14px;
}

.ob-maliyet__explain-block {
  padding: 1rem 0;
  border-top: 1px dashed #cbd5e1;
  color: var(--obmal-text);
  line-height: 1.6;
  font-size: 13px;
}
.ob-maliyet__explain-block:first-of-type { border-top: 0; padding-top: 0; }
.ob-maliyet__explain-block strong { color: var(--obmal-input-text); }

.ob-maliyet__explain-muted {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--obmal-muted);
  font-size: 12px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .ob-maliyet-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (max-width: 640px) {
  .ob-maliyet { padding: 0 0.5rem; margin: 0 auto 2rem; font-size: 13px; }
  .ob-maliyet__title { font-size: 20px; margin-bottom: 1rem; }
  
  .ob-maliyet-modes { max-width: 100%; margin-bottom: 1rem; }
  .ob-maliyet-modes .seg { font-size: 13px; padding: 0 4px; }

  .ob-maliyet-card.form { padding: 1.25rem !important; }
  .ob-maliyet__grid--form { grid-template-columns: 1fr; gap: 1rem; }
  
  .ob-maliyet .inp { font-size: 16px; }

  /* Mobilde butonlar her zaman yan yana */
  .actions { flex-direction: row; gap: 8px; padding-top: 1.25rem; }
  .btn.lg { height: 44px; font-size: 14px; }
  
  .res.strong.big { margin-left: -1.25rem; margin-right: -1.25rem; border-radius: 0; }
}