@charset "UTF-8";

/*
 * ZERO Assist for SHIMA BUILDER v5
 * UI/state assistance only. Existing shelf grids and prompt generation remain untouched.
 */

.zero-assist-toolbar,
.zero-selection-tray {
  max-width: 1000px;
  margin: 0 auto 12px;
  box-sizing: border-box;
}

.zero-assist-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid rgba(102, 227, 208, 0.18);
  border-radius: 14px;
  background: linear-gradient(105deg, rgba(17, 27, 44, 0.94), rgba(11, 19, 32, 0.94));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.zero-assist-toolbar__title,
.zero-selection-tray__title {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.zero-assist-toolbar__title strong,
.zero-selection-tray__title strong {
  color: #eaf5ff;
  font-size: 0.92rem;
  line-height: 1.25;
}

.zero-assist-eyebrow {
  color: #66e3d0;
  font-size: 0.66rem;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.zero-assist-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.zero-filter-button,
.zero-preset-button {
  flex: 0 0 auto !important;
  min-height: 38px;
  padding: 7px 11px !important;
  border: 1px solid rgba(147, 178, 211, 0.18) !important;
  border-radius: 10px !important;
  background: rgba(15, 25, 42, 0.94) !important;
  color: #aebfd0 !important;
  box-shadow: none !important;
  font-size: 0.78rem !important;
  white-space: nowrap;
}

.zero-filter-button:hover,
.zero-preset-button:hover {
  color: #f0f8ff !important;
  border-color: rgba(102, 227, 208, 0.38) !important;
  background: rgba(25, 42, 62, 0.98) !important;
}

.zero-filter-button.is-active {
  color: #8ff1e2 !important;
  border-color: rgba(102, 227, 208, 0.55) !important;
  background: rgba(62, 139, 132, 0.18) !important;
  box-shadow: inset 0 0 0 1px rgba(102, 227, 208, 0.08) !important;
}

.zero-preset-button {
  color: #c4ccff !important;
  border-color: rgba(162, 155, 255, 0.3) !important;
  background: rgba(91, 82, 148, 0.17) !important;
}

.zero-filter-empty {
  max-width: 1000px;
  box-sizing: border-box;
  margin: 0 auto 12px;
  padding: 16px;
  border: 1px dashed rgba(147, 178, 211, 0.22);
  border-radius: 13px;
  background: rgba(13, 21, 35, 0.78);
  color: #8fa2b6;
  text-align: center;
  font-size: 0.84rem;
}

.zero-assist-filter-hidden {
  display: none !important;
}

.zero-assist-filter-match {
  animation: zeroAssistFilterIn 180ms ease-out both;
}

@keyframes zeroAssistFilterIn {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

.zero-selection-tray {
  overflow: hidden;
  border: 1px solid rgba(102, 227, 208, 0.2);
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(15, 26, 42, 0.96), rgba(10, 17, 29, 0.96));
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.zero-selection-tray[hidden] {
  display: none !important;
}

.zero-selection-tray__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(145, 177, 211, 0.12);
}

.zero-selection-tray__header small {
  color: #75899f;
  font-size: 0.7rem;
  text-align: right;
}

.zero-selection-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8em;
  height: 1.8em;
  margin-left: 3px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(102, 227, 208, 0.14);
  color: #8ff1e2;
  font-size: 0.78rem;
}

.zero-selection-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-height: 178px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 10px 12px 12px;
}

.zero-selection-chip {
  display: inline-flex;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(137, 170, 206, 0.17);
  border-radius: 11px;
  background: rgba(20, 33, 52, 0.96);
}

.zero-selection-chip:hover {
  border-color: rgba(102, 227, 208, 0.36);
}

.zero-selection-chip button {
  flex: 0 0 auto !important;
  min-width: 0;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.zero-selection-chip__jump {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: min(48vw, 290px);
  padding: 7px 9px !important;
  color: #d8e5f2 !important;
  text-align: left;
}

.zero-selection-chip__jump span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
}

.zero-selection-chip__jump small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #74899f;
  font-size: 0.63rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zero-selection-chip__favorite,
.zero-selection-chip__remove {
  width: 31px;
  padding: 0 !important;
  color: #74899f !important;
  border-left: 1px solid rgba(137, 170, 206, 0.11) !important;
}

.zero-selection-chip__favorite.is-favorite {
  color: #f3cd74 !important;
}

