/* Notifications Manager - app-specific table cells / review legend.
 * Shared chrome, toolbar, fill hosts: vendor/failproof/stepper + table.
 */

#edit-notifications,
#notifications-table-container.is-visible,
#review-container.is-visible
{
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
}

#notifications-table-container:not(.is-visible),
#review-container.review-fill-host:not(.is-visible)
{
    display: none !important;
}

#notifications-table-container > .fp-step-toolbar,
#review-container > .fp-step-toolbar,
#review-container > p
{
    flex: 0 0 auto;
}

/* jQuery .css("display","block") on review-container would break flex fill */
#review-container.is-visible
{
    display: flex !important;
}

/* - - - - - - - - NOTIFICATIONS TABLE CELLS (edit + review) - - - - - - - - */
#notifications-table .fp-table thead th,
#review-table .fp-table thead th
{
    white-space: normal;
    text-align: center;
}

#notifications-table .fp-table thead th.fp-table-sticky,
#review-table .fp-table thead th.fp-table-sticky
{
    text-align: left;
}

#notifications-table .notif-col-header,
#review-table .notif-col-header
{
    min-width: 100px;
    text-align: center;
    white-space: normal;
}

#notifications-table .notif-col-title,
#review-table .notif-col-title
{
    display: block;
    margin-bottom: 6px;
    max-width: 120px;
    white-space: normal;
    line-height: 1.2;
    margin-left: auto;
    margin-right: auto;
}

#notifications-table .notif-channel-headers,
#review-table .notif-channel-headers
{
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
}

#notifications-table .notif-channel-toggle,
#review-table .review-channel-label
{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 28px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--fp-table-sort-icon-color, #6c757d);
}

#notifications-table .notif-channel-toggle
{
    cursor: pointer;
    user-select: none;
    text-decoration: underline;
    text-underline-offset: 2px;
}

#notifications-table .notif-channel-toggle:hover
{
    color: var(--fp-table-sort-icon-active, #212529);
}

#notifications-table .notif-cell-controls
{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 110px;
}

/* Compact MDB Selects for Received by */
#notifications-table .notif-cell-controls .select-wrapper,
#notifications-table .notif-scope-select
{
    width: auto;
    min-width: 120px;
    max-width: 140px;
}

#notifications-table .notif-cell-controls .select-wrapper .select-input
{
    font-size: 0.75rem;
    min-height: 1.75rem;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}

#notifications-table .notif-cell-channels
{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#notifications-table .notif-cell-unavailable
{
    color: #adb5bd;
    text-align: center;
    display: block;
}

#notifications-table .notif-channel
{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    width: 28px;
    min-width: 28px;
}

#notifications-table .notif-channel-label
{
    display: block;
    width: 100%;
    text-align: center;
    font-size: 0.65rem;
    line-height: 1;
    color: var(--fp-table-sort-icon-color, #6c757d);
    text-transform: uppercase;
}

html[data-theme="dark"] #notifications-table .notif-channel-toggle,
html[data-theme="dark"] #review-table .review-channel-label
{
    color: #9aabbc;
}

html[data-theme="dark"] #notifications-table .notif-channel-toggle:hover
{
    color: #e8eef4;
}

html[data-theme="dark"] #notifications-table .notif-channel-label,
html[data-theme="dark"] #review-table .review-mark-channel
{
    color: #8a97a8;
}

/* - - - - - - - - REVIEW TABLE - - - - - - - - */
#review-table .review-cell-empty
{
    display: block;
    text-align: center;
    color: #ced4da;
}

#review-table .review-cell-changes
{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 90px;
}

#review-table .review-channel-marks
{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#review-table .review-mark
{
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 28px;
    line-height: 1;
}

#review-table .review-mark-channel
{
    font-size: 0.65rem;
    color: #6c757d;
    text-transform: uppercase;
}

#review-table .review-mark-icon
{
    font-size: 0.95rem;
}

#review-table .review-mark-on,
.review-legend.review-mark-on
{
    color: #198754;
}

#review-table .review-mark-off,
.review-legend.review-mark-off
{
    color: #dc3545;
}

#review-table .review-mark-none,
.review-legend.review-mark-none
{
    color: #8a939b;
}

#review-table .review-scope-change
{
    font-size: 0.72rem;
    font-weight: 600;
    color: #e67e22;
    white-space: nowrap;
}

.review-legend.review-scope-change
{
    color: #e67e22;
}

#review-table .review-scope-icon
{
    font-size: 0.7rem;
}

.review-legend
{
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-right: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
}
