.order-addon-card {
  align-items: center;
}

.order-addon-thumb {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  overflow: hidden;
  cursor: default;
}

button.order-addon-thumb {
  cursor: pointer;
}

.order-addon-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #fff;
}

.order-addon-recorded-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.order-addon-recorded {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.order-addon-dialog {
  border: 0;
  border-radius: 12px;
  padding: 0;
  max-width: min(440px, calc(100vw - 32px));
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.order-addon-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.order-addon-dialog__sheet {
  position: relative;
  margin: 0;
  padding: 20px;
}

.order-addon-dialog__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 22px;
  line-height: 1;
}

.order-addon-dialog__image {
  display: block;
  width: min(360px, 100%);
  height: auto;
  max-height: 70vh;
  margin: 0 auto 12px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
}

.order-addon-dialog__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
}

.order-addon-dialog__desc,
.order-addon-dialog__price {
  margin: 6px 0 0;
}

.order-addon-dialog__price {
  font-weight: 700;
}

.addon-editor {
  font-family: Inter, system-ui, sans-serif;
  color: var(--sp-slate-800, #0f172a);
  max-width: 1120px;
}

.addon-editor__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 20px;
}

.addon-editor__crumb {
  margin: 0 0 6px;
  color: var(--sp-slate-600, #64748b);
  font-size: 13px;
}

.addon-editor__crumb a {
  color: inherit;
  text-decoration: none;
}

.addon-editor__crumb a:hover {
  color: var(--sp-blue-600, #2563eb);
}

.addon-editor h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.addon-editor__lede {
  margin: 6px 0 0;
  color: var(--sp-slate-600, #64748b);
}

.addon-editor__actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.addon-editor__cancel,
.addon-editor__save {
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 600;
  text-decoration: none;
}

.addon-editor__cancel {
  border: 1px solid var(--sp-slate-300, #cbd5e1);
  background: #fff;
  color: var(--sp-slate-800, #0f172a);
}

.addon-editor__save {
  border: 0;
  background: var(--sp-blue-600, #2563eb);
  color: #fff;
}

.addon-editor__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 20px;
  align-items: start;
}

.addon-card {
  background: #fff;
  border: 1px solid var(--sp-slate-200, #e2e8f0);
  border-radius: 12px;
  padding: 18px 18px 16px;
  margin-bottom: 16px;
}

.addon-card h2 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 650;
}

.addon-card__optional {
  margin-left: 8px;
  color: var(--sp-slate-500, #94a3b8);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.addon-field {
  margin-bottom: 14px;
}

.addon-field label,
.addon-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}

.addon-editor input[type="text"],
.addon-editor input[type="number"],
.addon-editor select,
.addon-editor textarea {
  width: 100%;
  border: 1px solid var(--sp-slate-300, #cbd5e1);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: inherit;
}

.addon-help {
  display: block;
  margin-top: 6px;
  color: var(--sp-slate-600, #64748b);
  font-size: 12px;
}

.addon-price {
  display: flex;
  align-items: center;
  gap: 8px;
}

.addon-price span {
  color: var(--sp-slate-600, #64748b);
  font-weight: 600;
}

.addon-price input {
  max-width: 140px;
}

.addon-switch {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
}

.addon-switch input {
  position: absolute;
  opacity: 0;
  width: 42px;
  height: 24px;
  margin: 0;
}

.addon-switch__track {
  width: 42px;
  height: 24px;
  flex: 0 0 42px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  cursor: pointer;
}

.addon-switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.addon-switch input:checked + .addon-switch__track {
  background: var(--sp-blue-600, #2563eb);
}

.addon-switch input:checked + .addon-switch__track::after {
  transform: translateX(18px);
}

.addon-switch input:focus-visible + .addon-switch__track {
  outline: 2px solid var(--sp-blue-600, #2563eb);
  outline-offset: 2px;
}

.addon-drop {
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  padding: 22px 16px;
  text-align: center;
  color: var(--sp-slate-600, #64748b);
  background: #f8fafc;
}

.addon-drop.is-drag {
  border-color: var(--sp-blue-600, #2563eb);
  background: var(--sp-blue-tint, #eff6ff);
}

.addon-drop button {
  border: 0;
  background: none;
  color: var(--sp-blue-600, #2563eb);
  font-weight: 650;
  padding: 0;
}

.addon-picture-error {
  margin-top: 8px;
  color: var(--sp-danger-600, #b91c1c);
  font-size: 13px;
}

.addon-preview-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.addon-preview-shot {
  width: 150px;
  height: 150px;
  flex: 0 0 150px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.addon-preview-shot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.addon-preview-meta {
  min-width: 0;
  font-size: 13px;
  color: var(--sp-slate-600, #64748b);
}

.addon-preview-meta strong {
  display: block;
  color: var(--sp-slate-800, #0f172a);
  margin-bottom: 4px;
  word-break: break-word;
}

.addon-preview-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.addon-preview-actions button {
  border: 1px solid var(--sp-slate-300, #cbd5e1);
  background: #fff;
  border-radius: 8px;
  padding: 4px 10px;
  font-weight: 600;
}

.addon-segment {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid var(--sp-slate-300, #cbd5e1);
  border-radius: 10px;
  overflow: hidden;
}

.addon-segment label {
  flex: 1 1 0;
  margin: 0;
  text-align: center;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-right: 1px solid var(--sp-slate-200, #e2e8f0);
}

.addon-segment label:last-child {
  border-right: 0;
}

.addon-segment input {
  position: absolute;
  opacity: 0;
}

.addon-segment input:checked + span,
.addon-segment label:has(input:checked) {
  background: var(--sp-blue-tint, #eff6ff);
  color: var(--sp-blue-700, #1d4ed8);
}

.addon-segment input:focus-visible + span {
  outline: 2px solid var(--sp-blue-600, #2563eb);
}

.addon-order-preview {
  border: 1px solid var(--sp-slate-200, #e2e8f0);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.addon-order-preview__med {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 650;
  margin-bottom: 8px;
}

.addon-order-preview .order-addon-card {
  margin: 8px 0;
}

.addon-order-preview__total {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--sp-slate-200, #e2e8f0);
  font-weight: 650;
}

.addon-large-shot {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 10px;
}

.addon-large-empty {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 10px;
  background: #fff;
}

.addon-large-empty .order-addon-thumb {
  width: 72px;
  height: 72px;
  flex-basis: 72px;
}

@media (max-width: 1099px) {
  .addon-editor__header {
    flex-direction: column;
  }

  .addon-editor__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
