/*
- Senders Manager & BuzZync.Components - Shared Styles Consolidated from component-scoped <style> blocks.
*/

/* ── Brand Colors ── */
:root {
    --senders-brand: #6F4CFF;
    --senders-danger: #E53935;
}

/* ── Cards ── */
.custom-card,
.custom-card .table-responsive,
.custom-card .mud-table {
    position: relative;
    z-index: 0;
}

.custom-card .mud-table .mud-table-body .mud-table-row {
    position: relative;
    z-index: 0;
    overflow: visible;
}

/* ── Popover & Menu ── */
.sender-menu-popover {
    z-index: 3000 !important;
}

/* ── Menu Trigger Button ── */
.menu-trigger {
    background: #fff !important;
    color: var(--senders-brand) !important;
    border: 2px solid var(--senders-brand) !important;
    border-radius: 9999px !important;
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    position: relative;
    z-index: 1 !important;
}

.menu-trigger:hover {
    background-color: rgba(111, 76, 255, .06) !important;
}

.menu-trigger .mud-icon-root {
    color: var(--senders-brand) !important;
}

.menu-item-danger {
    color: var(--senders-danger) !important;
}

/* ── Header Actions ── */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

/* ── Toolbar Input ── */
.toolbar-input .mud-input-root {
    height: 40px;
    border-radius: 12px;
}

.toolbar-input .mud-input-root .mud-input-slot {
    height: 40px;
    padding-top: 0;
    padding-bottom: 0;
}

.toolbar-input .mud-input-input {
    height: 40px;
    line-height: 40px;
}

.toolbar-input .mud-input-adornment {
    height: 40px;
}

/* ── FAB Outline (legacy Portal components) ── */
.fab-outline {
    background-color: #fff !important;
    color: var(--senders-brand) !important;
    border: 2px solid var(--senders-brand) !important;
}

.fab-outline:hover {
    background-color: rgba(111, 76, 255, .06) !important;
}

.fab-outline .mud-icon-root {
    color: var(--senders-brand) !important;
}

/* ── FAB Outline (BuzZync.Components) ── */
.bz-fab-outline {
    background-color: #fff !important;
    color: var(--senders-brand) !important;
    border: 2px solid var(--senders-brand) !important;
    box-shadow: none !important;
}

.bz-fab-outline:hover {
    background-color: rgba(111, 76, 255, .06) !important;
}

.bz-fab-outline .mud-icon-root {
    color: var(--senders-brand) !important;
}

/* ── Table Header ── */
.mud-table thead th {
    color: var(--senders-brand) !important;
    font-weight: 600;
}

.mud-width-full {
    width: 100% !important;
}

/* ── Switch / Toggle ── */
.switch-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.switch-readonly .mud-switch-track,
.switch-readonly .mud-switch-thumb {
    background-color: var(--senders-brand) !important;
}

/* ── Senders Cell ── */
.senders-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.senders-more {
    color: #8a8a8a;
    font-size: 12px;
    white-space: nowrap;
}

/* ── Count Chips ── */
.count-chip {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 9999px;
    white-space: nowrap;
}

.count-chip-total {
    background: rgba(0, 0, 0, .05);
    color: #444441;
}

.count-chip-active {
    background: rgba(46, 125, 50, .12);
    color: #2e7d32;
}

.count-chip-inactive {
    background: rgba(0, 0, 0, .06);
    color: #5f5e5a;
}

.count-chip-dedicated {
    background: rgba(111, 76, 255, .16);
    color: var(--senders-brand);
}

/* ── Status Chips ── */
.status-chip {
    font-weight: 600;
    border-radius: 9999px;
}

.status-valid {
    background: rgba(46, 125, 50, .12) !important;
    color: #2e7d32 !important;
}

.status-disabled {
    background: rgba(111, 76, 255, .16) !important;
    color: var(--senders-brand) !important;
}

.status-rejected {
    background: rgba(229, 57, 53, .12) !important;
    color: var(--senders-danger) !important;
}

.status-request {
    background: rgba(25, 118, 210, .12) !important;
    color: #1976d2 !important;
}

/* ── Dialog: my-custom-class ── */
.my-custom-class .mud-dialog-paper {
    position: relative;
    overflow: visible;
}

.my-custom-class .mud-dialog-content {
    overflow: visible;
}

.my-custom-class .mud-popover,
.my-custom-class .mud-popover-inline {
    z-index: 5000 !important;
}

/* ── FAB: Cancel Soft ── */
.fab-cancel-soft {
    background: #FDECEC !important;
    color: #fff !important;
    box-shadow: none !important;
}

.fab-primary {
    background: var(--senders-brand) !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(111, 76, 255, .35) !important;
}

