/**
 * quotes-screen.css  v2
 * Teklifler (#view_quotes) — teklif-özel görsel katman
 * Genel kart stilleri atolye-redesign.css'ten gelir.
 * JS/ID'lere dokunulmadı.
 */

/* ═══════════════════════════════════════════
   SAYFA BAŞLIĞI / ARAÇ ÇUBUĞU
   ═══════════════════════════════════════════ */
#view_quotes .orders-page-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

#view_quotes .orders-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* Özet metin */
#view_quotes #quotes_ozet {
  margin: 0 0 16px;
  font-size: 13px;
  color: #6b7c93;
  font-weight: 400;
}

/* ═══════════════════════════════════════════
   DURUM ŞERIDI (status strip)
   ═══════════════════════════════════════════ */
#view_quotes .quote-status-strip {
  margin: 8px 0 0;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

#view_quotes .quote-status-strip--ok {
  background: #e6f4ea;
  border: 1px solid rgba(45,106,79,0.22);
  color: #1f5c2c;
}

#view_quotes .quote-status-strip--wait {
  background: #fef9ec;
  border: 1px solid rgba(180,83,9,0.18);
  color: #92400e;
}

/* ═══════════════════════════════════════════
   SEÇIM LİNK BARI
   ═══════════════════════════════════════════ */
#view_quotes .quote-secim-link-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #eef5ff;
  border: 1px solid rgba(44,74,110,0.18);
  font-size: 12px;
  color: #4a6080;
}

#view_quotes .quote-secim-link-bar a {
  font-weight: 700;
  color: #2c4a6e;
  text-decoration: none;
}
#view_quotes .quote-secim-link-bar a:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════════
   SİPARİŞ LİNKİ
   ═══════════════════════════════════════════ */
#view_quotes .quote-order-link {
  margin: 6px 0 0;
  font-size: 12px;
  color: #6b7c93;
}
#view_quotes .quote-order-link a {
  color: #2c4a6e;
  font-weight: 600;
  text-decoration: none;
}
#view_quotes .quote-order-link a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════
   FATURA NOT
   ═══════════════════════════════════════════ */
#view_quotes .quote-fact-note {
  font-size: 10.5px;
  font-weight: 500;
  color: #94a3b8;
}

/* ═══════════════════════════════════════════
   TEKLIF KARTI — AKSIYON FOOTER
   Sipariş oluştur + Düzenle + Sil yan yana
   ═══════════════════════════════════════════ */
#view_quotes .order-info-card .order-card-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin: 12px -14px 0 !important;
  padding: 10px 14px !important;
  background: #f8fafc !important;
  border-top: 1px solid #f1f5f9 !important;
  border-radius: 0 0 14px 14px !important;
  align-items: center !important;
  grid-template-columns: unset !important;
}

/* Sipariş oluştur — birincil, genişler */
#view_quotes .order-info-card .order-card-actions .btn.primary,
#view_quotes .order-info-card .order-card-actions .quote-approve-btn {
  flex: 1 !important;
  min-width: 120px !important;
  background: #2c4a6e !important;
  border-color: #2c4a6e !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: 7px !important;
  min-height: 32px !important;
  padding: 0 12px !important;
  box-shadow: none !important;
}
#view_quotes .order-info-card .order-card-actions .quote-approve-btn:hover {
  background: #1e3a5f !important;
  border-color: #1e3a5f !important;
}

/* Düzenle — ikincil */
#view_quotes .order-info-card .order-card-actions .quote-edit-btn {
  flex: 0 0 auto !important;
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  color: #4a5a72 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border-radius: 7px !important;
  min-height: 32px !important;
  padding: 0 12px !important;
  box-shadow: none !important;
}
#view_quotes .order-info-card .order-card-actions .quote-edit-btn:hover {
  background: #f0f4f8 !important;
  border-color: #c8d2dc !important;
  color: #2c4a6e !important;
}

/* Seçilmeyenleri sil */
#view_quotes .order-info-card .order-card-actions .quote-prune-btn {
  flex: 0 0 auto !important;
  background: #fff !important;
  border: 1px solid rgba(180,83,9,0.25) !important;
  color: #92400e !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  border-radius: 7px !important;
  min-height: 32px !important;
  padding: 0 10px !important;
  box-shadow: none !important;
}
#view_quotes .order-info-card .order-card-actions .quote-prune-btn:hover {
  background: #fef9ec !important;
  border-color: #b45309 !important;
}

/* Sil — en sağda, tehlikeli */
#view_quotes .order-info-card .order-card-actions .quote-delete-btn,
#view_quotes .order-info-card .order-card-actions .btn-danger {
  flex: 0 0 auto !important;
  background: #fff !important;
  border: 1px solid rgba(192,57,43,0.22) !important;
  color: #c0392b !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border-radius: 7px !important;
  min-height: 32px !important;
  padding: 0 10px !important;
  box-shadow: none !important;
}
#view_quotes .order-info-card .order-card-actions .quote-delete-btn:hover,
#view_quotes .order-info-card .order-card-actions .btn-danger:hover {
  background: #fef2f2 !important;
  border-color: #c0392b !important;
}

