/* Studio controls only; the original website preview keeps its own styles. */
.studio-select {
  display: block;
  min-width: 0;
  width: 100%;
  color: var(--ink, #222a2c);
  font: 400 14px/1.45 var(--font, "Segoe UI", Arial, sans-serif);
}

.studio-select > select { display: none !important; }

.studio-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #dce0d8;
  border-radius: 8px;
  color: inherit;
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .12s, background-color .12s;
}

.studio-select-trigger:hover:not(:disabled) { border-color: #bdc4ba; }
.studio-select-trigger[aria-expanded="true"] { border-color: #c78e76; }
.studio-select-trigger:focus-visible,
.studio-select-option:focus-visible { outline: 2px solid var(--accent, #c95033); outline-offset: 2px; }
.studio-select-trigger:disabled { color: #939b92; background: #f7f7f4; opacity: 1; cursor: default; }
.studio-select-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.studio-select-chevron {
  display: grid;
  place-items: center;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  color: var(--muted, #69716f);
  font-size: 0;
}
.studio-select-chevron > * { display: none; }
.studio-select-chevron::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  transition: transform .12s;
}
.studio-select-trigger[aria-expanded="true"] .studio-select-chevron::before { transform: translate(2px, 2px) rotate(225deg); }

.studio-select-menu {
  display: none;
  position: fixed;
  inset: auto;
  z-index: 1000;
  min-width: min(200px, calc(100vw - 16px));
  max-width: calc(100vw - 16px);
  max-height: min(var(--menu-height, 320px), calc(100dvh - 16px));
  margin: 0;
  padding: 5px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #dce0d8;
  border-radius: 8px;
  color: var(--ink, #222a2c);
  background: #fff;
  box-shadow: 0 8px 28px #222a2c18, 0 2px 6px #222a2c08;
  font: 400 14px/1.45 var(--font, "Segoe UI", Arial, sans-serif);
  scrollbar-width: thin;
  scrollbar-color: #d6dcd1 transparent;
}
.studio-select-menu:not([hidden]) { display: grid; gap: 2px; }
.studio-select-menu::backdrop { background: transparent; pointer-events: none; }

.studio-select-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 9px 11px;
  border: 0;
  border-radius: 5px;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.studio-select-option:hover:not(:disabled):not([aria-disabled="true"]) { background: #f5f6f1; }
.studio-select-option.is-active,
.studio-select-option[aria-selected="true"] { color: #9f4029; background: #f9eee8; }
.studio-select-option::after {
  content: "";
  justify-self: center;
  width: 6px;
  height: 10px;
  margin-top: -3px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  opacity: 0;
  transform: rotate(45deg);
}
.studio-select-option[aria-selected="true"]::after { opacity: 1; }
.studio-select-option:disabled,
.studio-select-option[aria-disabled="true"] { color: #9aa199; background: transparent; opacity: 1; cursor: default; }

/* The page control already supplies its white border and leading page icon. */
.page-control:has(.studio-select) { gap: 6px; padding: 0 9px; border-radius: 8px; }
.page-control .studio-select { flex: 1 1 auto; width: auto; min-width: 86px; max-width: 150px; }
.page-control .studio-select-trigger { min-height: 42px; padding: 8px 1px; border: 0; border-radius: 4px; background: transparent; }

.studio-select.zoom-select { flex-shrink: 0; width: auto; max-width: 150px; }
.studio-select.zoom-select .studio-select-trigger { min-height: 28px; padding: 3px 2px; border: 0; border-radius: 4px; color: #6a7467; background: transparent; font-size: 12px; }
.studio-select.zoom-select .studio-select-trigger:hover:not(:disabled) { color: #222a2c; }
#dialog .studio-select.asset-target-select { min-height: 0; padding: 0; border: 0; background: transparent; }

@media (max-width: 600px) {
  .studio-select-option { min-height: 44px; }
  .page-control .studio-select { min-width: 80px; max-width: 118px; }
}
@media (prefers-reduced-motion: reduce) {
  .studio-select-trigger,
  .studio-select-chevron::before { transition: none; }
}
