@import url("vendor/bootstrap-icons/bootstrap-icons.min.css");

body {
    min-height: 100vh; flex-direction: column; display: flex; justify-content: flex-start;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

.heartbeat {
    color: green;
    font-size: 1em;
    margin-left: 0.75em;
    opacity: 0;
    transition: color 0.3s ease;
}

.heartbeat.active {
    opacity: 1;
    color: #28a745; /* Bootstrap success green */
}

@keyframes flash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.tooltip-inner {
    max-width: 300px;
    text-align: left;
}

.iframe-container {
    position: absolute;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    overflow: hidden;
    min-width: 200px;
    min-height: 150px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.iframe-container:hover {
    border-color: var(--bs-uproot);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.iframe-header {
    background: #e9ecef;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border-bottom: 1px solid #dee2e6;
    cursor: move;
    user-select: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.iframe-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
    min-width: 0;
}

.reload-button {
    background: var(--bs-uproot, #007bff);
    color: white;
    border: none;
    border-radius: 3px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    flex-shrink: 0;
}

.reload-button:hover {
    background: var(--bs-uproot-dark, #0056b3);
    transform: scale(1.1);
}

.reload-button:active {
    transform: scale(0.95);
}

.iframe-header:hover {
    background: #dde2e5;
}

.iframe-container.dragging {
    z-index: 1001;
    opacity: 0.8;
    transform: rotate(1deg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.iframe-container.resizing {
    z-index: 1001;
    border-color: var(--bs-uproot);
}

.iframe-container iframe {
    width: 100%;
    height: calc(100% - 27px);
    border: none;
    display: block;
}

.form-check-input:checked {
    background-color: var(--bs-uproot);
}

span.a-value {
    cursor: pointer;
    display: inline-block;
    min-width: 1em;
    min-height: 1em;
}
tr span.a-value {
    border-bottom: 1px solid #fff;
}
tr:hover span.a-value {
    border-bottom: 1px dotted var(--bs-light-text-emphasis);
}

footer a {
    color: unset;
}

.btn-view-details {
    border: none;
    font-size: 1.6em;
}
.btn-launch {
    border: none;
    font-size: 1.5em;
    padding-bottom: 0.05rem !important;
    padding-top: 0.15rem !important;
}

.sort-indicator {
    font-family: monospace;
    color: var(--bs-uproot);
}

/* Surrounding divs to enable scrolling within table */
.table-sticky-inner {
    left: 50%;
    height: 100%;
    max-width: 100vw;
    overflow: auto;
    position: absolute;
    resize: both !important;
    top: 0%;
    transform: translate(-50%, 0%);
    width: 100%;
}
.table-sticky-outer {
    height: 82.5vh;
    width: 100%;
    overflow: visible;
    position: relative;
}

.tabulator-cell .a-value {
    display: inline-block;
    overflow: hidden;
    width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Class for Bootstrap Icon font */
/* Based on https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.css
 * which is Copyright 2019-2024 The Bootstrap Authors
 * Licensed under MIT (https://github.com/twbs/icons/blob/main/LICENSE) */
.font-bi {
    font-family: bootstrap-icons !important;
    font-style: normal;
    font-weight: normal !important;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    vertical-align: -.125em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================================
   Session Page Styles
   ============================================================================ */

.btn-group-sm {
    padding-bottom: 0pt !important;
    padding-top: 0pt !important;
    height: 31px;
}

/* Color visited links so it's clear during debugging which participant URL has been opened */
.player-url:visited,
.player-name .link-subtle:visited {
    color: var(--bs-uproot) !important;
}
.player-url:visited:hover,
.player-name .link-subtle:visited:hover {
    color: var(--bs-uproot-dark) !important;
}

/* Session page: taller table container */
#tableContainer.table-sticky-outer {
    height: 89vh;
}

/* Full-width table toggle */
.table-sticky-outer-full-width {
    margin-left: 50%;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    width: 99vw;
    transform: translate(-50%, 0%);
}

/* "Not yet implemented" indicator */
.not-yet-implemented {
    color: red;
    font-weight: bold;
}
a .not-yet-implemented {
    display: none;
}
a:hover .not-yet-implemented {
    display: block;
}

/* ============================================================================
   Admin Chat Inbox
   ============================================================================ */

.adminchat-inbox {
    background-color: var(--bs-uproot-bg-subtle);
    border: 1px solid var(--bs-uproot-border-subtle-light);
    border-radius: 0.75rem;
    display: flex;
    height: 62vh;
    min-height: 28rem;
    overflow: hidden;
}

.adminchat-inbox-sidebar {
    background: linear-gradient(180deg, #f8f9fb, #f3f4f8);
    border-right: 1px solid rgba(var(--bs-uproot-rgb), 0.12);
    display: flex;
    flex-direction: column;
    min-width: 260px;
    width: 300px;
}

.adminchat-inbox-toolbar {
    border-bottom: 1px solid rgba(var(--bs-uproot-rgb), 0.1);
    padding: 0.75rem;
}

.adminchat-inbox-actions {
    display: flex;
    gap: 0.35rem;
}

.adminchat-inbox-list {
    flex: 1;
    list-style: none;
    margin: 0;
    overflow-y: auto;
    padding: 0;
}

.adminchat-inbox-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    display: flex;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    transition: background 0.12s;
}

.adminchat-inbox-item:hover {
    background: rgba(var(--bs-uproot-rgb), 0.06);
}

.adminchat-inbox-item-active {
    background: rgba(var(--bs-uproot-rgb), 0.12) !important;
    border-left: 3px solid var(--bs-uproot);
}

.adminchat-inbox-item-check {
    align-items: flex-start;
    display: flex;
    padding-top: 0.2rem;
}

.adminchat-inbox-item-body {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.adminchat-inbox-item-header {
    align-items: center;
    display: flex;
    gap: 0.4rem;
}

.adminchat-inbox-item-name {
    font-family: var(--bs-font-monospace);
    font-size: 0.88rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adminchat-inbox-item-snippet {
    font-size: 0.82rem;
    margin-top: 0.15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adminchat-inbox-item-meta {
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
    margin-top: 0.1rem;
}

.adminchat-inbox-empty {
    color: var(--bs-secondary-color);
    padding: 2rem;
    text-align: center;
}

.adminchat-status-dot {
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    height: 0.55rem;
    width: 0.55rem;
}

.adminchat-status-empty {
    background: #d1d5db;
}

.adminchat-status-sent {
    background: var(--bs-uproot);
}

.adminchat-status-reply {
    background: #f59e0b;
}

.adminchat-status-open {
    background: #10b981;
}

.adminchat-status-unread {
    background: #f59e0b;
    animation: adminchat-pulse 1.4s ease-in-out infinite;
}

@keyframes adminchat-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.35); }
}

.adminchat-inbox-item-unread {
    background: rgba(245, 158, 11, 0.08);
}

.adminchat-inbox-item-unread .adminchat-inbox-item-name {
    font-weight: 800;
}

.adminchat-inbox-item-unread .adminchat-inbox-item-snippet {
    color: var(--bs-body-color);
    font-weight: 600;
}

.adminchat-inbox-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    padding: 1.25rem;
}

.adminchat-thread-header {
    border-bottom: 1px solid rgba(var(--bs-uproot-rgb), 0.1);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

.adminchat-eyebrow {
    color: var(--bs-uproot);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.adminchat-helper {
    color: var(--bs-secondary-color);
    font-size: 0.88rem;
}

.adminchat-player-name {
    font-family: var(--bs-font-monospace);
}

.adminchat-meta-label {
    color: var(--bs-secondary-color);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.adminchat-composer-shell {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(var(--bs-uproot-rgb), 0.16);
    border-radius: 0.75rem;
    margin-top: auto;
    padding: 1rem;
}

.adminchat-message-input {
    min-height: 4.5rem;
    resize: vertical;
}

.adminchat-transcript {
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(var(--bs-uproot-rgb), 0.12);
    border-radius: 0.75rem;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
    min-height: 8rem;
    overflow-y: auto;
    padding: 1rem;
}

.adminchat-message {
    border-radius: 0.75rem;
    max-width: 85%;
    padding: 0.75rem 0.85rem;
}

.adminchat-bubble-admin {
    align-self: flex-end;
    background-color: var(--bs-uproot-bg-light);
    border: 1px solid rgba(var(--bs-uproot-rgb), 0.18);
    color: var(--bs-uproot-dark);
}

.adminchat-bubble-player {
    align-self: flex-start;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.adminchat-message-sender {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.adminchat-message-time {
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
}

.adminchat-message-body {
    line-height: 1.5;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.adminchat-empty-state {
    align-items: center;
    background: rgba(255, 255, 255, 0.84);
    border: 1px dashed rgba(var(--bs-uproot-rgb), 0.24);
    border-radius: 0.75rem;
    color: var(--bs-secondary-color);
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    min-height: 10rem;
    padding: 2rem;
    text-align: center;
}

.adminchat-empty-title {
    color: var(--bs-emphasis-color);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.adminchat-broadcast {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.adminchat-broadcast-header {
    border-bottom: 1px solid rgba(var(--bs-uproot-rgb), 0.1);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

.adminchat-broadcast-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    max-height: 6rem;
    overflow-y: auto;
}

.badge-xs {
    font-size: 0.7rem;
    padding: 0.2em 0.45em;
}

@media (max-width: 767.98px) {
    .adminchat-inbox {
        flex-direction: column;
        height: auto;
    }

    .adminchat-inbox-sidebar {
        border-bottom: 1px solid rgba(var(--bs-uproot-rgb), 0.12);
        border-right: 0;
        max-height: 40vh;
        width: 100%;
    }

    .adminchat-message {
        max-width: 100%;
    }
}

/* ============================================================================
   Tabulator Data Table Styling
   ============================================================================ */

#data-table {
    font-family: var(--bs-font-monospace);
    height: 100% !important;
}
#data-table input[type=search] {
    font-size: small !important;
    margin-top: 2px;
}
#data-table .tabulator-frozen-left {
    border: 0px;
}
#data-table .tabulator-row {
    background-color: white;
}
#data-table .tabulator-row:hover {
    background-color: #eeeeee;
}
#data-table .tabulator-row.tabulator-selected {
    background-color: var(--bs-uproot-bg-light) !important;
}

.tabulator-col-content,
.tabulator-cell {
    padding: 11px !important;
}

/* Sorted column styling */
.tabulator-col[aria-sort="ascending"] .tabulator-col-content,
.tabulator-col[aria-sort="descending"] .tabulator-col-content {
    background-color: rgba(var(--bs-uproot-rgb), 0.25) !important;
}

/* ID column styling */
.tabulator-cell[tabulator-field="id"],
.tabulator-col[tabulator-field="id"] {
    color: var(--bs-uproot);
}

.tabulator-cell[tabulator-field="id"],
.tabulator-cell[tabulator-field="player"] {
    font-weight: bolder;
}

.tabulator-col-content {
    background-color: var(--bs-uproot-bg-light);
    border-bottom: 1px solid var(--bs-uproot-border-subtle);
    border-right: 1px dashed var(--bs-uproot-border-subtle);
    height: 100%;
}

.tabulator-cell {
    border-left: none !important;
}

.tabulator-col {
    border-left: none !important;
}

.tabulator-header {
    border-bottom: 0px !important;
}

.tabulator-headers {
    vertical-align: bottom !important;
}
