/* ── Multi-select trigger ────────────────────────────────── */
.ms-wrap {
    position: relative;
    width: 100%;
}

.ms-trigger {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 16px;
    cursor: pointer;
    transition: .18s ease;
}

.ms-trigger:hover {
    border-color: #d8d8d8;
}

.ms-trigger.active {
    border-color: #c9a84c;
}

.ms-caret {
    flex-shrink: 0;
    color: #777;
}

/* ── Tag list ────────────────────────────────────────────── */
#langs-tags,
#domaines-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    background: #c9a84c;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    line-height: 1;
}

.ms-placeholder {
    font-size: 14px;
    color: #9A7830;
    font-weight: 500;
}

/* ── Overflow fix for parent containers ──────────────────── */
.form-sect,
.fs-body,
.modal,
.modal-body,
.settings-section,
.ss-body {
    overflow: visible !important;
}

/* ── Dropdown panel ──────────────────────────────────────── */
.ms-dropdown {
    display: none;
    position: fixed;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 18px;
    padding: 10px;
    max-height: 320px;
    overflow-y: auto;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .08);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: .18s ease;
}

.ms-dropdown.show {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* ── Option row ──────────────────────────────────────────── */
.ms-opt {
    display: flex !important;
    align-items: center !important;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 8px;
    border-radius: 14px;
    cursor: pointer;
    background: #fff;
    transition: .15s ease;
    font-size: 14px;
    font-weight: 500;
    color: #222;
    line-height: 1;
}

.ms-opt:last-child {
    margin-bottom: 0;
}

.ms-opt:hover {
    background: rgba(201, 168, 76, 0.1);
}

.ms-opt.selected {
    background: #c9a84c;
    color: #fff;
}

/* ── Checkbox indicator ──────────────────────────────────── */
.ms-opt-check {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1.5px solid #d6d6d6;
    flex-shrink: 0;
}

.ms-opt.selected .ms-opt-check {
    background: #111;
    border-color: #111;
}

/* ── Flag image ──────────────────────────────────────────── */
.ms-opt img {
    width: 22px !important;
    height: 16px !important;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

/* ── Writing-mode fix ────────────────────────────────────── */
.ms-dropdown * {
    writing-mode: horizontal-tb !important;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
    .ms-trigger {
        padding: 11px 13px;
    }

    .tag {
        font-size: 11px;
        padding: 6px 10px;
    }
}