/* ── Impact Dialog ── */
.impact-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.impact-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.impact-header-icon-info {
    background: rgba(111, 76, 255, .12);
    color: var(--senders-brand, #6F4CFF);
}

.impact-header-icon-warn {
    background: rgba(229, 57, 53, .12);
    color: var(--senders-danger, #E53935);
}

.impact-stats {
    display: flex;
    gap: 10px;
    margin: 4px 0 14px;
}

.impact-stat {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 14px;
    border-radius: 12px;
}

.impact-stat-activate {
    background: rgba(46, 125, 50, .08);
    color: #2e7d32;
}

.impact-stat-deactivate {
    background: rgba(229, 57, 53, .08);
    color: var(--senders-danger, #E53935);
}

.impact-stat-value {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
}

.impact-stat-label {
    font-size: 12px;
    font-weight: 600;
    opacity: .85;
}

.impact-bar-block {
    margin: 0 0 14px;
}

.impact-bar {
    display: flex;
    width: 100%;
    height: 8px;
    border-radius: 9999px;
    overflow: hidden;
    background: rgba(0, 0, 0, .06);
}

.impact-bar-remain {
    background: #2e7d32;
    height: 100%;
}

.impact-bar-remove {
    background: var(--senders-danger, #E53935);
    height: 100%;
}

.impact-bar-caption {
    margin: 6px 0 0;
    font-size: 12px;
    color: #7a7a76;
}

.impact-warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: rgba(229, 57, 53, .08);
    border: 1px solid rgba(229, 57, 53, .3);
    color: #b71c1c;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 10px;
}

.impact-footnote {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #8a8a86;
    padding-top: 2px;
}

/* ── Assignments Editor ── */
.assign-title {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.assign-client {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--senders-brand, #6F4CFF);
    background: rgba(111, 76, 255, .10);
    border-radius: 9999px;
    padding: 2px 12px;
}

.assign-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.assign-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.assign-search {
    flex: 1 1 240px;
}

.assign-filters {
    display: flex;
    gap: 6px;
}

.assign-filter {
    font: inherit;
    font-size: 13px;
    padding: 5px 14px;
    border-radius: 9999px;
    border: 1.5px solid rgba(111, 76, 255, .35);
    background: #fff;
    color: var(--senders-brand, #6F4CFF);
    cursor: pointer;
    transition: background-color .15s ease;
}

.assign-filter:hover {
    background: rgba(111, 76, 255, .06);
}

.assign-filter-on {
    background: var(--senders-brand, #6F4CFF);
    border-color: var(--senders-brand, #6F4CFF);
    color: #fff;
}

.assign-filter-on:hover {
    background: var(--senders-brand, #6F4CFF);
}

.assign-bulk {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
}

.assign-bulk-off {
    color: var(--senders-danger, #E53935) !important;
}

.assign-table .mud-table-container {
    scrollbar-width: thin;
}

.assign-row-dim {
    color: #8a8a8a;
}

.status-chip-sm {
    font-size: 12px;
    font-weight: 600;
    border-radius: 9999px;
    padding: 2px 10px;
    white-space: nowrap;
}

.assign-state {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
}

.assign-state-active { color: #2e7d32; }
.assign-state-inactive { color: #8a8a8a; }
.assign-state-never { color: #b5b5b5; font-weight: 400; }
.assign-state-dedicated { color: var(--senders-brand, #6F4CFF); }

.assign-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

.assign-delta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.assign-delta-none {
    font-size: 13px;
    color: #a5a5a5;
}

.delta-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
}

.delta-chip-add {
    background: rgba(46, 125, 50, .12);
    color: #2e7d32;
}

.delta-chip-remove {
    background: rgba(229, 57, 53, .12);
    color: var(--senders-danger, #E53935);
}

/* ── Portal TransferListPicker (original) ── */
.transfer-wrapper {
    display: flex;
    gap: 16px;
    align-items: stretch;
    min-height: 460px;
}

.transfer-col {
    flex: 1 1 0;
    min-width: 0;
}

.transfer-panel {
    height: 460px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.transfer-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 4px 8px 4px;
}

.transfer-header {
    flex: 0 0 auto;
}

.transfer-search {
    flex: 1 1 auto;
}

.transfer-scroll {
    flex: 1 1 auto;
    overflow: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, .35) transparent;
}

.transfer-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.transfer-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, .25);
    border-radius: 4px;
}

.transfer-scroll::-webkit-scrollbar-track {
    background-color: rgba(0, 0, 0, .06);
    border-radius: 4px;
}

.transfer-actions {
    width: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

/* ── BzTransferListPicker ── */
.bz-transfer-wrapper {
    display: flex;
    gap: 16px;
    align-items: stretch;
    min-height: 460px;
}

.bz-transfer-col {
    flex: 1 1 0;
    min-width: 0;
}

.bz-transfer-panel {
    height: 460px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.bz-transfer-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 4px 8px 4px;
}

.bz-transfer-header {
    flex: 0 0 auto;
}

.bz-transfer-search {
    flex: 1 1 auto;
    min-width: 0;
}

.bz-transfer-scroll {
    flex: 1 1 auto;
    overflow: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, .35) transparent;
}

.bz-transfer-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.bz-transfer-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, .25);
    border-radius: 4px;
}

.bz-transfer-scroll::-webkit-scrollbar-track {
    background-color: rgba(0, 0, 0, .06);
    border-radius: 4px;
}

.bz-transfer-actions {
    width: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
}