/* ───────────────────────────────────────────────────────────────────
   eSchematic — Mobile breakpointy (≤720 px = tablet, ≤480 px = telefon)
   Přidáno 2026-04-30. Doplňuje style.css o úpravy pro úzké obrazovky.
   Zahrnuje: tool.html (editor), dashboard.html, plan.html, account.html.
   ─────────────────────────────────────────────────────────────────── */

/* ── Tablet ≤ 720 px ──────────────────────────────────────────────────── */
@media (max-width: 720px) {

  /* Common — hlavička stack */
  .tool-header-inner,
  .dash-header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .tool-header-actions,
  .dash-header-actions {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }
  .tool-header-btn,
  .auth-btn {
    font-size: 12px;
    padding: 6px 10px;
  }

  /* Editor toolbar — horizontal scroll */
  .fp-toolbar {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .fp-tool-group {
    flex-shrink: 0;
  }
  .fp-tool-btn {
    font-size: 12px;
    padding: 6px 10px;
    white-space: nowrap;
  }

  /* Canvas — menší výška na tabletu */
  #canvas-container { max-height: 60vh; }

  /* Dashboard projekty — 2 sloupce místo 3-4 */
  .proj-grid,
  .dash-projects-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  /* Plan — wizard kroky single col */
  .plan-wizard-step,
  .plan-form {
    padding: 18px;
  }

  /* Account — sticky ceník přestane být sticky */
  .account-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  .account-services {
    position: static !important;
  }
}

/* ── Telefon ≤ 480 px ─────────────────────────────────────────────────── */
@media (max-width: 480px) {

  /* Common — minimální hlavička */
  .tool-header,
  .dash-header,
  .lp-header {
    padding: 10px 12px;
  }
  .tool-header-brand-name,
  .dash-brand-name,
  .lp-brand-name {
    font-size: 14px;
  }
  .tool-header-brand-sub,
  .lp-brand-tag {
    display: none;
  }

  /* Tool — kompaktnější vše */
  .tool-main {
    padding: 10px 8px;
  }
  .tool-section {
    padding: 14px 12px;
    border-radius: 10px;
  }
  .tool-section-head h2 {
    font-size: 16px;
  }

  /* Editor toolbar — text only u tlačítek */
  .fp-tool-btn {
    font-size: 11px;
    padding: 5px 8px;
  }
  .fp-group-label {
    font-size: 10px;
  }
  /* Canvas — ještě menší */
  #canvas-container { max-height: 50vh; }
  #floorplan-canvas { touch-action: none; }

  /* Summary pod canvasem — stack */
  .fp-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 12px;
  }

  /* Dashboard projekty — 1 sloupec */
  .proj-grid,
  .dash-projects-grid {
    grid-template-columns: 1fr !important;
  }
  .proj-card,
  .dash-project-card {
    padding: 14px;
  }

  /* Dashboard hlavička user email */
  .dash-user-email {
    font-size: 11px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Plan — input pole plnou šířku */
  .plan-options-grid {
    grid-template-columns: 1fr !important;
  }
  .plan-cta {
    width: 100%;
    font-size: 14px;
  }

  /* Account — všechny řádky stack */
  .account-form .field-row {
    flex-direction: column;
    gap: 4px;
  }
  .account-form label {
    min-width: auto !important;
  }
  .account-services-table {
    font-size: 12px;
  }
  .account-services-table th,
  .account-services-table td {
    padding: 4px 6px;
  }

  /* Auth stránky — menší padding */
  .auth-card {
    padding: 24px 18px;
    border-radius: 12px;
  }
  .auth-title {
    font-size: 22px;
  }

  /* Modaly — plnou šířku */
  .dash-modal,
  .modal-content {
    max-width: 100% !important;
    width: 100% !important;
    margin: 8px !important;
    padding: 18px !important;
    max-height: 95vh;
    overflow-y: auto;
  }

  /* New project intake modal — kompaktnější */
  .np-section {
    padding: 12px;
  }
  .np-section-num {
    font-size: 14px;
  }
  .np-section-title {
    font-size: 14px;
  }
  .np-type-grid,
  .np-es-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }
  .np-type-card,
  .np-es-card {
    padding: 8px;
    font-size: 12px;
  }

  /* Skryj méně důležité odkazy v hlavičce dashboardu na malém telefonu */
  .dash-header .auth-btn[href="/slovnik"],
  .dash-header .auth-btn[href="/normy"] {
    display: none;
  }

  /* Long buttony se řadí pod sebe */
  .tool-header-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .tool-header-actions > * {
    width: 100%;
    text-align: center;
  }
}

/* ── Touch friendly — hover efekty na touch zařízeních vypnout ─────────── */
@media (hover: none) {
  .proj-card:hover,
  .lp-pricing-card:hover,
  .pr-card:hover {
    transform: none;
    box-shadow: none;
  }
}
