/* 1995 FOOD & BEER — Employee mobile experience v2.0.4
   This layer only applies on phones. Desktop layout remains untouched. */
@media (max-width: 767px) {
  html, body, #root {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  .employee-portal-shell {
    min-height: 100vh !important;
    min-height: 100dvh !important;
    overflow-x: clip;
  }

  .employee-app-surface {
    min-height: 100vh !important;
    min-height: 100dvh !important;
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .employee-content { overflow: visible !important; }
  .employee-home, .employee-attendance { padding-bottom: 24px !important; }

  /* Make the header actions and all bottom navigation targets reliable for thumbs. */
  .employee-quick-icon {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
  }
  .employee-quick-icon svg { width: 17px !important; height: 17px !important; }

  .employee-bottom-nav {
    width: min(100%, 28rem) !important;
    max-width: none !important;
    height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    padding: 7px 10px calc(7px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .employee-nav-item {
    min-width: 44px !important;
    min-height: 44px !important;
    justify-content: center !important;
  }
  .employee-bottom-nav .employee-punch-fab { margin-top: -24px !important; }
  .employee-bottom-nav .employee-punch-fab > button {
    width: 58px !important;
    height: 58px !important;
  }

  /* Long names and live-state labels stay inside the app surface. */
  .employee-hero { padding-top: max(14px, env(safe-area-inset-top, 0px)) !important; }
  .employee-hero .text-right { max-width: 108px; }
  .employee-hero .mt-3.pt-2\.5 { gap: 8px !important; }
  .employee-hero .mt-3.pt-2\.5 > div:last-child { max-width: 56%; text-align: right; }
  .employee-quick-actions > button { min-height: 112px !important; padding: 12px 8px !important; }

  /* Keep controls legible and prevent iOS from zooming the page on focus. */
  .employee-portal-shell input,
  .employee-portal-shell select,
  .employee-portal-shell textarea {
    font-size: 16px !important;
  }
  .employee-portal-shell input:not([type="checkbox"]):not([type="radio"]),
  .employee-portal-shell select { min-height: 44px !important; }

  /* Employee dialogs become bottom sheets, avoiding cramped centered cards. */
  .employee-portal-shell .fixed.inset-0 {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .employee-portal-shell .fixed.inset-0 > .bg-white {
    width: 100% !important;
    max-width: none !important;
    max-height: min(91dvh, 820px) !important;
    margin: 0 !important;
    padding: 16px !important;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    overflow-y: auto !important;
    border-radius: 24px 24px 0 0 !important;
  }
  .employee-portal-shell .fixed.inset-0 .grid-cols-2,
  .employee-portal-shell .fixed.inset-0 .grid-cols-3 {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  /* Attendance history is dense by design; retain data without horizontal overflow. */
  .employee-attendance .grid.grid-cols-4 { gap: 6px !important; }
  .employee-attendance .grid.grid-cols-4 > div { min-width: 0 !important; padding: 8px 4px !important; }
  .employee-attendance .grid.grid-cols-3 { gap: 7px !important; }
  .employee-attendance .grid.grid-cols-3 > div { min-width: 0 !important; padding: 10px 8px !important; }
}

@media (max-width: 374px) {
  .employee-hero { padding-left: 12px !important; padding-right: 12px !important; }
  .employee-hero .text-right { max-width: 94px; padding-left: 7px !important; padding-right: 7px !important; }
  .employee-quick-actions { gap: 8px !important; }
  .employee-quick-actions > button { min-height: 104px !important; }
  .employee-bottom-nav { padding-left: 6px !important; padding-right: 6px !important; }
  .employee-admin-switch { display: none !important; }
}