.zero-selection-chip__remove:hover {
  color: #ff91a3 !important;
  background: rgba(255, 113, 135, 0.1) !important;
}

.zero-selection-overflow {
  align-self: center;
  margin: 0;
  padding: 7px 10px;
  color: #8295aa;
  font-size: 0.72rem;
}

#sections label.zero-assist-favoritable {
  gap: 5px;
}

.zero-favorite-star {
  display: inline-flex;
  flex: 0 0 29px;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  margin-left: auto;
  border: 1px solid rgba(145, 177, 211, 0.14);
  border-radius: 9px;
  background: rgba(7, 13, 22, 0.24);
  color: #6e8297;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  box-sizing: border-box;
}

.zero-favorite-star:hover,
.zero-favorite-star:focus-visible {
  color: #f2cd75;
  border-color: rgba(242, 205, 117, 0.42);
  background: rgba(128, 92, 31, 0.13);
}

.zero-favorite-star.is-favorite {
  color: #f2cd75;
  border-color: rgba(242, 205, 117, 0.34);
  background: rgba(128, 92, 31, 0.17);
  text-shadow: 0 0 9px rgba(242, 205, 117, 0.3);
}

.zero-assist-jump-highlight {
  animation: zeroAssistJump 1.8s ease-out both !important;
}

@keyframes zeroAssistJump {
  0%, 25% {
    border-color: rgba(102, 227, 208, 0.96);
    box-shadow: 0 0 0 3px rgba(102, 227, 208, 0.2), 0 10px 26px rgba(0, 0, 0, 0.28);
  }
  100% {
    box-shadow: none;
  }
}

.zero-diagnostics-button {
  display: inline-flex;
  flex: 0 0 auto !important;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  margin-left: auto;
  padding: 4px 8px !important;
  border: 1px solid rgba(142, 173, 207, 0.18) !important;
  border-radius: 9px !important;
  background: #121e30 !important;
  color: #aebfd0 !important;
  box-shadow: none !important;
  font-size: 0.72rem !important;
}

.zero-diagnostics-button strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8em;
  height: 1.8em;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(145, 177, 211, 0.12);
  color: #cbd9e8;
}

.zero-diagnostics-button[data-level="ok"] strong {
  background: rgba(102, 227, 208, 0.14);
  color: #8ff1e2;
}

.zero-diagnostics-button[data-level="info"] strong {
  background: rgba(138, 174, 255, 0.15);
  color: #b5caff;
}

.zero-diagnostics-button[data-level="warning"] {
  border-color: rgba(244, 200, 117, 0.38) !important;
  color: #f1d397 !important;
}

.zero-diagnostics-button[data-level="warning"] strong {
  background: rgba(244, 200, 117, 0.16);
  color: #f4d395;
}

.zero-diagnostics-button[data-level="error"] {
  border-color: rgba(255, 113, 135, 0.42) !important;
  color: #ff9aaa !important;
}

.zero-diagnostics-button[data-level="error"] strong {
  background: rgba(255, 113, 135, 0.16);
  color: #ff9aaa;
}

.zero-assist-dialog {
  width: min(94vw, 680px);
  max-width: 680px;
  max-height: min(86svh, 780px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(102, 227, 208, 0.24) !important;
  border-radius: 18px;
  background: #0c1421 !important;
  color: #dbe8f5 !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.58) !important;
}

.zero-assist-dialog::backdrop {
  background: rgba(2, 6, 12, 0.74);
  backdrop-filter: blur(6px);
}

.zero-assist-dialog.is-open {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: block;
}

.zero-assist-dialog__shell {
  display: flex;
  flex-direction: column;
  max-height: min(86svh, 780px);
}

.zero-assist-dialog__header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 17px 14px;
  border-bottom: 1px solid rgba(143, 174, 209, 0.14);
  background: linear-gradient(110deg, rgba(21, 35, 55, 0.98), rgba(12, 22, 36, 0.98));
}

.zero-assist-dialog__header h2 {
  margin: 3px 0 4px;
  color: #f0f7ff;
  font-size: 1.18rem;
}

.zero-assist-dialog__header p {
  margin: 0;
  color: #8498ad;
  font-size: 0.76rem;
  line-height: 1.45;
}

.zero-dialog-close {
  flex: 0 0 38px !important;
  width: 38px;
  height: 38px;
  padding: 0 !important;
  border: 1px solid rgba(143, 174, 209, 0.18) !important;
  border-radius: 11px !important;
  background: rgba(255, 255, 255, 0.035) !important;
  color: #aebfd0 !important;
  box-shadow: none !important;
  font-size: 1.35rem !important;
}

