/* Chipset Kargo - "Ayni Gun Kargo" ust-orta acilir buton + panel.
   Buton tarayiciya yapisik (fixed top-center). Tiklayinca buyuyerek panele doner. */

#chipset-cargo-fab {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9998;
  font-family: inherit;
  font-size: 11px;
  color: #1a202c;
  pointer-events: none; /* sadece ic ogeler tiklanabilir */
}

/* ---- Kapsul (hem buton hem panel bu) ---- */
.cc-capsule {
  pointer-events: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  overflow: hidden;
  width: 56px;            /* kapali: cok dar, sadece ikon + ok */
  cursor: pointer;
  transition: width .35s cubic-bezier(.4,0,.2,1), box-shadow .3s;
}
.cc-capsule.cc-open {
  width: 280px;
  max-width: 92vw;
  cursor: default;
  box-shadow: 0 10px 30px rgba(0,0,0,.20);
}

/* ---- Baslik cubugu (her zaman gorunur, tiklanabilir) ---- */
.cc-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;       /* boy kucuk */
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background .25s;
}
/* Durum rengi: en az 1 acik -> yesilimsi, hepsi kapali -> sonuk */
.cc-capsule.cc-active .cc-bar { background: linear-gradient(135deg,#48bb78,#38a169); color:#fff; }
.cc-capsule.cc-idle   .cc-bar { background: #edf2f7; color:#718096; }

.cc-bar-icon { line-height: 1; display:inline-flex; flex:0 0 auto; }
.cc-bar-icon svg { width: 24px; height: 17px; display:block; }
/* Metin KAPALIYKEN gizli (dar buton), ACILINCA gorunur */
.cc-bar-text {
  flex: 1 1 auto;
  font-size: 11px;
  overflow: hidden;
  opacity: 0;
  max-width: 0;
  transition: opacity .25s, max-width .35s;
}
.cc-capsule.cc-open .cc-bar-text { opacity: 1; max-width: 200px; margin-left: 2px; }
.cc-bar-caret { transition: transform .35s; font-size: 13px; font-weight: 900; opacity:.95; flex:0 0 auto; margin-left:auto; }
.cc-capsule.cc-open .cc-bar-caret { transform: rotate(180deg); }

/* kucuk kamyon ikonu hafif salinim (dikkat) - sadece idle degilken */
.cc-capsule.cc-active .cc-bar-icon svg { animation: cc-nudge 2.6s ease-in-out infinite; }
@keyframes cc-nudge {
  0%,88%,100% { transform: translateX(0); }
  92% { transform: translateX(2px); }
  96% { transform: translateX(-1px); }
}

/* ---- Acilir govde (firma listesi) ---- */
.cc-body {
  max-height: 0;
  opacity: 0;
  transition: max-height .35s cubic-bezier(.4,0,.2,1), opacity .25s;
  background: #fff;
}
.cc-capsule.cc-open .cc-body {
  max-height: 420px;
  opacity: 1;
  overflow-y: auto;
}

.cc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-top: 1px solid #f1f5f9;
}
.cc-row-dot {
  flex: 0 0 auto;
  width: 10px; height: 10px; border-radius: 50%;
}
.cc-row.is-open  .cc-row-dot { background:#38a169; box-shadow:0 0 0 3px rgba(56,161,105,.15); animation: cc-pulse 1.4s ease-in-out infinite; }
.cc-row.is-closed .cc-row-dot { background:#cbd5e0; }
@keyframes cc-pulse { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:.45;transform:scale(.7);} }

.cc-row-info { flex:1 1 auto; min-width:0; }
.cc-row-firma { font-weight:700; font-size:11.5px; color:#1a202c; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cc-row-durum { font-size:10.5px; margin-top:1px; }
.cc-row.is-open  .cc-row-durum { color:#2f855a; }
.cc-row.is-closed .cc-row-durum { color:#718096; }
.cc-row-cd { flex:0 0 auto; font-size:9.5px; color:#a0aec0; font-variant-numeric:tabular-nums; white-space:nowrap; }

/* ---- Peek animasyonu (sayfa acilinca 1 kez) ---- */
/* JS cc-open/kapat ile yapar; CSS gecisleri zaten yumusak. */

/* ---- Mobil ---- */
@media (max-width: 600px) {
  .cc-capsule { width: 50px; }
  .cc-capsule.cc-open { width: 260px; }
  .cc-bar-text { font-size:12px; }
}
