/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 *
 * Tailwind is loaded separately via stylesheet_link_tag "tailwind" in the layout
 * (built from app/assets/builds/tailwind.css). Do not @import "tailwindcss" here,
 * as that triggers a request to /assets/tailwindcss which does not exist in production.
 */

/* The composer hides the field outline and shows focus on its border. */
.composer-shell:has(textarea:focus-visible) {
  border-color: var(--gpt-focus);
}

/*
 * Text fields use that same border, not a separate outline. A click that
 * will accept typing counts as :focus-visible, so the border turns blue
 * the way the composer does. Mouse focus on a control that won't be typed
 * into stays the quieter gray.
 */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):focus,
select:focus,
textarea:focus {
  border-color: var(--gpt-fg-tertiary);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--gpt-focus);
}
