/* =============================================================================
   Add-containers dialog (ContainerPickerDialog.razor).
   Global stylesheet: every selector starts with a picker-* class, so nothing
   here can reach the Webflow markup. Link it AFTER the Webflow stylesheets:
     <link href="css/picker.css" rel="stylesheet" />
   --picker-accent: set it to the Softmoving brand colour; the fallback is only
   a neutral placeholder.
   ============================================================================= */

.picker-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.picker {
    --picker-accent: var(--brand-accent, #4b3aa8);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    width: min(900px, 94vw);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 14px;
}

.picker-title { font-weight: 600; font-size: 1.1rem; }

.picker-body {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    min-height: 0;
}

.picker-list {
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    border-radius: 6px;
    min-height: 0;
}

.picker-list-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

.picker-count { margin-left: auto; font-weight: 400; color: #666; font-size: 0.85rem; }

.picker-search {
    margin: 8px 10px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.picker-rows {
    overflow-y: auto;
    height: 50vh;
}

.picker-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    cursor: pointer;
    user-select: none;          /* Shift+click must not highlight text */
}

/* The row is the click target; the checkbox only shows state. Click-through
   prevents the native toggle from drifting away from the selection. */
.picker-row input { pointer-events: none; }

.picker-row:hover { background: #f4f3fa; }
.picker-row.selected { background: color-mix(in srgb, var(--picker-accent) 14%, #fff); }
.picker-row.locked { cursor: not-allowed; color: #999; }

.picker-code { font-weight: 600; }
.picker-sub { color: #777; font-size: 0.85rem; margin-left: auto; }

.picker-empty { padding: 16px 10px; color: #888; }

.picker-moves {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.picker-moves button {
    width: 40px;
    height: 32px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.picker-moves button:disabled { opacity: 0.4; cursor: default; }

.picker-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.picker-changes { color: #555; margin-right: auto; }
.picker-error { color: #b42318; margin-right: auto; }

.picker-footer button {
    padding: 7px 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.picker-footer button.primary {
    background: var(--picker-accent);
    border-color: var(--picker-accent);
    color: #fff;
}

.picker-footer button:disabled { opacity: 0.5; cursor: default; }
