/*
 * H&S Music Artist Panel – shared Wizard form controls
 */

.wizard-step-content form {
  width: 100%;
  max-width: 760px;
  margin: 0;
  display: grid;
  gap: 0;
}

.wizard-form-section {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.wizard-form-section + .wizard-form-section {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--hs-line-subtle);
}

.wizard-form-section > h2,
.wizard-form-section > h3 {
  margin: 0 0 24px;
  color: var(--hs-text);
  font-size: 21px;
  line-height: 1.3;
  font-weight: var(--hs-weight-semibold);
  letter-spacing: -.012em;
}

.wizard-step-content label,
.wizard-field-label,
.wizard-field-group {
  color: var(--hs-text-muted);
  font-size: 14px;
  line-height: 1.45;
  font-weight: var(--hs-weight-medium);
  letter-spacing: 0;
}

.wizard-step-content label {
  display: grid;
  gap: 8px;
  margin: 0 0 20px;
}

/* Date sections already define their own grid rhythm. Avoid double spacing. */
.wizard-date-card > label.wizard-field-label {
  margin-bottom: 0;
}

.field-label-text {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin: 0;
}

.required-mark {
  color: var(--hs-brand-500);
  font-weight: var(--hs-weight-semibold);
}

.wizard-step-content input:not([type="hidden"]):not([type="file"]):not(.artist-chip-input),
.wizard-step-content select,
.wizard-step-content textarea,
.wizard-search-select-trigger,
.artist-chip-inputbox {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--hs-line);
  border-radius: var(--hs-radius-sm);
  background: var(--hs-surface-2);
  color: var(--hs-text);
  padding: 11px 13px;
  font-family: var(--hs-font-ui);
  font-size: 15px;
  line-height: 1.4;
  font-weight: var(--hs-weight-regular);
  outline: none;
  box-shadow: none;
}

.wizard-step-content textarea {
  min-height: 112px;
  resize: vertical;
}

.wizard-step-content input::placeholder,
.wizard-step-content textarea::placeholder,
.artist-chip-input::placeholder {
  color: var(--hs-text-subtle);
  opacity: 1;
}

.wizard-step-content input:not([type="hidden"]):not([type="file"]):not(.artist-chip-input):hover,
.wizard-step-content select:hover,
.wizard-step-content textarea:hover,
.wizard-search-select-trigger:hover,
.artist-chip-inputbox:hover {
  border-color: var(--hs-line-strong);
}

.wizard-step-content input:not([type="hidden"]):not([type="file"]):not(.artist-chip-input):focus,
.wizard-step-content select:focus,
.wizard-step-content textarea:focus,
.wizard-search-select.is-open .wizard-search-select-trigger,
.wizard-search-select-trigger:focus-visible,
.artist-chip-inputbox:focus-within {
  border-color: var(--hs-brand-line);
  box-shadow: var(--hs-focus-ring);
}

.wizard-step-content input:not([type="file"]):disabled,
.wizard-step-content select:disabled,
.wizard-step-content textarea:disabled,
.wizard-search-select-trigger:disabled {
  color: var(--hs-text-disabled);
  background: var(--hs-surface-1);
  cursor: not-allowed;
}

.artist-chip-editor {
  width: 100%;
  display: block;
  margin: -10px 0 22px;
}

.artist-chip-inputbox {
  min-height: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  overflow: visible;
}

.artist-chip-list {
  display: contents;
}

.artist-chip-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--hs-line);
  border-radius: var(--hs-radius-sm);
  background: var(--hs-surface-3);
  color: var(--hs-text);
  font-size: 13px;
  line-height: 1.25;
  font-weight: var(--hs-weight-medium);
  white-space: nowrap;
}

.artist-chip-pill-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artist-chip-remove {
  width: 20px;
  min-width: 20px;
  height: 20px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: var(--hs-text-subtle);
  font-size: 14px;
  line-height: 1;
  font-weight: var(--hs-weight-medium);
}

.artist-chip-remove:hover,
.artist-chip-remove:focus-visible {
  color: var(--hs-text);
  background: rgba(255,255,255,.06);
}

.artist-chip-input {
  flex: 1 1 150px;
  min-width: 110px;
  min-height: 30px;
  height: 30px;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--hs-text);
  font-family: var(--hs-font-ui);
  font-size: 14px;
  line-height: 1.3;
  outline: none;
}

