/* Scoped STL Order Intake Form styles. */
.stl-order {
    --stl-accent: var(--pink, #ff4fd8);
    --stl-panel: color-mix(in srgb, var(--card) 92%, transparent);
    color: var(--text);
}

.stl-order__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

@media (min-width: 1040px) {
    .stl-order__grid {
        grid-template-columns: minmax(320px, .86fr) minmax(0, 1.14fr);
        align-items: start;
    }
}

.stl-order__card {
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        radial-gradient(560px circle at 8% 0%, color-mix(in srgb, var(--stl-accent) 12%, transparent), transparent 58%),
        var(--stl-panel);
    padding: 1.25rem;
    box-shadow: 0 24px 70px -52px color-mix(in srgb, var(--stl-accent) 55%, transparent);
}

@media (min-width: 720px) {
    .stl-order__card { padding: 1.5rem; }
}

.stl-order__section-head,
.stl-order__output-head {
    margin-bottom: 1.2rem;
}

.stl-order__eyebrow {
    margin: 0 0 .45rem;
    font-family: var(--ff-mono);
    font-size: .68rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--stl-accent);
}

.stl-order h3 {
    margin: 0 0 .45rem;
    font-family: var(--ff-head);
    color: var(--heading);
    line-height: 1.06;
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
}

.stl-order__section-head p,
.stl-order__output-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.stl-order__dropzone {
    position: relative;
    display: grid;
    gap: .7rem;
    margin-bottom: 1rem;
}

.stl-order__dropzone label {
    display: grid;
    place-items: center;
    gap: .55rem;
    min-height: 180px;
    border: 1px dashed color-mix(in srgb, var(--stl-accent) 42%, var(--border));
    border-radius: 16px;
    background: color-mix(in srgb, var(--stl-accent) 6%, transparent);
    color: var(--muted);
    text-align: center;
    padding: 1.2rem;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .15s ease;
}

.stl-order__dropzone label:hover,
.stl-order__dropzone label:focus-within {
    transform: translateY(-1px);
    border-color: var(--stl-accent);
    background: color-mix(in srgb, var(--stl-accent) 9%, transparent);
}

.stl-order__dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.stl-order__drop-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--stl-accent) 50%, var(--border));
    color: var(--stl-accent);
    background: color-mix(in srgb, var(--stl-accent) 8%, transparent);
}

.stl-order__drop-icon svg {
    width: 25px;
    height: 25px;
}

.stl-order__dropzone strong {
    color: var(--heading);
    font-family: var(--ff-head);
    font-size: 1.1rem;
}

.stl-order__dropzone small {
    max-width: 38ch;
    line-height: 1.45;
}

#stlOrderFileName {
    margin: 0;
    color: var(--muted);
    font-family: var(--ff-mono);
    font-size: .76rem;
    overflow-wrap: anywhere;
}

.stl-order__fields {
    display: grid;
    gap: .85rem;
}

.stl-order__field-grid {
    display: grid;
    gap: .85rem;
}

@media (min-width: 720px) {
    .stl-order__field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.stl-order__fields label {
    display: grid;
    gap: .38rem;
    color: var(--muted);
}

.stl-order label span {
    font-family: var(--ff-mono);
    font-size: .68rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.stl-order input,
.stl-order select,
.stl-order textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: color-mix(in srgb, var(--bg2) 86%, transparent);
    color: var(--heading);
    padding: .68rem .8rem;
    font: inherit;
    outline: 0;
}

.stl-order input,
.stl-order select {
    min-height: 44px;
}

.stl-order textarea {
    min-height: 126px;
    resize: vertical;
}

.stl-order input:focus,
.stl-order select:focus,
.stl-order textarea:focus {
    border-color: var(--stl-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--stl-accent) 15%, transparent);
}

.stl-order__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: 1rem;
}

.stl-order__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg2) 78%, transparent);
    color: var(--heading);
    padding: .68rem 1rem;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform .15s ease, border-color .2s ease, background .2s ease;
}

.stl-order__btn:hover,
.stl-order__btn:focus-visible {
    transform: translateY(-1px);
    border-color: var(--stl-accent);
    background: color-mix(in srgb, var(--stl-accent) 10%, var(--bg2));
}

.stl-order__btn--primary {
    border-color: color-mix(in srgb, var(--stl-accent) 68%, var(--border));
    background: linear-gradient(135deg, color-mix(in srgb, var(--stl-accent) 26%, var(--bg2)), color-mix(in srgb, var(--cyan, #21e6c1) 18%, var(--bg2)));
}

.stl-order__hint {
    margin-top: 1rem;
    border: 1px solid color-mix(in srgb, var(--stl-accent) 28%, var(--border));
    border-radius: 14px;
    background: color-mix(in srgb, var(--stl-accent) 5%, transparent);
    padding: .9rem;
}

.stl-order__hint strong {
    display: block;
    margin-bottom: .35rem;
    color: var(--heading);
    font-family: var(--ff-mono);
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.stl-order__hint p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.stl-order__summary-box {
    border: 1px solid color-mix(in srgb, var(--stl-accent) 30%, var(--border));
    border-radius: 16px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--stl-accent) 6%, transparent), transparent 42%),
        color-mix(in srgb, var(--bg2) 70%, transparent);
    padding: 1rem;
    min-height: 360px;
}

.stl-order__summary-box pre {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--heading);
    font-family: var(--ff-mono);
    font-size: .88rem;
    line-height: 1.65;
}

.stl-order__summary-box.is-empty pre {
    color: var(--muted);
}

.stl-order__output-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.stl-order__btn--copy {
    gap: .45rem;
}

.stl-order__btn:disabled {
    cursor: not-allowed;
    opacity: .52;
    transform: none;
}

.stl-order__btn:disabled:hover,
.stl-order__btn:disabled:focus-visible {
    border-color: var(--border);
    background: color-mix(in srgb, var(--bg2) 78%, transparent);
    transform: none;
}

.stl-order__error {
    margin-top: .8rem;
    color: var(--danger, #ff5f6d);
    font-weight: 800;
}