.zero-dialog-close:hover {
  color: #ff9aaa !important;
  border-color: rgba(255, 113, 135, 0.35) !important;
  background: rgba(255, 113, 135, 0.1) !important;
}

.zero-preset-save {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(143, 174, 209, 0.12);
  background: rgba(10, 18, 30, 0.95);
}

.zero-preset-input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px !important;
  border: 1px solid rgba(143, 174, 209, 0.2) !important;
  border-radius: 10px !important;
  background: #080f1a !important;
  color: #e6f0fb !important;
  box-sizing: border-box;
}

.zero-preset-save__row {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.zero-primary-button {
  flex: 0 1 auto !important;
  min-height: 40px;
  padding: 8px 14px !important;
  border: 1px solid rgba(157, 255, 237, 0.6) !important;
  border-radius: 10px !important;
  background: linear-gradient(110deg, #58d8c3, #78c7dc) !important;
  color: #07141b !important;
  box-shadow: 0 8px 20px rgba(67, 207, 188, 0.18) !important;
}

.zero-primary-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.zero-preset-selected {
  color: #8296ab;
  font-size: 0.75rem;
}

.zero-preset-list {
  display: grid;
  gap: 9px;
  min-height: 120px;
  padding: 12px 14px 16px;
  overflow: auto;
  overscroll-behavior: contain;
}

.zero-preset-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid rgba(143, 174, 209, 0.14);
  border-radius: 12px;
  background: linear-gradient(105deg, rgba(18, 31, 49, 0.96), rgba(13, 23, 38, 0.96));
}

.zero-preset-card__meta {
  min-width: 0;
}

.zero-preset-card__meta strong {
  display: block;
  overflow-wrap: anywhere;
  color: #e5effa;
  font-size: 0.88rem;
}

.zero-preset-card__meta p {
  margin: 3px 0;
  color: #92a5b9;
  font-size: 0.74rem;
  line-height: 1.4;
}

.zero-preset-card__meta small {
  color: #6f8499;
  font-size: 0.65rem;
}

.zero-preset-card__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.zero-preset-card__actions button {
  flex: 0 0 auto !important;
  padding: 7px 9px !important;
  border-radius: 9px !important;
  box-shadow: none !important;
  font-size: 0.72rem !important;
}

.zero-preset-apply {
  border: 1px solid rgba(102, 227, 208, 0.36) !important;
  background: rgba(102, 227, 208, 0.12) !important;
  color: #8ff1e2 !important;
}

.zero-preset-delete {
  border: 1px solid rgba(255, 113, 135, 0.24) !important;
  background: rgba(255, 113, 135, 0.08) !important;
  color: #ef91a0 !important;
}

.zero-preset-empty {
  padding: 24px 16px;
  border: 1px dashed rgba(143, 174, 209, 0.2);
  border-radius: 12px;
  color: #8599ae;
  text-align: center;
}

.zero-preset-empty strong {
  color: #cbd9e8;
}

.zero-preset-empty p {
  margin: 6px 0 0;
  font-size: 0.76rem;
  line-height: 1.5;
}

.zero-diagnostics-summary {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid rgba(143, 174, 209, 0.12);
  background: #0a121f;
}

.zero-diagnostics-summary__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px;
  border-right: 1px solid rgba(143, 174, 209, 0.1);
}

.zero-diagnostics-summary__item:last-child {
  border-right: 0;
}

.zero-diagnostics-summary__item span {
  color: #778ba0;
  font-size: 0.67rem;
}

.zero-diagnostics-summary__item strong {
  color: #dce8f4;
  font-size: 0.94rem;
}

.zero-diagnostics-list {
  display: grid;
  gap: 9px;
  padding: 12px 14px 16px;
  overflow: auto;
  overscroll-behavior: contain;
}

.zero-diagnostic-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(138, 174, 255, 0.18);
  border-radius: 12px;
  background: rgba(24, 41, 65, 0.55);
}

.zero-diagnostic-card[data-severity="warning"] {
  border-color: rgba(244, 200, 117, 0.29);
  background: rgba(109, 78, 26, 0.16);
}

.zero-diagnostic-card[data-severity="error"] {
  border-color: rgba(255, 113, 135, 0.32);
  background: rgba(112, 40, 55, 0.18);
}