.artist-chip-input:focus {
  border: 0;
  box-shadow: none;
}

.wizard-search-select {
  position: relative;
  width: 100%;
}

.wizard-search-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
}

.wizard-search-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--hs-text);
  font-weight: var(--hs-weight-regular);
}

.wizard-search-select-placeholder {
  color: var(--hs-text-subtle);
}

.wizard-search-select-chevron {
  flex: 0 0 auto;
  color: var(--hs-text-subtle);
  font-size: 12px;
  line-height: 1;
}

.wizard-search-select-panel {
  position: absolute;
  z-index: 80;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  display: none;
  padding: 6px;
  border: 1px solid var(--hs-line-strong);
  border-radius: var(--hs-radius-md);
  background: #101012;
  box-shadow: 0 18px 44px rgba(0,0,0,.45);
}

.wizard-search-select.is-open .wizard-search-select-panel {
  display: block;
}

.wizard-search-select-search {
  width: 100%;
  min-height: 40px;
  margin: 0 0 5px;
  padding: 9px 10px;
  border: 1px solid var(--hs-line);
  border-radius: var(--hs-radius-sm);
  background: var(--hs-surface-2);
  color: var(--hs-text);
  font: inherit;
  font-size: 14px;
  outline: none;
}

.wizard-search-select-search:focus {
  border-color: var(--hs-brand-line);
  box-shadow: var(--hs-focus-ring);
}

.wizard-search-select-options {
  max-height: 260px;
  overflow: auto;
  display: grid;
  gap: 1px;
  overscroll-behavior: contain;
}

.wizard-search-select-option {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--hs-radius-sm);
  background: transparent;
  box-shadow: none;
  color: var(--hs-text-muted);
  text-align: left;
  font: inherit;
  font-size: 14px;
  font-weight: var(--hs-weight-regular);
  text-transform: none;
  letter-spacing: 0;
}

.wizard-search-select-option:hover,
.wizard-search-select-option:focus-visible {
  background: rgba(255,255,255,.045);
  color: var(--hs-text);
  outline: none;
}

.wizard-search-select-option.is-selected {
  background: var(--hs-brand-soft);
  color: var(--hs-text);
}

.wizard-search-select-option[hidden] {
  display: none;
}

.wizard-search-select-option-code {
  flex: 0 0 auto;
  color: var(--hs-text-subtle);
  font-size: 11px;
}

.wizard-search-select-clear {
  margin-bottom: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hs-line-subtle);
  border-radius: 0;
  color: var(--hs-text-subtle);
}

.wizard-search-select-clear:hover,
.wizard-search-select-clear:focus-visible {
  background: transparent;
  color: var(--hs-text-muted);
}

.wizard-search-select-empty {
  padding: 10px;
  color: var(--hs-text-subtle);
  font-size: 13px;
}

.wizard-search-select-empty[hidden] {
  display: none;
}

#basic-genre {
  position: relative;
  z-index: 5;
  overflow: visible;
}

#basic-genre .wizard-search-select.is-open {
  z-index: 60;
}

.wizard-deadline-warning {
  display: none;
  margin-top: 14px;
  padding: 12px 13px;
  border: 1px solid rgba(255,159,67,.34);
  border-radius: var(--hs-radius-sm);
  background: var(--hs-warning-soft);
  color: var(--hs-text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.wizard-deadline-warning strong {
  color: #ffd7ad;
  font-weight: var(--hs-weight-semibold);
}

.wizard-deadline-warning p {
  margin: 5px 0 0;
  color: var(--hs-text-muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 620px) {
  .wizard-form-section + .wizard-form-section {
    margin-top: 28px;
    padding-top: 24px;
  }

  .wizard-form-section > h2,
  .wizard-form-section > h3 {
    font-size: 19px;
  }

  .wizard-step-content input:not([type="hidden"]):not([type="file"]):not(.artist-chip-input),
  .wizard-step-content select,
  .wizard-step-content textarea,
  .wizard-search-select-trigger,
  .artist-chip-inputbox {
    min-height: 46px;
    font-size: 16px;
  }

  .artist-chip-input,
  .wizard-search-select-search {
    font-size: 16px;
  }

  .wizard-search-select-panel {
    position: fixed;
    z-index: 120;
    left: 12px;
    right: 12px;
    top: auto;
    bottom: max(12px, env(safe-area-inset-bottom));
    max-height: min(70dvh, 560px);
  }

  .wizard-search-select-options {
    max-height: min(58dvh, 480px);
  }

  .wizard-ai-declaration-head {
    display: grid;
  }

  .wizard-ai-declaration-error-badge {
    justify-self: start;
  }

  .wizard-upload-cancel-button {
    min-height: 42px;
  }
}

/* Shared AI declaration control */
.wizard-ai-declaration {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--hs-line-subtle);
}

.wizard-ai-declaration.has-error {
  border-top-color: rgba(255,159,67,.55);
}

.wizard-ai-declaration.is-saving {
  opacity: .72;
}

.wizard-ai-declaration.is-disabled {
  opacity: .62;
}

.wizard-ai-declaration-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.wizard-ai-declaration-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--hs-text);
  font-size: 14px;
  line-height: 1.4;
  font-weight: var(--hs-weight-semibold);
}

