/* PWA mobile styles — use px (not rem) to avoid root font-size / viewport quirks. */

#app {
  min-height: auto;
}

/* Default: touch phones and tablets */
body {
  font-size: 40px;
  line-height: 1.5;
}

h2 {
  font-size: 50px;
  line-height: 1.25;
  margin-bottom: 0.65rem;
}

.topbar-title strong {
  font-size: 44px;
}

.container {
  padding: 0.75rem 0.85rem;
}

.topbar-inner {
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.topbar-user {
  font-size: 36px;
  align-items: stretch;
  gap: 0.45rem;
}

.topbar-user-account .account-select {
  flex: 1 1 100%;
  max-width: none;
  font-size: 38px;
  padding: 0.55rem 0.7rem;
  min-height: 3.25rem;
}

.topbar-user-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: nowrap;
}

.topbar-user-actions .btn-link {
  padding: 12px 8px;
}

.topbar-version {
  font-size: 30px;
}

label {
  font-size: 38px;
  margin-bottom: 0.4rem;
}

.hint,
.muted,
.flash,
.confirm-message,
p,
li,
ol {
  font-size: 36px;
}

.confirm-title {
  font-size: 46px;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"],
textarea,
select,
.table-input,
.input {
  font-size: 38px;
  padding: 0.65rem 0.75rem;
  min-height: 3.25rem;
}

textarea,
textarea.input {
  min-height: 8rem;
}

.checkbox-label {
  font-size: 38px;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

input[type="checkbox"],
.checkbox-label input[type="checkbox"],
.list-item-check input[type="checkbox"],
.list-select-col input[type="checkbox"],
.sieve-check input[type="checkbox"] {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
}

.btn {
  font-size: 38px;
  padding: 0.7rem 1.1rem;
  min-height: 3.25rem;
}

.btn-sm {
  font-size: 32px;
  padding: 0.55rem 0.95rem;
  min-height: 3rem;
}

.btn-link {
  font-size: 36px;
  padding: 0.45rem 0;
  min-height: 3.25rem;
}

.inline-add {
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.55rem;
}

.inline-add .btn {
  flex: 0 0 auto;
}

.data-table {
  display: block;
  overflow-x: auto;
  font-size: 32px;
}

.data-table th,
.data-table td {
  padding: 0.6rem 0.4rem;
}

.address-list li {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.7rem 0;
  font-size: 36px;
}

.address-list li span {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.address-list li .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

code {
  font-size: 32px;
}

.card {
  padding: 0.9rem;
  margin-bottom: 0.9rem;
}

.confirm-overlay {
  padding: 32px 20px;
}

.confirm-dialog {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 32px 28px;
}

.confirm-title {
  line-height: 1.25;
}

.confirm-message {
  line-height: 1.45;
}

.confirm-actions {
  flex-wrap: wrap;
  gap: 16px;
}

.confirm-actions .btn {
  flex: 1 1 auto;
}

/* Mouse/trackpad desktop — smaller text; window width does not matter */
@media (hover: hover) and (pointer: fine) {
  body {
    font-size: 18px;
  }

  h2 {
    font-size: 24px;
  }

  .topbar-title strong {
    font-size: 20px;
  }

  .container {
    padding: 1.5rem;
  }

  .topbar-inner {
    flex-direction: row;
    align-items: center;
  }

  .topbar-user {
    font-size: 16px;
    align-items: flex-end;
  }

  .topbar-version {
    font-size: 13px;
  }

  .topbar-user-account .account-select {
    max-width: 14rem;
    flex: 0 1 auto;
    font-size: 16px;
    min-height: 2.5rem;
  }

  .topbar-user-actions {
    gap: 16px;
  }

  .topbar-user-actions .btn-link {
    padding: 8px 4px;
  }

  label {
    font-size: 16px;
  }

  .hint,
  .muted,
  .flash,
  .confirm-message,
  p,
  li,
  ol {
    font-size: 16px;
  }

  .confirm-title {
    font-size: 22px;
  }

  input[type="email"],
  input[type="password"],
  input[type="text"],
  input[type="number"],
  textarea,
  select,
  .table-input,
  .input {
    font-size: 16px;
    min-height: 2.5rem;
  }

  textarea,
  textarea.input {
    min-height: 6rem;
  }

  .checkbox-label {
    font-size: 16px;
  }

  input[type="checkbox"],
  .checkbox-label input[type="checkbox"],
  .list-item-check input[type="checkbox"],
  .list-select-col input[type="checkbox"],
  .sieve-check input[type="checkbox"] {
    width: 1.25em;
    height: 1.25em;
    min-width: 1.25em;
    min-height: 1.25em;
  }

  .btn {
    font-size: 16px;
    min-height: 2.5rem;
  }

  .btn-sm {
    font-size: 14px;
    min-height: 2.25rem;
  }

  .btn-link {
    font-size: 16px;
    min-height: 2.5rem;
  }

  .data-table {
    font-size: 15px;
  }

  .address-list li {
    font-size: 16px;
  }

  code {
    font-size: 14px;
  }

  .card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .confirm-overlay {
    padding: 24px;
  }

  .confirm-dialog {
    width: min(100%, 36rem);
    padding: 1.5rem;
  }

  .confirm-actions {
    gap: 12px;
  }
}
