/* Searchable select and global readability layer */

:root {
  --ui-font-size: 15px;
  --ui-small-size: 13px;
  --ui-label-size: 13px;
}

.page-content,
.content-card,
.form-card,
.table-card,
.management-card,
.data-table,
.stack-form,
.form-grid,
.filter-bar,
.inline-form {
  font-size: var(--ui-font-size);
}

input,
select,
textarea,
button,
.button {
  font-size: var(--ui-font-size);
}

label > span,
.form-label,
.field-label,
.stack-form label > span,
.form-grid label > span {
  font-size: var(--ui-label-size);
  font-weight: 750;
}

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

.data-table th {
  font-size: 12px;
  letter-spacing: .035em;
}

.data-table td,
.data-table th {
  padding: 14px 15px;
}

.side-nav,
.nav-link,
.nav-sublink,
.nav-group summary {
  font-size: 14px;
}

.nav-sublink {
  min-height: 38px;
}

.search-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.search-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
}

.search-select-trigger {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  border: 1px solid #dce3df;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.search-select-trigger:hover {
  border-color: #a9cdb8;
  background: #fcfffd;
}

.search-select-trigger:focus-visible,
.search-select.is-open .search-select-trigger {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 159, 75, .11);
}

.search-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
}

.search-select-value.is-placeholder {
  color: #8a938e;
  font-weight: 500;
}

.search-select-arrow {
  flex: 0 0 auto;
  color: #68726c;
  font-size: 17px;
  transition: transform .16s ease;
}

.search-select.is-open .search-select-arrow {
  transform: rotate(180deg);
}

.search-select-panel {
  position: absolute;
  z-index: 1200;
  top: calc(100% + 6px);
  left: 0;
  width: max(100%, 320px);
  max-width: min(560px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid #d9e1dc;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(23, 43, 33, .18);
}

.search-select-panel[hidden] {
  display: none !important;
}

.search-select-search {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border-bottom: 1px solid #e8ece9;
  background: #fafcfb;
}

.search-select-search > span {
  color: #77817b;
  font-size: 19px;
}

.search-select-search input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #dce3df;
  border-radius: 9px;
  background: #fff;
  font-size: 15px;
}

.search-select-search input:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 159, 75, .09);
}

.search-select-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 7px;
  overscroll-behavior: contain;
}

.search-select-option {
  width: 100%;
  min-height: 42px;
  display: grid;
  gap: 2px;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #222a25;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.search-select-option:hover,
.search-select-option:focus-visible {
  outline: 0;
  background: #eff9f3;
}

.search-select-option.is-selected {
  color: #087747;
  background: #e3f6eb;
  font-weight: 800;
}

.search-select-option:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.search-select-option-label {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-select-option small {
  color: #7d8781;
  font-size: 12px;
}

.search-select-empty {
  padding: 24px 16px;
  color: #747e78;
  font-size: 14px;
  text-align: center;
}

.search-select.is-disabled .search-select-trigger {
  background: #f1f3f2;
  color: #929a95;
  cursor: not-allowed;
}

.filter-bar .search-select,
.management-toolbar .search-select,
.form-grid .search-select,
.stack-form .search-select {
  min-width: 0;
}

/* Keep compact controls readable without making cards oversized. */
.button-small,
.pagination-bar .button {
  font-size: 13px;
}

.soft-badge,
.status-badge,
.stock-pill,
.online-pill {
  font-size: 12px;
}

@media (max-width: 720px) {
  .search-select-panel {
    width: 100%;
    max-width: calc(100vw - 28px);
  }

  .search-select-list {
    max-height: 260px;
  }

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