/* Model plaza shares the site's light/dark tokens and keeps its own scroll area. */

.model-plaza-page {
  min-width: 0;
  color: var(--text);
  background: transparent
}

.plaza-container {
  padding: 0 0 20px
}

.plaza-eyebrow {
  display: block;
  margin-bottom: 10px;
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  color: #8b5cf6
}

.plaza-toolbar {
  padding: 16px 18px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 16px
}

.plaza-search-row {
  display: flex;
  gap: 10px;
  align-items: center
}

.plaza-search {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 9px
}

.plaza-search:focus-within {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139,92,246,.1)
}

.plaza-search svg,.plaza-refresh svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--muted)
}

.plaza-search input::placeholder {
  color: var(--muted)
}

.plaza-sort select {
  height: 44px;
  padding: 0 30px 0 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 12px;
  cursor: pointer
}

.plaza-refresh {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  flex-shrink: 0;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 9px
}

.plaza-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px
}

.plaza-filters button {
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 7px 12px;
  font-size: 12px
}

.plaza-filters button:hover {
  color: var(--text);
  background: var(--surface-soft)
}

.plaza-filters button.active {
  background: rgba(139,92,246,.12);
  border-color: rgba(139,92,246,.22);
  color: #7c3aed;
  font-weight: 600
}

html[data-theme="dark"] .plaza-filters button.active {
  color: #c4b5fd
}

.plaza-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 16px;
  align-items: stretch
}

.plaza-card {
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color .16s,box-shadow .16s;
  overflow: hidden
}

.plaza-card:hover {
  border-color: var(--control-border);
  box-shadow: var(--ui-shadow)
}

.plaza-card.is-selected {
  border-color: rgba(139,92,246,.75);
  box-shadow: inset 0 0 0 1px rgba(139,92,246,.35),var(--ui-shadow)
}

.plaza-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px
}

.plaza-model-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 750;
  font-size: 15px;
  letter-spacing: -.5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2)
}

.plaza-type {
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 10px;
  color: var(--muted)
}

.plaza-selected-label {
  color: #8b5cf6;
  background: rgba(139,92,246,.1);
  border-color: rgba(139,92,246,.2)
}

html[data-theme="dark"] .plaza-selected-label {
  color: #c4b5fd
}

.plaza-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  letter-spacing: -.2px
}

.plaza-id-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--muted)
}

.plaza-id-row code {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px
}

.plaza-copy {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 4px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted)
}

.plaza-copy svg {
  width: 14px;
  height: 14px
}

.plaza-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 23px;
  margin-bottom: 12px
}

.plaza-tag {
  font-size: 10px;
  line-height: 1.5;
  padding: 3px 7px;
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--border)
}

.plaza-tag.media-required {
  color: #a16207;
  background: rgba(234,179,8,.08);
  border-color: rgba(234,179,8,.18)
}

html[data-theme="dark"] .plaza-tag.media-required {
  color: #fcd34d
}

.plaza-specs {
  display: grid;
  grid-template-columns: 32px minmax(0,1fr);
  gap: 6px 12px;
  margin: 0 0 14px;
  font-size: 11px;
  line-height: 1.6
}

.plaza-specs dt {
  color: var(--muted)
}

.plaza-specs dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere
}

.plaza-card-bottom {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 10px
}

.plaza-price-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px
}

.plaza-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0
}

.plaza-price strong {
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -.6px;
  font-variant-numeric: tabular-nums
}

.plaza-price span {
  font-size: 11px;
  color: var(--muted)
}

.plaza-price-link {
  border: 0;
  min-height: 30px;
  padding: 5px 0;
  background: transparent;
  color: #8b5cf6;
  font-size: 11px;
  white-space: nowrap
}

html[data-theme="dark"] .plaza-price-link {
  color: #c4b5fd
}

.plaza-price-link:hover {
  text-decoration: underline;
  background: transparent
}

.plaza-use {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 13px;
  border-radius: 8px;
  border: 1px solid var(--control-border);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 12px;
  font-weight: 600
}

.plaza-use:hover,.plaza-card.is-selected .plaza-use,.plaza-dialog .plaza-use {
  background: #8b5cf6;
  border-color: #8b5cf6;
  color: white
}

.plaza-use span {
  font-size: 16px;
  font-weight: 400
}

.plaza-footnote {
  margin: 23px 0 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  text-align: center
}

.plaza-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 16px;
  border: 1px solid rgba(234,179,8,.3);
  border-radius: 10px;
  margin-bottom: 16px;
  color: var(--text);
  font-size: 12px;
  background: rgba(234,179,8,.06)
}

