/* ============================================================
   portal-fixes.css — server-rendered portal uchun tuzatishlar.
   (React versiyada conditional render qilinadigan narsalar CSS bilan.)
   ============================================================ */

/* Combo dropdown faqat .open bo'lganda ko'rinadi
   (React'da {open && <pop>} edi; biz markupni doim render qilamiz) */
.combo .pop { display: none; }
.combo.open .pop { display: block; }

/* Til toggle <a> elementlari uchun (.seg faqat button'ni stillaydi) */
.seg a {
  border: 0; background: transparent; padding: 6px 12px; border-radius: 7px;
  font-size: 13px; font-weight: 600; color: var(--ink-3); cursor: pointer;
  transition: .15s; text-decoration: none; display: inline-block; line-height: 1.4;
}
.seg a[aria-pressed="true"] {
  background: var(--surface); color: var(--accent-700); box-shadow: var(--sh-1);
}

/* Timeline: rad etilgan yakuniy bosqich (qizil) */
.timeline .tl-row.rejected .tl-dot { background: var(--err); border-color: var(--err); color: #fff; }
.timeline .tl-row.rejected .tl-t { color: var(--err); }
.timeline .tl-row.rejected .tl-tag.done { background: var(--err-tint); color: var(--err); }

/* ============================================================
   MOBIL OPTIMALLASHTIRISH (7-qaror)
   ============================================================ */

/* Yirik, bosish qulay tugmalar mobilda */
@media (max-width: 860px) {
  /* Kattaroq input balandligi (barmoq uchun qulay) */
  .inp { height: 52px; font-size: 16px; } /* iOS zoom'ni oldini olish: 16px */
  textarea.inp { min-height: 100px; }
  .combo-btn { height: 52px; font-size: 16px; }
  
  /* Yirik tugmalar */
  .btn { height: 54px; font-size: 15.5px; border-radius: 14px; }
  .btn-sm { height: 40px; font-size: 13.5px; }
  .formnav { padding: 14px 20px 20px; gap: 12px; }
  .formnav .btn-primary { min-width: 140px; }

  /* Upload kartochkalari — mobilda yaxlitroq va kattaroq bosish joyi */
  .doc { padding: 18px; }
  .dz { padding: 22px 16px; }
  .dz .dz-t { font-size: 14px; }

  /* Satr soni ko'rsatish balandroq */
  .rev-sec { padding: 18px 16px; }
  
  /* Forma xatolik banneri — mobilda to'liq kenglik */
  .err-banner { font-size: 14px; padding: 14px 16px; }

  /* Hujjatlar sahifasida (status) qulay joylashuv */
  .status-head { flex-wrap: wrap; gap: 14px; }
}

/* Juda kichik ekranlar (iPhone SE: 375px) */
@media (max-width: 400px) {
  .brand-ttl { font-size: 12px; }
  .emblem { width: 32px; height: 32px; }
  .wrap { padding: 16px 12px 90px; }
  .card-b { padding: 14px; }
  .page-ttl { font-size: 20px; }
}

/* Fayl yuklash: mobilda kattaroq bosish joyi */
@media (hover: none) {
  .iconbtn { width: 40px; height: 40px; }
  .iconbtn svg { width: 18px; height: 18px; }
  .up-acts { gap: 8px; }
}

/* LocalStorage autosave ko'rsatkichi */
.autosave-indicator {
  position: fixed;
  bottom: 80px;
  right: 16px;
  background: var(--ok-tint);
  border: 1px solid var(--ok-line);
  color: var(--ok);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 100;
  pointer-events: none;
}
.autosave-indicator.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (min-width: 861px) {
  .autosave-indicator { bottom: 24px; right: 24px; }
}
