/* ==========================================================================
   Account settings (AI-1825): the spam threshold slider with its scale and
   legend, and the order of connections inside a record tab.
   ========================================================================== */

.acs-spam {
    transition: opacity 180ms var(--ui-ease);
}

.acs-spam--disabled {
    opacity: 0.55;
}

.acs-spam__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

/* The slider runs through the same four bands as the legend under it. */
.acs-spam__slider {
    appearance: none;
    width: 100%;
    height: 10px;
    border-radius: var(--ui-radius-pill);
    outline: none;
    cursor: pointer;
    background: linear-gradient(
        90deg,
        var(--ui-tone-success) 0%,
        color-mix(in srgb, var(--ui-tone-success), var(--ui-tone-warning)) 20%,
        var(--ui-tone-warning) 42%,
        var(--ui-tone-cta) 68%,
        var(--ui-tone-danger) 100%);
}

.acs-spam__slider:focus-visible {
    box-shadow: var(--ui-focus-ring);
}

.acs-spam__slider:disabled {
    cursor: not-allowed;
}

.acs-spam__slider::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    border: 3px solid var(--ui-bg-card);
    border-radius: 50%;
    background: var(--ui-text);
    box-shadow: var(--ui-shadow-raised);
}

.acs-spam__slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border: 3px solid var(--ui-bg-card);
    border-radius: 50%;
    background: var(--ui-text);
    box-shadow: var(--ui-shadow-raised);
}

.acs-spam__scale {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    color: var(--ui-text-2);
    font-size: 0.72rem;
}

.acs-spam__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 14px;
    color: var(--ui-text-2);
    font-size: 0.75rem;
}

.acs-spam__legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.acs-spam__dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--ui-tone);
}

/* Which connection leads inside a record tab, under that tab's card. */
.acs-tab-sources {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 0 2px 24px;
    border-top: 1px dashed var(--ui-divider);
}

.acs-tab-source {
    display: flex;
    align-items: center;
    gap: 4px;
}

.acs-tab-source__name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    font-size: 0.875rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