.zero-diagnostic-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(138, 174, 255, 0.13);
  color: #afc7ff;
  font-size: 0.8rem;
  font-weight: 900;
}

.zero-diagnostic-card[data-severity="warning"] .zero-diagnostic-card__icon {
  background: rgba(244, 200, 117, 0.15);
  color: #f4d395;
}

.zero-diagnostic-card[data-severity="error"] .zero-diagnostic-card__icon {
  background: rgba(255, 113, 135, 0.15);
  color: #ff9aaa;
}

.zero-diagnostic-card strong {
  display: block;
  color: #dce8f4;
  font-size: 0.83rem;
}

.zero-diagnostic-card p {
  margin: 3px 0 0;
  color: #90a3b7;
  font-size: 0.73rem;
  line-height: 1.48;
}

.zero-diagnostic-card--ok {
  display: block;
  border-color: rgba(102, 227, 208, 0.26);
  background: rgba(43, 116, 107, 0.13);
}

.zero-diagnostic-card--ok strong {
  color: #8ff1e2;
}

.zero-mobile-view-switch {
  display: none;
}

.zero-assist-toast {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  z-index: 30000;
  max-width: min(88vw, 520px);
  padding: 10px 14px;
  border: 1px solid rgba(102, 227, 208, 0.3);
  border-radius: 999px;
  background: rgba(9, 17, 28, 0.96);
  color: #dceaf6;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.zero-assist-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.zero-assist-toast[data-kind="success"] {
  color: #94f2e3;
}

.zero-assist-toast[data-kind="warning"] {
  color: #f3d391;
  border-color: rgba(244, 200, 117, 0.35);
}

@media (max-width: 700px) {
  .zero-assist-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
    padding: 10px;
  }

  .zero-assist-toolbar__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .zero-preset-button {
    grid-column: 1 / -1;
  }

  .zero-filter-button,
  .zero-preset-button {
    width: 100%;
    min-height: 40px;
  }

  .zero-selection-tray__header {
    align-items: flex-start;
  }

  .zero-selection-tray__header small {
    max-width: 46%;
  }

  .zero-selection-chips {
    flex-wrap: nowrap;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
  }

  .zero-selection-chip {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .zero-selection-chip__jump {
    max-width: 210px;
  }

  .zero-mobile-view-switch {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 7px;
    margin: 0 auto 8px;
    max-width: 1000px;
  }

  .zero-mobile-view-switch button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    padding: 8px 10px !important;
    border: 1px solid rgba(143, 174, 209, 0.17) !important;
    border-radius: 11px !important;
    background: #101b2d !important;
    color: #94a7bb !important;
    box-shadow: none !important;
    font-size: 0.82rem !important;
  }

  .zero-mobile-view-switch button.is-active {
    border-color: rgba(102, 227, 208, 0.5) !important;
    background: linear-gradient(110deg, rgba(57, 130, 125, 0.32), rgba(49, 81, 128, 0.34)) !important;
    color: #eafffb !important;
    box-shadow: inset 0 0 0 1px rgba(102, 227, 208, 0.07) !important;
  }

  .zero-mobile-view-switch span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.8em;
    height: 1.8em;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(102, 227, 208, 0.14);
    color: #8ff1e2;
    font-size: 0.75rem;
  }

  body[data-zero-mobile-view="shelf"] #mini-ui-fixed {
    max-height: none !important;
    overflow: visible !important;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom)) !important;
  }

  body[data-zero-mobile-view="shelf"] #mini-ui-fixed > :not(#zero-mobile-view-switch) {
    display: none !important;
  }

  body[data-zero-mobile-view="shelf"] #zero-mobile-view-switch {
    margin-bottom: 0;
  }

  .zero-assist-dialog {
    width: calc(100vw - 18px);
    max-height: calc(100svh - 20px);
    border-radius: 16px;
  }

  .zero-assist-dialog__shell {
    max-height: calc(100svh - 20px);
  }

  .zero-preset-save {
    grid-template-columns: 1fr;
  }

  .zero-preset-save__row {
    grid-column: 1;
  }

  .zero-preset-card {
    align-items: stretch;
    flex-direction: column;
  }

  .zero-preset-card__actions button {
    flex: 1 1 0 !important;
    min-height: 39px;
  }

  .zero-diagnostics-button {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zero-assist-filter-match,
  .zero-assist-jump-highlight,
  .zero-assist-toast {
    animation: none !important;
    transition: none !important;
  }
}
