/*
 * intranet-responsive.css — global mobile fixes για όλες τις σελίδες του intranet.
 * Φιλοσοφία: τα headers/menus/toolbars να μην τρώνε όλη την οθόνη σε iPhone (≤480px).
 *
 * Συμπεριλαμβάνεται μετά τα page-specific styles ώστε να κερδίζει για mobile rules.
 * Προσοχή: !important χρησιμοποιείται όπου απαιτείται override embedded styles.
 */

/* ── iPhone & μικρές οθόνες (≤480px) ─────────────────────────────────── */
@media (max-width: 480px) {

  /* --- Sticky headers (intra-header / header-bar / page-header) --- */
  .intra-header-row,
  .header-bar,
  .page-header,
  .header-wrapper {
    padding: 6px 10px !important;
    gap: 6px !important;
    min-height: auto !important;
    flex-wrap: wrap !important;
  }

  /* Brand title να μην παίρνει πολύ χώρο */
  .brand-name,
  .header-title,
  .brand-title {
    font-size: 13px !important;
  }
  .brand img,
  .brand-logo img,
  .header-logo img {
    height: 22px !important;
    max-width: 100px !important;
  }
  .brand-icon {
    font-size: 18px !important;
  }

  /* --- Header-right action group: wrap + smaller buttons --- */
  .header-right,
  .header-actions,
  .actions-bar {
    gap: 4px !important;
    margin-left: 0 !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
  }

  /* Bootstrap buttons σε header context */
  .intra-header .btn,
  .header-bar .btn,
  .header-right .btn,
  .header-actions .btn {
    padding: 5px 9px !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
  }
  .intra-header .btn-sm,
  .header-right .btn-sm {
    padding: 4px 8px !important;
    font-size: 11px !important;
  }

  /* User pill chips */
  .user-pill,
  .role-pill,
  .badge.user-badge {
    font-size: 11px !important;
    padding: 3px 8px !important;
  }

  /* --- Tab navigation horizontal scroll αντί για cramping --- */
  .nav-tabs,
  .tab-bar,
  .tabs-bar {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .nav-tabs::-webkit-scrollbar,
  .tab-bar::-webkit-scrollbar,
  .tabs-bar::-webkit-scrollbar {
    height: 3px;
  }
  .nav-tabs .nav-link,
  .tab-bar button,
  .tabs-bar button,
  .tab-btn {
    white-space: nowrap !important;
    padding: 9px 12px !important;
    font-size: 12px !important;
    flex-shrink: 0 !important;
  }

  /* --- Toolbars & search rows --- */
  .toolbar,
  .search-row,
  .actions-row,
  .filter-row {
    gap: 6px !important;
    padding: 8px 10px !important;
    flex-wrap: wrap !important;
  }
  .search-row input,
  .toolbar input[type="search"],
  .toolbar input[type="text"] {
    min-width: 0 !important;
    flex: 1 1 100% !important;
  }

  /* --- Summary chips (status counters) --- */
  .summary-bar,
  .sum-chips,
  .status-row {
    gap: 4px !important;
    padding: 8px 10px !important;
    flex-wrap: wrap !important;
  }
  .sum-chip,
  .status-chip,
  .stat-chip {
    font-size: 11px !important;
    padding: 4px 8px !important;
  }

  /* --- App cards grid στο index --- */
  .app-card {
    padding: 14px !important;
  }
  .app-icon {
    font-size: 28px !important;
  }
  .app-title {
    font-size: 14px !important;
  }
  .app-desc {
    font-size: 11px !important;
    line-height: 1.4 !important;
  }

  /* --- Modals full-screen σε iPhone --- */
  .modal-dialog {
    margin: 8px !important;
    max-width: calc(100vw - 16px) !important;
  }
  .modal-content,
  .modal-box,
  .modal-card {
    border-radius: 12px !important;
  }
  .modal-body {
    padding: 12px !important;
  }
  .modal-footer,
  .modal-actions {
    padding: 10px 12px !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  /* --- Tables σε wrappers με horizontal scroll --- */
  .table-responsive,
  .recent-table,
  .docs-box table,
  .users-tbl {
    font-size: 12px !important;
  }
  .table-responsive table,
  .docs-box table {
    min-width: 480px;
  }

  /* --- Container padding generic --- */
  .container-fluid,
  .container,
  .container-inner {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  /* --- Hide non-essential header elements σε iPhone --- */
  .hide-on-mobile,
  .d-mobile-none {
    display: none !important;
  }

  /* --- iOS auto-zoom fix: inputs με font <16px προκαλούν zoom στο focus --- */
  input[type="text"],
  input[type="number"],
  input[type="search"],
  input[type="password"],
  input[type="tel"],
  input[type="email"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* ── Tablet (≤768px) — λιγότερα aggressive overrides ────────────────── */
@media (max-width: 768px) {
  .intra-header-row,
  .header-bar {
    flex-wrap: wrap;
  }
  .header-right {
    flex-wrap: wrap;
  }
}
