/* Jolixo — Form controls: dropdowns, file inputs and star rating. */

/* !important only on the arrow image: older rules use the `background` shorthand, which would wipe it. */
select {
    appearance:none;
    -webkit-appearance:none;
    min-height:42px;
    padding:9px 40px 9px 14px;
    border:1px solid var(--border);
    border-radius:12px;
    background-color:var(--soft);
    color:var(--ink);
    font:inherit;
    font-size:13.5px;
    font-weight:600;
    cursor:pointer;
    transition:border-color .15s,box-shadow .15s;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e98b0' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")!important;
    background-repeat:no-repeat!important;
    background-position:right 13px center!important;
    background-size:15px!important;
}

select:hover {
    border-color:color-mix(in srgb,var(--coral) 45%,var(--border));
}

select:focus,select:focus-visible {
    outline:none;
    border-color:var(--coral);
    box-shadow:0 0 0 3px rgba(255,119,87,.18);
}

select:disabled {
    opacity:.5;
    cursor:not-allowed;
}

select option {
    background:var(--surface);
    color:var(--ink);
    font-weight:500;
}

[data-theme=dark] select {
    background-color:var(--soft);
}

input[type=file] {
    width:100%;
    padding:8px;
    border:1.5px dashed var(--border);
    border-radius:14px;
    background:var(--soft);
    color:var(--muted);
    font:inherit;
    font-size:13px;
    cursor:pointer;
    transition:border-color .15s;
}

input[type=file]:hover {
    border-color:var(--coral);
}

input[type=file]:focus-visible {
    outline:none;
    border-color:var(--coral);
    box-shadow:0 0 0 3px rgba(255,119,87,.18);
}

input[type=file]::file-selector-button {
    margin-right:12px;
    padding:9px 16px;
    border:0;
    border-radius:10px;
    background:linear-gradient(135deg,#ff7757,#e8456b);
    color:#fff;
    font:inherit;
    font-size:12.5px;
    font-weight:700;
    cursor:pointer;
    transition:filter .15s;
}

input[type=file]::file-selector-button:hover {
    filter:brightness(1.08);
}

.star-input {
    border:0;
    margin:0;
    padding:0;
    display:inline-flex;
    flex-direction:row-reverse;
    justify-content:flex-end;
    gap:4px;
    align-items:center;
    flex-wrap:wrap;
}

.star-input legend {
    width:100%;
    font-size:12px;
    font-weight:700;
    color:var(--muted);
    margin-bottom:6px;
    padding:0;
    float:left;
}

.star-input input {
    position:absolute;
    opacity:0;
    width:1px;
    height:1px;
}

.star-input label {
    font-size:30px;
    line-height:1;
    color:var(--border);
    cursor:pointer;
    transition:color .12s,transform .12s;
}

.star-input label:hover,.star-input label:hover~label,.star-input input:checked~label {
    color:#ffb84d;
}

.star-input label:hover {
    transform:scale(1.15);
}

.star-input input:focus-visible+label {
    outline:2px solid #56b8eb;
    outline-offset:2px;
    border-radius:4px;
}

[data-theme=dark] .star-input label {
    color:#3a4258;
}

[data-theme=dark] .star-input label:hover,[data-theme=dark] .star-input label:hover~label,[data-theme=dark] .star-input input:checked~label {
    color:#ffb84d;
}
