/* Unlayered: a declaration here overrides any Tailwind utility on the same property. */

/* Focus ring color. An app sets its own in its :root. */
:where(:root) {
    --input-focus: #3b82f6;
}

.app-input,
.filled-field {
    border: 0;
    border-bottom: 1px solid #6b7280;
    outline: none;
    box-shadow: none;
    color: #0f172a;
    transition: background-color .15s ease, box-shadow .15s ease;
}

/* Rounded fields: border on all four sides. Lists every radius utility used with these classes. */
.app-input.rounded-sm,
.filled-field.rounded-sm {
    border: 1px solid #6b7280;
}

.app-input::placeholder,
.filled-field::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.app-input:focus,
.filled-field:focus {
    background-color: rgb(241 245 249);
    box-shadow: 0 0 0 1px var(--input-focus);
    /* Visible only in forced-colors mode, which does not draw the box-shadow ring. */
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.app-input:disabled,
.filled-field:disabled {
    opacity: .6;
    cursor: not-allowed;
}

select.filled-field,
.app-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2rem;
}
