.naw-mf-picker {
    margin: 10px auto 14px;
    text-align: center;
}

.naw-mf-picker-panel {
    box-sizing: border-box;
    width: min(100%, 680px);
    margin: 8px auto 0;
    padding: 10px;
    border: 1px solid rgba(95, 58, 28, 0.45);
    border-radius: 4px;
    background: rgba(240, 221, 191, 0.92);
    text-align: left;
}

.naw-mf-picker-head,
.naw-mf-picker-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.naw-mf-picker-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 8px 0;
    min-height: 24px;
}

.naw-mf-picker-chip {
    display: inline-block;
    padding: 3px 7px;
    border: 1px solid rgba(95, 58, 28, 0.35);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.45);
}

.naw-mf-picker-message {
    min-height: 20px;
    margin-top: 6px;
    font-size: 13px;
}

.naw-mf-picker-message.is-error,
.naw-mf-prefill-error {
    color: #8a1111;
    font-weight: 700;
}

.naw-mf-target-toggle {
    display: none;
    min-width: 0;
    margin: 4px 0 4px 6px;
    padding: 3px 7px;
    font-size: 12px;
}

.is-naw-mf-mode .naw-mf-target-toggle {
    display: inline-block;
}

.is-naw-mf-mode .naw-mf-direct-link {
    display: none;
}

tr.naw-mf-target-selected {
    position: relative;
    z-index: 2;
    outline: 2px solid rgba(65, 117, 44, 0.72);
    outline-offset: -2px;
    box-shadow: 0 0 0 2px rgba(65, 117, 44, 0.22);
    filter: drop-shadow(0 0 3px rgba(65, 117, 44, 0.28));
}

tr.naw-mf-target-selected > td {
    background-color: rgba(111, 153, 83, 0.12) !important;
}

.naw-attack-multiflood-action {
    display: inline-block;
    margin: 0 6px 6px 0;
}

.naw-attack-multiflood-link.is-disabled,
.naw-profile-multiflood-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 520px) {
    .naw-mf-picker-panel {
        padding: 8px;
    }

    .naw-mf-picker-actions .btn {
        flex: 1 1 140px;
        min-width: 0;
    }

    .naw-mf-target-toggle {
        display: none;
        margin-left: 3px;
        padding: 3px 5px;
    }

    .is-naw-mf-mode .naw-mf-target-toggle {
        display: inline-block;
    }
}

/* Multiflood : saisie des cibles et lancement mobile-first. */
.naw-mf-page-content {
    box-sizing: border-box;
    width: 100%;
    padding: 14px 8px 18px;
}

.naw-mf-targets-card {
    width: 100%;
    margin: 0 auto 14px;
}

.naw-mf-target-table {
    width: 100%;
    margin: 0 auto;
    table-layout: fixed;
}

.naw-mf-target-table th,
.naw-mf-target-table td {
    box-sizing: border-box;
    padding: 7px 5px;
    vertical-align: middle;
}

.naw-mf-target-table thead th:first-child,
.naw-mf-target-label {
    width: 62px;
}

.naw-mf-target-label {
    white-space: nowrap;
    text-align: left;
    font-size: 0.92rem;
}

.naw-mf-pseudo {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

.naw-mf-autocomplete {
    position: relative;
    width: 100%;
}

.naw-mf-suggestions {
    position: absolute;
    z-index: 40;
    top: calc(100% + 3px);
    left: 0;
    box-sizing: border-box;
    width: 100%;
    min-width: 175px;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid rgba(95, 58, 28, 0.48);
    border-radius: 4px;
    background: #f4e5cf;
    box-shadow: 0 6px 16px rgba(37, 21, 10, 0.24);
}

.naw-mf-suggestion {
    display: flex;
    width: 100%;
    padding: 8px 9px;
    border: 0;
    border-bottom: 1px solid rgba(95, 58, 28, 0.18);
    background: transparent;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-align: left;
    cursor: pointer;
}

.naw-mf-suggestion:last-child {
    border-bottom: 0;
}

.naw-mf-suggestion:hover,
.naw-mf-suggestion:focus,
.naw-mf-suggestion.is-active {
    background: rgba(111, 153, 83, 0.2);
    outline: none;
}

.naw-mf-suggestion strong {
    font-size: 0.95rem;
}

.naw-mf-suggestion span {
    font-size: 0.8rem;
    opacity: 0.82;
}

.naw-mf-colony-picker {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    min-width: 0;
}

.naw-mf-colony-option {
    display: flex;
    min-height: 34px;
    margin: 0;
    padding: 5px 6px;
    border: 1px solid rgba(95, 58, 28, 0.34);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.24);
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    font-weight: 600;
}

.naw-mf-colony-option input {
    margin: 0;
}

.naw-mf-colony-option.is-in-range {
    border-color: rgba(65, 117, 44, 0.72);
    background: rgba(111, 153, 83, 0.12);
}

.naw-mf-colony-option.is-disabled {
    opacity: 0.42;
    cursor: not-allowed;
    filter: grayscale(0.8);
}

.naw-mf-colony-status {
    grid-column: 1 / -1;
    display: block;
    min-height: 28px;
    line-height: 1.25;
    text-align: left;
    font-size: 0.75rem;
    opacity: 0.82;
}

.naw-mf-colony-status.is-ready {
    color: #315f25;
    opacity: 1;
}

.naw-mf-colony-status.is-error,
.naw-mf-inline-error {
    color: #8a1111;
    font-weight: 700;
}

.naw-mf-target-help {
    margin-top: 8px;
    font-size: 0.82rem;
    text-align: left;
}

.naw-mf-load-action,
.naw-mf-launch-main {
    display: flex;
    justify-content: center;
    margin: 12px 0;
}

.naw-mf-launch-options {
    display: flex;
    box-sizing: border-box;
    width: 100%;
    margin: 12px auto 8px;
    padding: 10px;
    border: 1px solid rgba(95, 58, 28, 0.3);
    border-radius: 4px;
    background: rgba(240, 221, 191, 0.55);
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
}

.naw-mf-remaining-toggle {
    width: 100%;
    white-space: normal;
}

.naw-mf-remaining-toggle.is-active {
    box-shadow: inset 0 0 0 2px rgba(65, 117, 44, 0.65);
}

.naw-mf-remaining-hint,
.naw-mf-summary {
    line-height: 1.35;
    font-size: 0.86rem;
}

.naw-mf-launch-success {
    color: #315f25;
    font-weight: 700;
}

#erreur-mf {
    margin-top: 10px;
    text-align: center;
}

@media (min-width: 640px) {
    .naw-mf-page-content {
        padding: 20px 16px 24px;
    }

    .naw-mf-targets-card,
    .naw-mf-launch-options,
    .naw-mf-summary {
        max-width: 760px;
        margin-left: auto;
        margin-right: auto;
    }

    .naw-mf-target-table thead th:first-child,
    .naw-mf-target-label {
        width: 84px;
    }

    .naw-mf-target-table th,
    .naw-mf-target-table td {
        padding: 9px 8px;
    }

    .naw-mf-colony-status {
        min-height: 18px;
        font-size: 0.8rem;
    }

    .naw-mf-launch-options {
        flex-direction: row;
        align-items: center;
    }

    .naw-mf-remaining-toggle {
        width: auto;
        flex: 0 0 auto;
    }

    .naw-mf-remaining-hint {
        flex: 1 1 auto;
        text-align: left;
    }
}
