.theme-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  display: none;
  z-index: var(--ui-z-theme-dialog, 10020);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.theme-dialog-overlay.active {
  display: flex;
}

.theme-dialog {
  width: min(480px, 100%);
  background: linear-gradient(180deg, #0f1f2b 0%, #122635 100%);
  border: 1px solid rgba(107, 182, 255, 0.45);
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
  color: #e9f4ff;
  padding: 18px;
}

.theme-dialog-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.theme-dialog-message {
  font-size: 0.95rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.theme-dialog-input {
  width: 100%;
  margin-top: 14px;
  border-radius: 8px;
  border: 1px solid rgba(124, 195, 255, 0.35);
  background: rgba(8, 20, 30, 0.9);
  color: #f3faff;
  padding: 10px 12px;
  box-sizing: border-box;
}

.theme-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.theme-dialog-btn {
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
}

.theme-dialog-btn-cancel {
  background: rgba(255, 255, 255, 0.14);
  color: #f2f8ff;
}

.theme-dialog-btn-ok {
  background: linear-gradient(180deg, #4cc2ff 0%, #2498e6 100%);
  color: #082233;
}

@media (max-width: 600px) {
  .theme-dialog {
    border-radius: 12px;
    padding: 14px;
  }

  .theme-dialog-actions {
    flex-direction: column-reverse;
  }

  .theme-dialog-btn {
    width: 100%;
  }
}


.theme-dialog-message--quantity {
  display: grid;
  gap: 10px;
}

.theme-dialog-copy {
  color: #dff2ff;
}

.theme-dialog-quantity-meta {
  font-size: 0.85rem;
  color: #9cc8ea;
}

.theme-dialog-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-dialog-quick-btn {
  border: 1px solid rgba(124, 195, 255, 0.28);
  background: rgba(31, 82, 118, 0.28);
  color: #f3faff;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  cursor: pointer;
}

.theme-dialog-quick-btn.is-max {
  background: rgba(76, 194, 255, 0.18);
}

.theme-dialog-input--numeric {
  margin-top: 0;
}

.theme-dialog.theme-dialog--compact {
  width: min(420px, 100%);
  padding: 14px;
  border-radius: 12px;
}

.theme-dialog--compact .theme-dialog-title {
  font-size: 0.96rem;
  margin-bottom: 6px;
}

.theme-dialog--compact .theme-dialog-message {
  font-size: 0.86rem;
  line-height: 1.35;
}

.theme-dialog--compact .theme-dialog-actions {
  margin-top: 12px;
}

.theme-dialog--quantity-inline .theme-dialog-message--quantity {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.theme-dialog--quantity-inline .theme-dialog-copy,
.theme-dialog--quantity-inline .theme-dialog-quantity-meta {
  font-size: 0.82rem;
  white-space: nowrap;
}

.theme-dialog--quantity-inline .theme-dialog-quick-row {
  flex-wrap: nowrap;
  gap: 6px;
}

.theme-dialog--quantity-inline .theme-dialog-quick-btn {
  padding: 5px 9px;
}

.theme-dialog--quantity-inline .theme-dialog-input--numeric {
  margin: 0;
  width: 88px;
  min-width: 88px;
  padding: 8px 10px;
}

@media (max-width: 600px) {
  .theme-dialog--compact .theme-dialog-actions {
    flex-direction: row;
    justify-content: flex-end;
  }

  .theme-dialog--compact .theme-dialog-btn {
    width: auto;
    min-width: 92px;
    padding: 8px 12px;
  }

  .theme-dialog--quantity-inline .theme-dialog-message--quantity {
    row-gap: 6px;
  }

  .theme-dialog--quantity-inline .theme-dialog-input--numeric {
    width: 80px;
    min-width: 80px;
  }
}
