/* Shared session detail view styling (header + state buttons + state dot).
   Used by the admin Sessions pane and the Tables pane. */

.session-state-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.session-state-dot.active {
    background: var(--state-active-color);
}

.session-state-dot.ordered {
    background: var(--state-ordered-color);
}

.session-state-dot.finished {
    background: var(--state-finished-color);
}

.session-detail-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem 0.8rem;
    margin-bottom: 1rem;
    padding: 0.6rem 0.8rem;
    background: var(--attenuated-color, #f5f5f5);
    border-radius: 6px;
}

.session-detail-header .sdh-left,
.session-detail-header .sdh-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.session-detail-header .sdh-waiter {
    font-weight: bold;
    color: #2e7d32;
    white-space: nowrap;
}

.session-detail-header .sdh-name {
    font-weight: bold;
    font-size: 1.1rem;
    max-width: 16ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.session-detail-header .sdh-time {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* .session-table-badge (the shared table-number pill) lives in
   /common/style.css so every page — admin, service — renders table numbers
   identically. */

/* The detail header itself uses --attenuated-color, so the pill needs a
   contrasting (white) background there to read as a pill. */
.session-detail-header .session-table-badge {
    background: #fff;
}

/* Empty placeholder keeps the table column width without showing a pill. */
.session-detail-header .session-table-badge.is-empty {
    background: transparent;
}

.session-state-buttons {
    display: flex;
    gap: 0.5rem;
}

.session-state-btn {
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
    color: #fff;
    transition: opacity 0.15s, box-shadow 0.15s;
}

.session-state-btn[data-state="active"] {
    background: var(--state-active-color);
    --state-glow: var(--state-active-color);
}

.session-state-btn[data-state="ordered"] {
    background: var(--state-ordered-color);
    --state-glow: var(--state-ordered-color);
}

.session-state-btn[data-state="finished"] {
    background: var(--state-finished-color);
    --state-glow: var(--state-finished-color);
}

.session-state-btn:not(.is-selected) {
    opacity: 0.4;
}

.session-state-btn.is-selected {
    border-color: #333;
    box-shadow: 0 0 0 1px var(--state-glow), 0 0 20px 2px var(--state-glow);
}

/* Neutral action button (not a state toggle), e.g. "Change table". */
.session-change-table-btn {
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    border: 2px solid #333;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
}

.session-change-table-btn:hover {
    background: #f2f2f2;
}