/* Notifications speaks the same quiet vocabulary as VIP and Club Prices.
   The surface itself — card, two-pane grid, pane padding, the dividing
   hairline — is .bo-workspace/.bo-pane from design/vocabulary.css; only
   what is specific to this page lives here. Tokens only.

   Register: restrained. Nothing on this page should shout, because the
   one loud thing is the consequence of pressing Send. */

.notifications-page {
    min-width: 0;
}

.notif-pane-title {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: 600;
    letter-spacing: var(--tracking-tight);
    line-height: var(--leading-tight);
    color: var(--color-text);
}

/* The mode switch is a quiet segmented control, not a pair of buttons
   competing with Send. */
.notif-toggle {
    margin-top: var(--space-4);
}

.notif-toggle .p-togglebutton {
    font-size: var(--text-md);
    font-weight: 500;
}

.notif-field {
    display: grid;
    gap: 6px;
    margin-top: var(--space-4);
}

.notif-label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
}

.notif-player-field {
    position: relative;
}

.notif-player-field .p-inputtext,
.notif-message-pane .p-inputtext,
.notif-message-pane .p-textarea {
    width: 100%;
}

/* ── Player search ──────────────────────────────────────────────────
   Results float over the pane rather than pushing it down, so choosing
   someone never moves the fields under the cursor. */
.notif-results {
    position: absolute;
    z-index: 2;
    top: calc(100% - 2px);
    right: 0;
    left: 0;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    box-shadow: var(--shadow-2);
}

.notif-result {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 0;
    border-bottom: 1px solid var(--color-border-subtle);
    border-radius: 0;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.notif-result:last-child {
    border-bottom: 0;
}

.notif-result:hover,
.notif-result:focus-visible {
    background: var(--color-surface-hover);
}

.notif-result:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
}

.notif-result-name {
    font-size: var(--text-base);
    font-weight: 500;
}

.notif-result-meta {
    flex: 0 0 auto;
    font-size: var(--text-sm);
    font-variant-numeric: tabular-nums;
    color: var(--color-text-tertiary);
}

/* The chosen recipient reads as a settled fact — a bordered row, not a
   saturated pill. The old blue chip belonged to the booking modals, and
   at this size it drew more attention than the message itself. */
.notif-chosen {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
}

.notif-chosen-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--color-text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notif-chosen-meta {
    flex: 0 0 auto;
    font-size: var(--text-sm);
    font-variant-numeric: tabular-nums;
    color: var(--color-text-tertiary);
}

.notif-chosen-clear {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--color-text-tertiary);
    font-size: 11px;
    cursor: pointer;
}

.notif-chosen-clear:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

/* ── Level range ────────────────────────────────────────────────────
   One labelled range rather than two separate fields: min and max are a
   single decision, and the spinner arrows were visual noise on a 1-18
   scale you can simply type. */
.notif-level-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.notif-level-input {
    width: 84px;
}

.notif-level-input .p-inputnumber-input {
    width: 100%;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.notif-level-dash {
    color: var(--color-text-tertiary);
}

.notif-pref-select.p-select {
    width: 100%;
    max-width: 300px;
}

/* ── Message pane ───────────────────────────────────────────────────
   Inert until recipients resolve. The heading and the reason stay at
   full strength; only the fields recede, so the pane reads as waiting
   rather than broken. */
.notif-message-pane {
    transition: opacity 0.15s ease;
}

.notif-fields.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

/* Who this reaches, stated in ink as a fact. */
.notif-summary {
    margin: var(--space-3) 0 0;
    font-size: var(--text-md);
    font-weight: 500;
    line-height: var(--leading-body);
    color: var(--color-text);
}

/* Shown in the summary's place while the pane is locked. */
.notif-hint {
    margin: var(--space-3) 0 0;
    font-size: var(--text-md);
    line-height: var(--leading-body);
    color: var(--color-text-tertiary);
}

.notif-error.p-message {
    margin-top: var(--space-3);
}

.notif-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--space-5);
}

@media (max-width: 480px) {
    .notif-pref-select.p-select {
        max-width: none;
    }
}
