/* Readable controls on native store pages and the separate AI Studio.
 * Loaded after the theme and Studio styles. Artwork and garment colours
 * deliberately retain their own styles.
 */

/* Empty form fields remain identifiable against white and pale panels. */
body:not(.tsh-app-page) main input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]),
body:not(.tsh-app-page) main select,
body:not(.tsh-app-page) main textarea {
  border-color: #8a8a8a;
}

body:not(.tsh-app-page) main input::placeholder,
body:not(.tsh-app-page) main textarea::placeholder {
  color: #676767;
  opacity: 1;
}

body:not(.tsh-app-page) main .wc-block-components-quantity-selector {
  border-color: #8a8a8a;
}

/* Woo's fixed select height can clip labels when theme padding is added. */
body:not(.tsh-app-page) main select {
  height: auto !important;
  min-height: 44px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  line-height: 1.4 !important;
}

/* Input-based submit buttons need the same hover treatment as buttons. */
body:not(.tsh-app-page) main input.button:hover:not(:disabled):not(.disabled):not([aria-disabled="true"]) {
  background: #383838;
  border-color: #383838;
  color: #fff;
}

/* Native product pages place .woocommerce on body. Class-based disabled
 * variation buttons must remain readable even when Woo adds .alt/:hover.
 */
body:not(.tsh-app-page) main .wp-element-button:is(:disabled, .disabled, [aria-disabled="true"]),
body:not(.tsh-app-page) main :is(a.button, button.button, input.button):is(:disabled, .disabled, [aria-disabled="true"]) {
  opacity: 1 !important;
  color: #59534b !important;
  background: #ece7de !important;
  border-color: #8a8175 !important;
  cursor: not-allowed;
  text-shadow: none;
}

/* The separate Studio uses its own warm, high-contrast palette. */
body:not(.tsh-app-page) main .tsh-studio textarea::placeholder,
.tsh-studio textarea::placeholder {
  color: #746b60;
  opacity: 1;
}

.tsh-studio button:disabled {
  opacity: 1;
  cursor: not-allowed;
}

.tsh-studio .tsh-studio-button:disabled {
  color: #59534b;
  background: #ece7de;
  border-color: #8a8175;
  text-shadow: none;
}

.tsh-studio .tsh-studio-text-button:disabled {
  color: #665f54;
  text-decoration-style: dotted;
}

.tsh-studio .tsh-studio-design-state dt,
.tsh-studio .tsh-studio-design-state .tsh-studio-preflight-note {
  color: #6c5a43;
}

/* A solid backing keeps this label readable on every garment colour. */
.tsh-studio .tsh-studio-empty-preview {
  color: #5e5141;
  background: #f9f8f4;
  border: 1px solid #ded8ce;
  border-radius: 10px;
  padding: 8px 10px;
  text-shadow: none;
}

/* Selected mode remains visible without relying on a pale fill alone. */
.tsh-studio .tsh-studio-preview-modes button[aria-pressed="true"] {
  box-shadow: inset 0 0 0 2px #87653e;
}