.wizard-ai-declaration-head p {
  margin: 5px 0 0;
  color: var(--hs-text-muted);
  font-size: 13px;
  line-height: 1.5;
  font-weight: var(--hs-weight-regular);
}

.wizard-ai-declaration-error-badge {
  display: none;
  color: var(--hs-warning);
  font-size: 12px;
  font-weight: var(--hs-weight-bold);
}

.wizard-ai-declaration.has-error .wizard-ai-declaration-error-badge {
  display: inline;
}

.wizard-ai-declaration-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.wizard-ai-declaration-option {
  min-width: 0;
  min-height: 92px;
  padding: 13px 14px;
  border: 1px solid var(--hs-line);
  border-radius: var(--hs-radius-sm);
  background: transparent;
  color: var(--hs-text);
  text-align: left;
  cursor: pointer;
  transition:
    border-color var(--hs-duration-fast) var(--hs-ease-standard),
    background-color var(--hs-duration-fast) var(--hs-ease-standard);
}

.wizard-ai-declaration-option:hover:not(:disabled) {
  border-color: var(--hs-line-strong);
  background: rgba(255,255,255,.025);
}

.wizard-ai-declaration-option:focus-visible {
  border-color: var(--hs-brand-line);
  outline: 2px solid var(--hs-brand-500);
  outline-offset: 2px;
}

.wizard-ai-declaration-option.is-selected {
  border-color: var(--hs-brand-line);
  background: var(--hs-brand-soft);
}

.wizard-ai-declaration-option:disabled {
  cursor: not-allowed;
}

.wizard-ai-declaration-option strong {
  display: block;
  color: var(--hs-text);
  font-size: 13px;
  line-height: 1.35;
  font-weight: var(--hs-weight-semibold);
}

.wizard-ai-declaration-option span {
  display: block;
  margin-top: 4px;
  color: var(--hs-text-subtle);
  font-size: 11px;
  line-height: 1.45;
  font-weight: var(--hs-weight-regular);
}

.wizard-ai-declaration-status {
  min-height: 18px;
  margin-top: 8px;
  color: var(--hs-text-subtle);
  font-size: 12px;
  line-height: 1.45;
}

.wizard-ai-declaration-status.is-success {
  color: var(--hs-success);
}

.wizard-ai-declaration-status.is-error {
  color: var(--hs-danger);
}

/* Shared multipart upload feedback */
.wizard-upload-cancel-button {
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 34px;
  margin: 10px 0 0;
  padding: 7px 10px;
  border: 1px solid rgba(255,92,92,.42);
  border-radius: var(--hs-radius-sm);
  background: var(--hs-danger-soft);
  color: #ffd2d2;
  font-family: var(--hs-font-ui);
  font-size: 12px;
  line-height: 1.3;
  font-weight: var(--hs-weight-semibold);
  cursor: pointer;
}

.wizard-upload-cancel-button:hover:not(:disabled) {
  border-color: rgba(255,92,92,.7);
}

.wizard-upload-cancel-button:disabled {
  cursor: wait;
  opacity: .65;
}

.wizard-upload-cancel-notice {
  margin-top: 10px;
  padding: 9px 11px;
  border-left: 2px solid var(--hs-warning);
  background: var(--hs-warning-soft);
  color: #ffe1bd;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .wizard-ai-declaration-grid {
    grid-template-columns: 1fr;
  }

  .wizard-ai-declaration-option {
    min-height: 0;
  }
}