.plaza-notice button {
  font-size: 12px;
  flex-shrink: 0;
  background: var(--surface);
  border-color: var(--border);
  color: var(--text)
}

.plaza-empty {
  text-align: center;
  padding: 55px 20px;
  background: var(--surface);
  border: 1px dashed var(--control-border);
  border-radius: 14px
}

.plaza-empty-icon {
  font-size: 36px;
  color: var(--muted)
}

.plaza-empty h3 {
  font-size: 16px;
  margin: 12px 0 8px
}

.plaza-empty p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0 0 20px
}

.plaza-empty button {
  background: var(--surface-soft);
  border-color: var(--control-border);
  color: var(--text);
  font-size: 12px
}

.plaza-skeleton {
  height: 330px;
  pointer-events: none
}

.plaza-skeleton div {
  border-radius: 7px;
  background: var(--surface-soft);
  height: 13px;
  margin-bottom: 16px
}

.plaza-skeleton div:first-child {
  width: 44px;
  height: 44px;
  margin-bottom: 25px
}

.plaza-skeleton div:nth-child(2) {
  width: 65%;
  height: 20px
}

.plaza-skeleton div:nth-child(3) {
  width: 45%
}

.plaza-skeleton div:last-child {
  height: 39px;
  margin-top: auto;
  margin-bottom: 0
}

.plaza-dialog::backdrop {
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px)
}

.plaza-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px
}

.plaza-dialog-head h2 {
  font-size: 20px;
  overflow-wrap: anywhere
}

.plaza-dialog-head button {
  border: 0;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 22px;
  flex-shrink: 0
}

.plaza-dialog-model-id {
  font-family: monospace;
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
  margin: 10px 0 20px
}

.plaza-price-table-wrap {
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden
}

.plaza-price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px
}

.plaza-price-table th {
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 500;
  font-size: 11px
}

.plaza-price-table th,.plaza-price-table td {
  text-align: left;
  padding: 12px 14px;
  overflow-wrap: anywhere
}

.plaza-price-table tr+tr {
  border-top: 1px solid var(--border)
}

.plaza-price-table td:last-child,.plaza-price-table th:last-child {
  text-align: right
}

#plazaPriceNote {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  margin: 16px 0 22px
}

.plaza-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border: 1px solid var(--control-border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 35px rgba(0,0,0,.2);
  font-size: 12px;
  z-index: 200
}

.plaza-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0
}

.model-plaza-page :focus-visible,.plaza-dialog :focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 3px
}

.model-plaza-page .plaza-search input:focus-visible {
  outline: none
}

/* Cards and filters share the same glass as the rest of the app. */

.plaza-card,.plaza-toolbar {
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--ui-shadow)
}

.plaza-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  flex-wrap: wrap
}

.plaza-count {
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 2px 8px;
  margin-left: auto
}

.plaza-results {
  font-size: 11px;
  color: var(--muted);
  white-space: normal
}

.plaza-dialog {
  width: min(460px,calc(100vw - 32px));
  max-height: 85vh;
  overflow: auto;
  padding: 26px;
  border: 1px solid var(--control-border);
  border-radius: 18px;
  color: var(--text);
  box-shadow: 0 20px 80px rgba(0,0,0,.3);
  background: var(--solid-surface)
}

@media(max-width:1200px) {

  .plaza-card {
    padding: 16px
  }

  .plaza-grid {
    gap: 12px
  }

  .plaza-specs {
    gap: 6px 9px
  }

  .plaza-filters button {
    padding: 7px 9px
  }
}

@media(max-width:1050px) {

  .plaza-grid {
    grid-template-columns: repeat(2,minmax(0,1fr))
  }
}

@media(max-width:600px) {

  .plaza-grid {
    grid-template-columns: 1fr
  }

  .plaza-toolbar {
    padding: 14px
  }

  .plaza-search-row {
    flex-wrap: wrap;
    gap: 8px
  }

  .plaza-search {
    flex-basis: 100%
  }

  .plaza-sort {
    flex: 1
  }

  .plaza-sort select {
    max-width: none;
    width: 100%
  }

  .plaza-filter-row {
    gap: 9px
  }

  .plaza-filters {
    flex-wrap: wrap;
    gap: 4px
  }

  .plaza-filters button {
    font-size: 11px;
    padding: 6px 8px
  }

  .plaza-count {
    margin-left: 0
  }

  .plaza-results {
    margin-left: auto
  }

  .plaza-card {
    padding: 18px
  }

  .plaza-toast {
    max-width: calc(100vw - 30px);
    white-space: normal;
    text-align: center
  }
}

.plaza-search input[type="search"] {
  width: 100%;
  min-width: 0;
  height: 42px;
  outline: none;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 8px 0
}
