.floor-picker-select,
.floor-picker-input {
  min-height: 48px;
  font-size: 18px;
}

.floor-picker-input-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.floor-picker-input-row > input.floor-picker-input {
  flex: 1 1 auto;
  width: 1px;
  min-width: 0;
  min-height: 48px;
  max-width: 100%;
  box-sizing: border-box;
}

.floor-picker-trigger {
  flex: 0 0 88px;
  width: 88px;
  min-width: 88px;
  min-height: 48px;
  padding: 4px;
  font-size: 18px;
  line-height: 1.15;
  white-space: nowrap;
}

.floor-picker-trigger:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.floor-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  padding: 12px;
  background: rgba(15, 23, 42, .48);
}

.floor-picker-backdrop[hidden] {
  display: none !important;
}

.floor-picker-dialog {
  display: flex;
  flex-direction: column;
  width: min(960px, calc(100vw - 24px));
  height: min(900px, calc(100vh - 32px));
  max-height: calc(100vh - 32px);
  min-width: 0;
  overflow: hidden;
  border: 1px solid #c7cbd2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .24);
}

@supports (height: 100dvh) {
  .floor-picker-dialog {
    height: min(900px, calc(100dvh - 32px));
    max-height: calc(100dvh - 32px);
  }
}

.floor-picker-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 14px 20px;
  border-bottom: 1px solid #d9dde3;
}

.floor-picker-header h2 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: #111827;
  font-size: 24px;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
}

.floor-picker-close {
  box-sizing: border-box;
  flex: 0 0 104px;
  width: 104px;
  min-width: 104px;
  height: 48px;
  min-height: 48px;
  padding: 8px 12px;
  font-size: 18px;
  white-space: nowrap;
}

button.floor-picker-clear {
  box-sizing: border-box;
  flex: 0 0 104px;
  width: 104px;
  min-width: 104px;
  height: 48px;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid #aeb4bd;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-weight: 600;
  white-space: nowrap;
}

button.floor-picker-clear:hover,
button.floor-picker-clear:focus {
  background: #f3f6fa;
  color: #111827;
}

button.floor-picker-clear.is-selected,
button.floor-picker-clear.is-selected:hover,
button.floor-picker-clear.is-selected:focus {
  border-color: #1769d2;
  background: #1976df;
  color: #fff;
}

.floor-picker-status {
  flex: 0 0 auto;
  min-height: 0;
  margin: 0;
  padding: 4px 16px 0;
  color: #475569;
  font-size: 18px;
  line-height: 1.35;
}

.floor-picker-status:empty {
  display: none;
}

.floor-picker-navigation,
.floor-picker-swipe-hint {
  display: none;
}

.floor-picker-columns {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 0.85fr) minmax(0, 1.15fr);
  grid-template-areas:
    "outdoor department office"
    "basement department office";
  column-gap: 26px;
  row-gap: 16px;
  min-height: 0;
  padding: 12px;
}

.floor-picker-column[data-floor-picker-section="outdoor"] {
  grid-area: outdoor;
}

.floor-picker-column[data-floor-picker-section="basement"] {
  grid-area: basement;
}

.floor-picker-column[data-floor-picker-section="department"] {
  grid-area: department;
}

.floor-picker-column[data-floor-picker-section="office"] {
  grid-area: office;
}

.floor-picker-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.floor-picker-column-title {
  flex: 0 0 auto;
  min-height: 36px;
  margin: 0 0 8px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #eef0f3;
  color: #111827;
  font-size: 20px;
  line-height: 1.2;
  text-align: center;
}

.floor-picker-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 0 0 2px;
}

.floor-picker-option {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #aeb4bd;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: keep-all;
  cursor: pointer;
}

@media (min-width: 1200px) {
  .floor-picker-option {
    white-space: nowrap;
    overflow-wrap: normal;
  }
}

button.floor-picker-option {
  background: #fff;
  color: #111827;
}

button.floor-picker-option:hover,
button.floor-picker-option:focus {
  background: #f3f6fa;
  color: #111827;
}

button.floor-picker-option.is-selected,
button.floor-picker-option.is-selected:hover,
button.floor-picker-option.is-selected:focus {
  border-color: #1769d2;
  background: #1976df;
  color: #fff;
}

.floor-picker-option:focus-visible,
.floor-picker-clear:focus-visible,
.floor-picker-close:focus-visible,
.floor-picker-trigger:focus-visible {
  outline: 3px solid #1769d2;
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .floor-picker-backdrop {
    padding: 6px;
  }

  .floor-picker-dialog {
    width: calc(100vw - 12px);
    height: calc(100vh - 12px);
    max-height: calc(100vh - 12px);
    border-radius: 12px;
  }

  @supports (height: 100dvh) {
    .floor-picker-dialog {
      height: calc(100dvh - 12px);
      max-height: calc(100dvh - 12px);
    }
  }

  .floor-picker-header {
    gap: 8px;
    padding: 10px 12px;
  }

  .floor-picker-header h2 {
    font-size: 22px;
  }

  .floor-picker-columns {
    display: flex;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    padding: 0;
  }

  .floor-picker-columns::-webkit-scrollbar {
    display: none;
  }

  .floor-picker-navigation {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 8px 12px 0;
  }

  .floor-picker-navigation button {
    min-width: 0;
    min-height: 48px;
    padding: 6px 2px;
    border: 1px solid #aeb4bd;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
  }

  .floor-picker-navigation button.is-active {
    border-color: #1769d2;
    background: #1976df;
    color: #fff;
  }

  .floor-picker-navigation button:focus-visible {
    outline: 3px solid #1769d2;
    outline-offset: 2px;
  }

  .floor-picker-swipe-hint {
    display: block;
    flex: 0 0 auto;
    margin: 0;
    padding: 4px 16px 6px;
    color: #475569;
    font-size: 16px;
    line-height: 1.2;
    text-align: center;
  }

  .floor-picker-column {
    flex: 0 0 100%;
    box-sizing: border-box;
    padding: 0 12px 8px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .floor-picker-column-title {
    display: none;
  }

  .floor-picker-list {
    gap: 6px;
    padding-right: 1px;
    scrollbar-width: thin;
    touch-action: pan-x pan-y;
  }

  .floor-picker-option {
    min-height: 48px;
    padding: 9px 7px;
    font-size: 18px;
    line-height: 1.25;
  }
}

.floor-picker-dialog :is(.floor-picker-option, .floor-picker-close, .floor-picker-clear, .floor-picker-navigation button),
.floor-picker-input-row > .floor-picker-trigger {
  font-size: max(18px, var(--ui-min-font-size, 17px)) !important;
}
