/*
 * Order statuses: status chip, status select, "Order statuses" settings section.
 * Owned by includes/class-ws-order-statuses.php. Also loaded on the
 * WooCommerce orders screens in wp-admin (chip/select only).
 */

/* ---------- Status chip ---------- */
.ws-stc {
    --c: #6B7280;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 8px;
    font: 600 11px/1.3 var(--ws-h, "Oswald", "Heebo", "Arial Narrow", sans-serif);
    text-transform: uppercase; letter-spacing: .3px; white-space: nowrap;
    color: var(--c);
    background: #F1F1F1;
    background: color-mix(in srgb, var(--c) 12%, #fff);
}
[dir="rtl"] .ws-stc, .rtl .ws-stc { text-transform: none; letter-spacing: 0; }
.ws-stc::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: 0 0 7px; }

/* ---------- Status select ---------- */
select.ws-stsel, .ws-ui select.ws-stsel, .ws-adm select.ws-stsel {
    --c: #6B7280;
    width: auto; max-width: 100%;
    height: 30px; padding: 0 26px 0 8px;
    font-size: 12.5px; font-weight: 600;
    color: var(--c);
    border: 1px solid #D5D5D5;
    border-inline-start: 4px solid var(--c) !important;
    border-radius: 0;
    background-color: #fff;
}
[dir="rtl"] select.ws-stsel { padding: 0 8px 0 26px; }
select.ws-stsel option { color: #171A25; font-weight: 400; }

/* ---------- Settings section (Team & Settings) ---------- */
.ws-sts .ws-sts-newchip { font-size: 10px; padding: 2px 6px; }
.ws-sts .ws-sts-row { padding: 8px 12px; }
.ws-sts .ws-sts-row .ws-mi-1 { min-height: 30px; }
.ws-adm .ws-sts .ws-mi-1 > .ws-sts-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; color: var(--ws-ink, #171A25); white-space: normal; }
.ws-sts .ws-sts-name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-sts .ws-sts-color {
    width: 26px; height: 22px; flex: 0 0 26px;
    border: 0; padding: 0; margin: 0; background: none; cursor: pointer;
}
.ws-sts .ws-sts-color::-webkit-color-swatch-wrapper { padding: 0; }
.ws-sts .ws-sts-color::-webkit-color-swatch { border: 1px solid rgba(0,0,0,.12); border-radius: 0; }
.ws-sts .ws-sts-color::-moz-color-swatch { border: 1px solid rgba(0,0,0,.12); border-radius: 0; }
.ws-sts .ws-sts-color[disabled] { cursor: default; opacity: 1; }
.ws-sts .ws-sts-cnt {
    font: 600 11px/1 var(--ws-b, sans-serif); font-style: normal;
    background: #F1F1F1; color: var(--ws-mu, #6B7280); padding: 3px 6px;
}
.ws-sts .ws-chip { flex: 0 0 auto; }
.ws-adm .ws-sts .ws-sts-acts { display: flex; gap: 4px; flex: 0 0 auto; }
.ws-adm .ws-sts .ws-sts-acts .ws-panel-btn { width: 30px; height: 28px; padding: 0; justify-content: center; font-size: 14px; }
.ws-sts .ws-sts-sub { padding-inline-start: 34px; font-size: 12px; }
.ws-sts .ws-sts-slug code { font-size: 11px; background: none; padding: 0; color: #999; }
.ws-sts .ws-sts-row.ws-sts-core { background: #FCFCFC; padding-top: 5px; padding-bottom: 5px; }
.ws-sts .ws-sts-core .ws-sts-name b { color: #333; font-weight: 500; }
.ws-sts .ws-sts-alt { font-size: 12px; color: var(--ws-mu, #6B7280); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ws-sts .ws-sts-core .ws-chip { font-size: 10px; padding: 2px 6px; }

.ws-sts .ws-sts-edit-box { display: none; margin-top: 8px; padding-inline-start: 34px; }
.ws-sts .ws-sts-row.ws-open { background: var(--ws-os, #FFF3E8); }
.ws-sts .ws-sts-row.ws-open .ws-sts-edit-box { display: block; }
.ws-sts .ws-sts-row.ws-open .ws-sts-edit { background: var(--ws-k, #181818); border-color: var(--ws-k, #181818); color: #fff; }
.ws-sts .ws-sts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.ws-sts .ws-sts-grid textarea { height: 52px; }
.ws-sts .ws-sts-checks { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 4px; }
.ws-sts .ws-sts-checks .ws-team-switch { white-space: normal; }
.ws-sts .ws-sts-mail { margin-top: 6px; }
.ws-sts .ws-sts-hint { margin: 4px 0 0; font-size: 12px; color: var(--ws-mu, #6B7280); }

.ws-sts .ws-sts-move {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin-top: 8px; padding: 8px 10px;
    background: var(--ws-ers, #FDECEC); color: var(--ws-er, #C62828); font-size: 13px;
}
.ws-sts .ws-sts-move select { width: auto; min-width: 160px; height: 30px; }
.ws-sts .ws-hide { display: none !important; }

@media (max-width: 700px) {
    .ws-sts .ws-sts-row { padding: 7px 10px; }
    .ws-sts .ws-sts-sub, .ws-sts .ws-sts-edit-box { padding-inline-start: 0; }
    .ws-sts .ws-sts-slug { display: none; }
    .ws-adm .ws-sts .ws-sts-acts { gap: 2px; }
    .ws-adm .ws-sts .ws-sts-acts .ws-panel-btn { width: 26px; height: 26px; font-size: 13px; }
    .ws-sts .ws-sts-name b { white-space: normal; line-height: 1.2; }
    .ws-sts .ws-sts-grid { grid-template-columns: 1fr 1fr; }
    .ws-sts .ws-sts-grid .ws-sts-wide { grid-column: 1 / -1; }
    .ws-sts .ws-sts-move select { flex: 1 1 100%; }
}

/* Hebrew admins: Hebrew field first in each pair (Round 3 – K). */
.ws-adm.ws-rtl .ws-sts .ws-sts-grid > .ws-fld:has([data-k="label_he"]),
.ws-adm.ws-rtl .ws-sts .ws-sts-grid > .ws-fld:has([data-k="email_subject_he"]) { order: 1; }
.ws-adm.ws-rtl .ws-sts .ws-sts-grid > .ws-fld:has([data-k="label_en"]),
.ws-adm.ws-rtl .ws-sts .ws-sts-grid > .ws-fld:has([data-k="email_subject_en"]) { order: 2; }
.ws-adm.ws-rtl .ws-sts .ws-sts-grid > .ws-fld:has([data-k="slug"]),
.ws-adm.ws-rtl .ws-sts .ws-sts-grid > .ws-fld:has([data-k="email_text_he"]) { order: 3; }
.ws-adm.ws-rtl .ws-sts .ws-sts-grid > .ws-fld:has([data-k="email_text_en"]) { order: 4; }
