/* =======================================================
   OB Desi Hesaplayıcı
   ======================================================= */

:root {
  --obdesi-primary: #2563eb;       /* Canlı Mavi (Ana Renk) */
  --obdesi-primary-hover: #1d4ed8;
  --obdesi-border: #e2e8f0;
  --obdesi-text: #334155;          /* Genel Metin */
  --obdesi-input-text: #1e293b;    /* Koyu Metin */
  --obdesi-muted: #64748b;         /* Silik Metin */
  --obdesi-success: #10b981;       /* Kâr/Toplam Yeşili */
  --obdesi-radius: 12px;
}

.ob-desi {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--obdesi-text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.ob-desi * {
  box-sizing: border-box;
}

.ob-desi__title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 1.5rem; 
  color: #1e293b;
  letter-spacing: -0.02em;
  text-align: center;
}

/* Ana grid: Sol form – Sağ sonuç */
.ob-desi__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 1.5rem;
  align-items: stretch;
}

.ob-desi__card {
  border-radius: var(--obdesi-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Sol kart (form) */
.ob-desi__card--form {
  background: #ffffff;
  border: 1px solid var(--obdesi-border);
  padding: 1.25rem;
}

/* Sağ kart (sonuçlar) - Görsel için AÇIK RENK */
.ob-desi__card--result {
  background: #ffffff;
  border: 1px solid var(--obdesi-border);
  padding: 1.5rem; 
}

/* Form satırları */
.ob-desi .row {
  margin-bottom: 1rem;
}

.ob-desi .lbl {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--obdesi-text);
  margin-bottom: 0.35rem;
  letter-spacing: 0.01em;
}

/* Kısa açıklama yazıları */
.ob-desi .hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--obdesi-muted);
  line-height: 1.4;
}

/* =======================
   İnputlar ve Birim Çözümleri (cm / kg Sağda)
   ======================= */
.ob-desi .amount-row {
  position: relative;
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  height: 48px;
  transition: all 0.2s ease-in-out;
}

.ob-desi .amount-row:focus-within {
  background: #fff;
  border-color: var(--obdesi-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.ob-desi .suffix {
  position: absolute;
  right: 16px !important;
  font-size: 15px;
  font-weight: 600;
  color: var(--obdesi-muted);
  pointer-events: none;
  z-index: 2;
}

.ob-desi .inp {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  color: var(--obdesi-input-text);
  padding: 0 48px 0 16px !important; /* Sağda cm/kg için boşluk bırakıldı */
  outline: none;
}

/* Hata Durumu */
.ob-desi .amount-row:has(.inp.inp-error) {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

/* Select için ok işareti yapısı */
.ob-desi .select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  height: 48px;
  transition: all 0.2s ease-in-out;
}
.ob-desi .select-wrap:focus-within {
  background: #fff;
  border-color: var(--obdesi-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}
.ob-desi .select-wrap::after {
  content: "▾";
  position: absolute;
  right: 16px;
  color: var(--obdesi-muted);
  font-weight: 900;
  font-size: 14px;
  pointer-events: none;
}
.ob-desi select.inp {
  appearance: none;
  padding-right: 32px !important;
  cursor: pointer;
}

/* =======================
   Butonlar (Yan Yana)
   ======================= */
.ob-desi .actions {
  margin-top: auto;
  padding-top: 1.5rem;
  display: flex;
  flex-direction: row;
  gap: 12px;
}

.ob-desi .btn {
  flex: 1;
  min-width: 0;
  height: 48px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.ob-desi .btn.primary { background: var(--obdesi-primary); color: #fff; border: none; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); }
.ob-desi .btn.primary:hover { background: var(--obdesi-primary-hover); transform: translateY(-1px); }
.ob-desi .btn.ghost { background: #fff; border: 1px solid var(--obdesi-border); color: var(--obdesi-muted); }
.ob-desi .btn.ghost:hover { background: #f8fafc; color: var(--obdesi-text); }


/* =======================
   Kutu / Görsel Alanı
   ======================= */
.ob-desi__box-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.ob-desi__box {
  position: relative;
  width: 210px;
  height: 170px;
}

.ob-desi__box-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Görsel Üzerindeki Ölçü Etiketleri */
.ob-desi__dim {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  color: var(--obdesi-input-text);
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  white-space: nowrap;
}

.ob-desi__dim--width { left: 30px; top: 150px; }
.ob-desi__dim--length { left: 145px; bottom: 2px; }
.ob-desi__dim--height { right: -14px; top: 85px; }


/* =======================
   Sağ Kart: Sonuç Alanı
   ======================= */
.ob-desi__result-wrap {
  display: flex;
  flex-direction: column;
}

.sec-hd {
  font-size: 16px;
  font-weight: 800;
  color: var(--obdesi-input-text);
  margin: 0 0 1rem;
}

.ob-desi__result {
  display: flex;
  flex-direction: column;
}

.ob-desi .res {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-size: 14px;
  color: var(--obdesi-text);
  border-bottom: 1px solid var(--obdesi-border);
}

.ob-desi .res:last-child {
  border-bottom: none;
}

.ob-desi .res > div:first-child {
  color: var(--obdesi-muted);
}

.ob-desi .res > div:last-child {
  font-weight: 600;
  color: var(--obdesi-input-text);
  font-variant-numeric: tabular-nums;
}

/* Büyük Vurgulu Desi Sonucu */
.ob-desi .res.strong.big {
  background: var(--obdesi-success);
  margin-top: 1rem;
  padding: 16px 1.25rem;
  border-radius: 8px;
  border: none;
}

.ob-desi .res.strong.big > div:first-child {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
}

.ob-desi .res.strong.big > div:last-child {
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
}

/* Alt Not */
.ob-desi__note {
  margin-top: 1.5rem;
  font-size: 12px;
  color: var(--obdesi-muted);
  line-height: 1.5;
}


/* ============================
   Responsive (Mobil Uyum)
   ============================ */
@media (max-width: 900px) {
  .ob-desi__grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (max-width: 640px) {
  .ob-desi { padding: 0 0.5rem; margin: 0 auto 2rem; font-size: 13px; }
  .ob-desi__title { font-size: 20px; margin-bottom: 1rem; }
  
  .ob-desi__card--form, .ob-desi__card--result { padding: 1.25rem !important; }
  
  .ob-desi .actions { flex-direction: row; gap: 8px; padding-top: 1.25rem; }
  .ob-desi .btn { height: 44px; font-size: 14px; }

  .ob-desi__box { transform: scale(0.9); transform-origin: center; }
  
  .ob-desi .res.strong.big { margin-left: -1.25rem; margin-right: -1.25rem; border-radius: 0; }
}