/* ============================================================
   VMRO ISP — Language Toggle & Bilingual UI Styles
   Inspired by dark/minimal design aesthetic
   Mobile-first responsive
   ============================================================ */

/* ---------- Language Toggle Pill ---------- */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 11px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none !important;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.65);
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  line-height: 1.6;
  white-space: nowrap;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.lang-btn.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

/* For light backgrounds (public index page navbar is dark so above is fine;
   if any layout uses a white/light navbar, override here) */
.navbar-light .lang-btn,
.lang-toggle-light .lang-btn {
  border-color: rgba(0, 0, 0, 0.18);
  color: rgba(0, 0, 0, 0.55);
}

.navbar-light .lang-btn:hover,
.lang-toggle-light .lang-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #000;
  border-color: rgba(0, 0, 0, 0.3);
}

.navbar-light .lang-btn.active,
.lang-toggle-light .lang-btn.active {
  background: rgba(0, 0, 0, 0.12);
  color: #000;
  border-color: rgba(0, 0, 0, 0.3);
}

/* ---------- Sidebar lang toggle (inside collapsed sidebar) ---------- */
.sidebar .lang-toggle {
  padding: 8px 16px 16px;
  justify-content: flex-start;
}

.sidebar .lang-btn {
  font-size: 11px;
  padding: 2px 10px;
}

/* ---------- Responsive adjustments ---------- */
@media (max-width: 576px) {
  /* On very small screens the toggle labels shrink */
  .lang-btn {
    padding: 3px 8px;
    font-size: 11px;
  }

  /* Make auth-card full width on mobile */
  .auth-card {
    margin: 16px !important;
    max-width: 100% !important;
  }

  /* Sidebar collapses on mobile — handled by Bootstrap offcanvas below */
  .sidebar {
    display: none;
  }

  /* Navbar topbar becomes full width */
  .navbar-vmro {
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Tables scroll horizontally */
  .table-responsive {
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 768px) {
  /* Stack stat cards in two columns */
  .col-md-3.stat-col-mobile {
    width: 50%;
  }

  /* Reduce padding on cards */
  .card.card-vmro.p-4 {
    padding: 16px !important;
  }

  /* Lang toggle in navbar: reduce gap */
  .navbar-vmro .lang-toggle {
    gap: 3px;
  }

  /* Hide long welcome text, keep compact */
  .welcome-text-full {
    display: none;
  }
  .welcome-text-short {
    display: inline !important;
  }

  /* Feature cards full width */
  .col-md-4 {
    margin-bottom: 12px;
  }
}

/* ---------- Offcanvas mobile sidebar ---------- */
@media (max-width: 991.98px) {
  /* Show hamburger toggle button */
  .sidebar-toggle-btn {
    display: inline-flex !important;
  }

  /* Sidebar becomes an offcanvas drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    width: 250px;
    height: 100vh;
    z-index: 1050;
    transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
  }

  .sidebar.show {
    left: 0;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
  }

  /* Backdrop */
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1040;
  }

  .sidebar-backdrop.show {
    display: block;
  }

  /* Push main content on desktop, not mobile */
  .flex-grow-1 {
    width: 100%;
  }
}

@media (min-width: 992px) {
  .sidebar-toggle-btn {
    display: none !important;
  }

  .sidebar {
    display: block !important;
    position: relative;
    height: 100vh;
    position: sticky;
    top: 0;
  }
}
