/* Device entry is intentionally short: type, brand, then the relevant models. */
.device-entry,
.device-brand-screen {
  width: 100%;
  max-width: 1000px;
  margin-inline: auto;
}

.device-entry .entry-heading { max-width: 650px; }
.device-entry .entry-heading .page-heading,
.device-brand-heading .page-heading { margin-bottom: 0; }
.device-brand-heading { margin-bottom: 24px; }
.device-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.device-type-card,
.device-brand-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .16s ease, background-color .16s ease;
}
.device-type-card {
  flex-direction: column;
  align-items: flex-start;
  min-height: 256px;
  padding: 24px;
}
.device-type-image,
.device-brand-image {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
}
.device-type-image { width: 100%; height: 128px; }
.device-type-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 178px;
  object-fit: contain;
}
.device-type-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding-right: 18px;
}
.device-type-label strong,
.device-brand-card strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.25px;
}
.device-type-label small,
.device-brand-card small {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 400;
}
.device-type-card > .icon {
  position: absolute;
  right: 20px;
  bottom: 39px;
  width: 18px;
  height: 18px;
  color: var(--teal);
}
.device-type-card:focus-visible,
.device-brand-card:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}
.device-type-help {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 6px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}
.device-type-help a { color: var(--teal); min-height: 44px; display: inline-flex; align-items: center; }
.device-brand-screen { padding: 34px 32px 38px; }
.device-brand-screen .page-intro { margin-bottom: 23px; }
.device-path,
.device-picker-context {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 14px;
}
.device-path > .icon,
.device-picker-context > .icon { width: 14px; height: 14px; color: var(--muted); }
.device-picker-context strong { color: var(--ink); font-weight: 500; }
.device-picker-context > .text-link { min-height: 44px; margin-left: auto; padding-block: 7px; }
.device-brand-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.device-brand-card { min-height: 114px; padding: 16px 19px; }
.device-brand-image { width: 88px; height: 76px; }
.device-brand-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.device-brand-card > span:not(.device-brand-image) { flex: 1; min-width: 0; }
.device-brand-card strong { font-size: 19px; margin-bottom: 4px; }
.device-brand-card > .icon { flex: 0 0 18px; width: 18px; height: 18px; color: var(--teal); }
.device-picker-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  margin-top: 14px;
  padding: 7px 0;
  color: var(--teal);
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
}
.device-picker-back > .icon { width: 16px; height: 16px; }
body[data-entry="types"][data-view="booking"] .app-dock,
body[data-view="brands"] .app-dock,
body[data-view="devices"] .app-dock { display: none; }

@media (hover: hover) {
  .device-type-card:hover,
  .device-brand-card:hover { border-color: #91a8bc; background: #fafbfd; }
}

@media (min-width: 1000px) {
  .device-entry { padding-top: 42px; }
  .device-entry .entry-heading { margin-bottom: 30px; }
  .device-entry .page-heading,
  .device-brand-screen .page-heading { font-size: 34px; }
  .device-brand-screen { max-width: 900px; padding-top: 42px; }
}

@media (max-width: 999px) {
  body[data-view="brands"] .app-navigation,
  body[data-view="devices"] .app-navigation { display: none; }
  body[data-view="brands"] .app-workspace,
  body[data-view="devices"] .app-workspace { grid-template-rows: minmax(0, 1fr); }
  .device-type-card,
  .device-brand-card { border-color: #e1e6ee; box-shadow: 0 2px 5px rgb(29 45 68 / 2%); }
  .device-type-card:active,
  .device-brand-card:active { background: #eef2f7; border-color: #aabbd0; }
  .device-type-card:focus-visible,
  .device-brand-card:focus-visible { outline-color: #6c85a6; }
}

@media (max-width: 640px) {
  .device-entry { padding-top: 23px; }
  .device-entry .entry-heading,
  .device-brand-heading { margin-bottom: 18px; }
  .device-type-grid { grid-template-columns: 1fr; gap: 12px; }
  .device-type-card {
    flex-direction: row;
    align-items: center;
    min-height: 102px;
    padding: 14px 16px;
    border-radius: 16px;
    gap: 15px;
  }
  .device-type-image { width: 74px; height: 70px; }
  .device-type-image img { max-width: 100%; }
  .device-type-label { flex: 1; padding-right: 0; gap: 5px; }
  .device-type-label strong { font-size: 19px; }
  .device-type-label small { font-size: 14px; }
  .device-type-card > .icon { position: static; flex: 0 0 17px; width: 17px; height: 17px; color: #7c91ae; }
  .device-type-help { margin-top: 15px; line-height: 1.45; }
  .device-brand-screen { max-width: 560px; padding: 23px 18px 27px; }
  .device-brand-screen .page-heading { font-size: 27px; line-height: 1.18; letter-spacing: -.65px; }
  .device-brand-screen .page-intro { font-size: 15px; margin-bottom: 22px; }
  .device-brand-grid { grid-template-columns: 1fr; gap: 12px; }
  .device-brand-card { min-height: 102px; padding: 14px 16px; gap: 15px; border-radius: 16px; }
  .device-brand-image { width: 74px; height: 70px; }
  .device-brand-card strong { font-size: 19px; }
  .device-brand-card > .icon { color: #7c91ae; }
  .device-path,
  .device-picker-context { margin-bottom: 13px; }
  .device-picker-back { margin-top: 13px; }
  body[data-view="brands"] .brand-home,
  body[data-view="devices"] .brand-home { display: none; }
  body[data-view="brands"] .app-topbar-title,
  body[data-view="devices"] .app-topbar-title { display: block; font-size: 16px; }
}

@media (max-width: 374px) {
  .device-type-card,
  .device-brand-card { gap: 12px; padding: 12px; min-height: 96px; }
  .device-type-image,
  .device-brand-image { width: 66px; height: 68px; }
  .device-type-label strong,
  .device-brand-card strong { font-size: 18px; }
  .device-brand-screen { padding-inline: 14px; }
  .device-type-label small { line-height: 1.35; }
}

@media (prefers-reduced-motion: reduce) {
  .device-type-card,
  .device-brand-card { transition: none; }
}