/* Siparişi aç */
#view_quotes .order-info-card .order-card-actions .quote-open-order {
  flex: 1 !important;
  background: #2c4a6e !important;
  border-color: #2c4a6e !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: 7px !important;
  min-height: 32px !important;
  padding: 0 12px !important;
}
#view_quotes .order-info-card .order-card-actions .quote-open-order:hover {
  background: #1e3a5f !important;
}

/* ═══════════════════════════════════════════
   GÖRSEL ÖNİZLEME (teklif görselleri)
   ═══════════════════════════════════════════ */
#view_quotes .order-card-preview .quote-gorsel-item img {
  display: block;
  width: 100%;
  max-height: 9rem;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 6px;
}

#view_quotes .order-card-preview--multi .order-card-preview-item .quote-gorsel-item img {
  max-height: 4.5rem;
}

#view_quotes .quote-gorsel-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: rgba(255,255,255,0.25);
  font-size: 12px;
}

#view_quotes .quote-gorsel-not-selected {
  opacity: 0.35;
  filter: grayscale(0.5);
}

#view_quotes .quote-gorsel-selected {
  opacity: 1;
}

/* ═══════════════════════════════════════════
   DÜZENLEME MODU (.quote-card-editing)
   ═══════════════════════════════════════════ */
#view_quotes .quote-card-editing {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1.5px solid rgba(44,74,110,0.30);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(44,74,110,0.08), 0 4px 20px rgba(26,38,56,0.10);
}

#view_quotes .quote-edit-banner {
  margin: 0;
  padding: 9px 12px;
  border-radius: 8px;
  background: #eef5ff;
  border: 1px solid rgba(44,74,110,0.18);
  font-size: 12px;
  line-height: 1.5;
  color: #3a5070;
}

/* Düzenleme modu footer */
#view_quotes .quote-card-editing .quote-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
}

#view_quotes .quote-card-editing .quote-card-toplam {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #2c4a6e;
  font-variant-numeric: tabular-nums;
}

#view_quotes .quote-card-editing .order-card-actions {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
}

#view_quotes .quote-card-editing .order-card-actions .quote-edit-btn.active {
  background: #2c4a6e !important;
  border-color: #2c4a6e !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 0 16px !important;
}

/* ═══════════════════════════════════════════
   SEÇİM ÖZETİ
   ═══════════════════════════════════════════ */
#view_quotes .quote-secim-ozet {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.4;
}

#view_quotes .quote-secim-ozet.is-secildi {
  color: #1f5c2c;
}

#view_quotes .quote-secim-ozet.is-bekliyor {
  color: #92400e;
}

#view_quotes .quote-secim-chip {
  display: inline-block;
  background: #e6f4ea;
  border: 1px solid rgba(45,106,79,0.20);
  color: #1f5c2c;
  padding: 1px 7px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin: 1px 2px;
}

/* ═══════════════════════════════════════════
   LİSTE GÖRÜNÜMÜ
   ═══════════════════════════════════════════ */
#view_quotes .quote-list-secim {
  font-size: 11.5px;
  color: #6b7c93;
}

/* ═══════════════════════════════════════════
   FACTS — teklif-özel tam genişlik satır
   ═══════════════════════════════════════════ */
#view_quotes .order-card-facts .order-fact-full {
  grid-column: 1 / -1 !important;
  border-left: none !important;
  padding-left: 0 !important;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

/* ═══════════════════════════════════════════
   MOBİL RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 720px) {
  /* Kart ızgarası: 4'lü → 1'li */
  #view_quotes .orders-card-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  /* Liste görünümünde tablo taşmasını azalt */
  #view_quotes .orders-table {
    min-width: 0 !important;
    font-size: 0.78rem;
  }

  #view_quotes .orders-table-wrap {
    -webkit-overflow-scrolling: touch;
  }

  /* Teklif kartı: önizleme + içerik dikey */
  #view_quotes .order-info-card {
    grid-template-columns: 1fr;
  }

  #view_quotes .order-card-preview {
    min-height: 120px;
    max-height: 160px;
  }

  /* Font küçük değerleri artır */
  #view_quotes .quote-fact-note {
    font-size: 0.75rem;
  }

  #view_quotes .quote-list-secim {
    font-size: 0.75rem;
  }

  #view_quotes .quote-secim-chip {
    font-size: 0.72rem;
  }

  /* Aksiyon butonları tam genişlik */
  #view_quotes .order-info-card .order-card-actions {
    flex-direction: column !important;
    gap: 8px !important;
  }

  #view_quotes .order-info-card .order-card-actions .btn,
  #view_quotes .order-info-card .order-card-actions .quote-approve-btn,
  #view_quotes .order-info-card .order-card-actions .quote-edit-btn,
  #view_quotes .order-info-card .order-card-actions .quote-prune-btn,
  #view_quotes .order-info-card .order-card-actions .quote-delete-btn {
    flex: 1 1 100% !important;
    min-height: 2.5rem !important;
  }

  /* Araç çubuğu dikey */
  #view_quotes .orders-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  /* Seçim link barı daha kompakt */
  #view_quotes .quote-secim-link-bar {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  #view_quotes .orders-card-grid {
    gap: 0.5rem;
  }

  #view_quotes .quote-status-strip {
    font-size: 0.75rem;
  }
}
