﻿/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
for details on configuring this project to bundle and minify static web assets. */

/* ===================================================================
   CSS CUSTOM PROPERTIES (CSS Variables) FOR THEMING
   ===================================================================
   These variables define the color scheme and can be overridden
   to create custom themes. See THEMING.md for details.
   =================================================================== */
:root {
    /* Primary Colors */
    --primary-bg: darkgreen;
    --primary-text: white;
    --secondary-bg: lightgrey;
    --secondary-text: black;
    
    /* Court/Background Colors */
    --court-bg: darkgreen;
    --body-bg: initial;
    --body-text: white;
    
    /* Score Display Colors */
    --score-bg: lightgrey;
    --score-text: black;
    --score-highlight-bg: yellow;
    --score-highlight-text: black;
    --game-score-bg: white;
    --game-score-text: black;
    
    /* Header Colors */
    --header-bg: black;
    --header-text: white;
    --header-accent: yellow;
    
    /* Status Colors */
    --status-playing-bg: lightgreen;
    --status-playing-text: black;
    --status-final-bg: black;
    --status-final-text: white;
    --status-awaiting-bg: yellow;
    --status-awaiting-text: black;
    --status-postponed-bg: orange;
    --status-postponed-text: black;
    --status-cancelled-bg: brown;
    --status-cancelled-text: white;
    --status-retire-bg: lightcoral;
    --status-retire-text: black;
    
    /* Chat Colors */
    --chat-bg: white;
    --chat-text: black;
    --chat-timestamp: gray;
    --chat-important: red;
    --chat-plus: green;
    --chat-under: purple;
    --chat-dollar-bg: darkgreen;
    --chat-dollar-text: white;
    --chat-reverse-bg: black;
    --chat-reverse-text: white;
    --chat-bubble-bg: #eaf4ff;
    --chat-bubble-border: rgba(0, 123, 255, 0.18);
    --chat-bubble-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --chat-scoring-bg: #28a745;
    --chat-scoring-text: #ffffff;
    --chat-update-bg: #007bff;
    --chat-update-text: #ffffff;
    --chat-action-color: #6c757d;
    --chat-action-hover-bg: rgba(0, 0, 0, 0.08);
    --chat-delete-action: #dc3545;
    
    /* UI Element Colors */
    --button-bg: darkgreen;
    --button-border: white;
    --link-color: #0071c1;
    --card-bg: white;
    --card-text: black;
    
    /* Table/Border Colors */
    --table-bg: ghostwhite;
    --border-color: slategrey;
    --player-row-bg: lightgrey;
    --player-row-text: black;
    
    /* Serving Colors */
    --serving-bg: #f8f9fa;
    --serving-text: #333;
    --serving-button-bg: #e9ecef;
    --serving-button-text: #495057;
    --serving-button-border: #ced4da;
    --serving-button-hover-bg: #dee2e6;
    --serving-button-active-bg: #007bff;
    --serving-button-active-text: white;
    --serving-icon-color: darkgreen;
    --serving-icon-inactive: #6c757d;
    
    /* SignalR Status Bar */
    --signalr-bar-bg: #6c757d;
    --signalr-bar-text: white;
    --signalr-bar-border: #545862;
    --connection-connected: #28a745;
    --connection-disconnected: #dc3545;
    
    /* Shadow and Effects */
    --box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
    --box-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --box-shadow-md: 0 2px 8px rgba(0, 0, 0, 0.2);
    --box-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.3);
    --box-shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.5);
    --box-shadow-button-active: 0 2px 4px rgba(0, 123, 255, 0.25);
    --slider-arrow-bg: rgba(108, 117, 125, 0.4);
    --slider-arrow-border: rgba(108, 117, 125, 0.6);
    --slider-arrow-hover-bg: rgba(108, 117, 125, 0.6);
    
    /* Border Radius */
    --border-radius-sm: 4px;
    --border-radius-md: 6px;
    --border-radius-lg: 8px;
    --border-radius-full: 50%;
}

body {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

a.navbar-brand {
  white-space: normal;
  text-align: center;
  word-break: break-all;
}

.setScore {
    font-size: 32px;
    font-weight: 700;
    width: 40px;
    height: 100%;
    text-align: center;
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Non-prefixed version, currently
                                 supported by Chrome and Opera */
    background-color: var(--score-bg);
    padding: 0 0 0 0;
    color: var(--score-text);
}

.scoreControl {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
}

.scoreValue {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scoreValueSelected {
    background-color: #ffe066;
    color: #000;
    box-shadow: inset 0 0 0 2px #b8860b;
}

.scoreValueUpdated {
    animation: scoreValueHighlightFade 3s ease-out forwards;
}

@keyframes scoreValueHighlightFade {
    0% {
        background-color: #ffe066;
        box-shadow: inset 0 0 0 2px #b8860b, 0 0 18px rgba(255, 224, 102, 0.75);
    }

    100% {
        background-color: transparent;
        box-shadow: inset 0 0 0 0 rgba(184, 134, 11, 0), 0 0 0 rgba(255, 224, 102, 0);
    }
}

.globalHoldOverlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    pointer-events: none;
}

.globalHoldOverlayCircle {
    position: fixed;
    width: 84px;
    height: 84px;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 3px solid #000;
    background-color: rgba(255, 255, 255, 0.96);
    color: #000;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.36);
    font-size: clamp(24px, 4.8vw, 38px);
    font-weight: 800;
    line-height: 1;
    font-family: inherit;
    appearance: none;
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.globalHoldOverlayCircle:active,
.globalHoldOverlayCircle:focus-visible {
    background-color: #000;
    color: #fff;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.48);
}

@media (hover: hover) and (pointer: fine) {
    .globalHoldOverlayCircle:hover {
        background-color: #000;
        color: #fff;
        box-shadow: 0 18px 34px rgba(0, 0, 0, 0.48);
    }
}

.globalHoldOverlayLabel {
    position: fixed;
    transform: translateY(-50%);
    max-width: min(42vw, 220px);
    pointer-events: none;
    color: #fff;
    font-size: clamp(22px, 4.2vw, 34px);
    font-weight: 800;
    line-height: 1.05;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.65);
}

.globalHoldOverlayLabelLeft {
    transform: translate(-100%, -50%);
    text-align: right;
}

.gameScore {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    width: 100%;
    height: 100%;
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Non-prefixed version, currently
                                 supported by Chrome and Opera */
    background-color: var(--game-score-bg);
    padding: 0 0 0 0;
    color: var(--game-score-text);
}

.highlight {
    background: var(--score-highlight-bg);
}

/* Chat attachment button and send button styling */
.chatAttachmentButton,
.chatEmojiButton,
.chatGifButton,
.chatSettingsButton,
.imageUploadButton,
.sendBoxBtn {
    background: #007bff;
    color: white;
    border: none;
    width: 35px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: 35px;
    align-self: flex-end;
}

.chatEmojiButton {
    font-size: 18px;
}

.chatGifButton {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.chatAttachmentButton:hover,
.chatEmojiButton:hover,
.chatGifButton:hover,
.chatSettingsButton:hover,
.imageUploadButton:hover,
.sendBoxBtn:hover {
    background: #0056b3;
}

.chatAttachmentButton:focus,
.chatEmojiButton:focus,
.chatGifButton:focus,
.chatSettingsButton:focus,
.imageUploadButton:focus,
.sendBoxBtn:focus {
    //outline: 2px solid #80bdff;
    //outline-offset: 2px;
}

/* Chat styling improvements */
.sendBox {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 4px;
    margin: 8px 0;
}

/* Attachment preview row — appears above the input row when a file is staged */
.chat-attachment-preview {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 2px;
    border-bottom: 1px solid #ccc;
    margin-bottom: 2px;
}

.chat-attachment-thumb {
    max-height: 60px;
    max-width: 80px;
    border-radius: var(--border-radius-sm);
    border: 1px solid #ddd;
    object-fit: cover;
}

.chat-attachment-label {
    flex: 1;
    font-size: 0.85em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.8;
}

.chat-attachment-dismiss {
    background: none;
    border: none;
    color: #888;
    font-size: 1.2em;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 50%;
    line-height: 1;
    flex-shrink: 0;
}

.chat-attachment-dismiss:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

/* Caption displayed below image or video in a chat bubble */
.chatCaption {
    font-size: 0.9em;
    color: #666;
    margin-top: 4px;
    word-break: break-word;
}

.chatText {
    flex: 1;
    min-width: 0;
    min-height: 35px;
    max-height: 140px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius-sm);
    resize: none;
    overflow-y: auto;
    font-family: inherit;
    line-height: 1.4;
    box-sizing: border-box;
}

/* Image display styling in chat */
.chatMessage img {
    display: block;
    margin: 4px 0;
    border: 1px solid #ddd;
    box-shadow: var(--box-shadow-sm);
}

/* Chat image sizing classes */
.chatImage,
.chatImagePreview {
    max-width: 100px;
    max-height: 100px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    height: auto;
    width: auto;
}

.chatImage.large {
    max-width: 100%;
    max-height: none;
}

/* Fullscreen image overlay for chat images */
.chatImageOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: zoom-out;
}

.chatImageOverlay img {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow-xl);
}

/* Chat video inline preview */
.chatVideoWrapper {
    display: block;
    max-width: 260px;
}

.chatVideoPreview {
    max-width: 260px;
    max-height: 200px;
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-sm);
    display: block;
    background: #000;
    cursor: pointer;
}

/* Fullscreen video overlay for chat videos */
.chatVideoOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: default;
}

.chatVideoOverlay video {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow-xl);
}

.upload-progress {
    color: #6c757d;
    font-style: italic;
}

.upload-pending {
    color: #856404;
    font-style: italic;
}

.chatWindow {
    background-color: var(--chat-bg);
    height: 100%;
    color: var(--chat-text);
    display: block;
    border: thin;
    padding: 8px;
    max-width: 700px;
    margin-bottom: 5px;
    max-height: 290px;
    overflow-y: auto;
    font-size: 14px;
    resize: vertical;
}

.chatWindowShell {
    position: relative;
    max-width: 700px;
    margin-bottom: 5px;
}

.chatWindowShell .chatWindow {
    margin-bottom: 0;
    padding-bottom: 48px;
}

.chatSettingsButton {
    position: absolute;
    right: 0;
    bottom: 0;
    margin: 0;
    z-index: 2;
    border-radius: var(--border-radius-sm) 0 0 0;
}

.lineAnchors {
    display: flex;
    background-color: var(--card-bg);
    width: 100%;
    margin-top: 0
}

.lineContainer {
}

.bold-score {
    font-weight: bold;
    color: var(--header-accent);
}

.lineAnchor {
    flex: 1;
    margin-left: 3px;
    margin-right: 3px;
}

.lineAnchor.active {
    background-color: #0d6efd !important;
    color: white !important;
    border-color: #0d6efd !important;
}

#scoresApp {
    //padding-top: 80px;

}

.chatLine {
    display: flex;
    width: 100%;
    margin-bottom: 12px;
    padding: 0 2px;
}

.chatLineEditable {
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.chatBubble {
    width: 100%;
    max-width: 100%;
    position: relative;
    padding: 12px 12px 6px 12px;
    border-radius: 10px;
    background-color: var(--chat-bubble-bg);
    border: 1px solid var(--chat-bubble-border);
    box-shadow: var(--chat-bubble-shadow);
    color: var(--chat-text);
}

.chatBubbleReceived {
    animation: chatBubbleReceiveFade 3s ease-out forwards;
}

@keyframes chatBubbleReceiveFade {
    0% {
        box-shadow: 0 0 0 3px rgba(255, 224, 102, 0.95), 0 0 22px rgba(255, 224, 102, 0.55), var(--chat-bubble-shadow);
        filter: brightness(1.08);
    }

    100% {
        box-shadow: var(--chat-bubble-shadow);
        filter: brightness(1);
    }
}

.chatBubbleContent {
    position: relative;
}

.chatBubbleBody {
    flex: 1 1 auto;
    min-width: 0;
}

.chatSenderName {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--chat-important, #7ec8e3);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chatBubbleMessage {
    min-width: 0;
    padding-right: 4px;
}

.chatBubbleMeta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 3px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.chatReactionSummary {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-right: auto;
    min-height: 24px;
    width: fit-content;
    max-width: 100%;
    padding: 3px 9px;
    border: 1px solid rgba(0, 123, 255, 0.28);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.chatReactionSummary:empty {
    display: none;
}

.chatReactionSummaryItem {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0;
    color: var(--chat-timestamp);
    font-size: 11px;
    line-height: 1;
}

.chatReactionSummaryItemSelected {
    padding: 1px 4px;
    border-radius: 999px;
    background: rgba(0, 123, 255, 0.12);
    color: var(--chat-text);
}

.chatReactionSummaryEmoji {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    line-height: 1;
}

.chatReactionSummaryCount {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    line-height: 1;
}

.chatTimeStamp,
.chatEditedMarker {
    font-size: 10px;
    line-height: 1.1;
    padding: 0;
    margin: 0;
}

.chatTimeStamp {
    color: var(--chat-timestamp);
}

.chatEditedMarker {
    color: var(--chat-timestamp);
    font-style: italic;
}

.chatReactionButton {
    min-width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--chat-text);
    cursor: pointer;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.chatReactionButton:hover,
.chatReactionButton:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.24);
    transform: scale(1.04);
    outline: none;
}

.chatReactionButtonSelected {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
    color: var(--chat-text);
}

.chatBubbleActions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    z-index: 1;
    pointer-events: none;
}

.chatActionButton {
    width: 28px;
    height: 28px;
    border: 2px solid #000000;
    border-radius: var(--border-radius-full);
    background: #ffffff;
    color: var(--chat-action-color);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.chatActionButton:hover:not(:disabled),
.chatActionButton:focus-visible:not(:disabled) {
    background-color: #ffffff;
    transform: scale(1.05);
    outline: none;
}

.chatActionButtonDelete {
    color: var(--chat-delete-action);
}

.chatActionButton:disabled {
    cursor: not-allowed;
}

.chatBubbleEditable:focus-visible {
    outline: 2px solid var(--chat-action-color);
    outline-offset: 2px;
}

.chatBubbleScoring {
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    color: var(--chat-text);
}

.chatBubbleScoring .chatMessage {
    font-weight: 700;
}

.chatBubbleUpdate {
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    color: var(--chat-text);
}

.chatBubbleScoring .chatBubbleBody,
.chatBubbleUpdate .chatBubbleBody {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.chatBubbleScoring .chatBubbleMeta,
.chatBubbleUpdate .chatBubbleMeta {
    margin-top: 0;
    justify-content: flex-start;
}

.chatLine:has(.chatBubbleScoring),
.chatLine:has(.chatBubbleUpdate) {
    margin-bottom: 4px;
}

.chatBubbleScoring .chatMessage,
.chatBubbleUpdate .chatMessage,
.chatBubbleScoring .chatActionButton,
.chatBubbleUpdate .chatActionButton {
    color: inherit;
}

.chatBubbleScoring .chatActionButtonDelete,
.chatBubbleUpdate .chatActionButtonDelete {
    color: var(--chat-delete-action);
}

.chatBubbleScoring .chatTimeStamp,
.chatBubbleScoring .chatEditedMarker,
.chatBubbleScoring .chatReactionSummaryItem,
.chatBubbleScoring .chatReactionButton,
.chatBubbleUpdate .chatTimeStamp,
.chatBubbleUpdate .chatEditedMarker,
.chatBubbleUpdate .chatReactionSummaryItem,
.chatBubbleUpdate .chatReactionButton {
    color: var(--chat-timestamp);
}

.chat-action-menu {
    position: fixed;
    z-index: 11000;
    min-width: 170px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transform: translate(-50%, -10%);
}

.chat-action-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #f8fafc;
    text-align: left;
}

.chat-action-menu-item:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
}

.chat-action-menu-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-action-menu-item.delete {
    color: #fecaca;
}

.chat-reaction-picker {
    position: fixed;
    z-index: 11000;
    min-width: 248px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    background: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.chat-reaction-picker-button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #f8fafc;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-reaction-picker-button:hover,
.chat-reaction-picker-button:focus-visible,
.chat-reaction-picker-button.active {
    background: rgba(255, 255, 255, 0.14);
    outline: none;
}

.chat-emoji-picker {
    position: fixed;
    z-index: 11000;
    width: 288px;
    background: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-emoji-category-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 8px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.chat-emoji-category-tab {
    width: 36px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s;
}

.chat-emoji-category-tab:hover,
.chat-emoji-category-tab:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.chat-emoji-category-tab.active {
    background: rgba(0, 123, 255, 0.35);
}

.chat-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    padding: 6px 8px;
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.chat-emoji-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 6px;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.1s;
}

.chat-emoji-btn:hover,
.chat-emoji-btn:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.chat-gif-picker {
    position: fixed;
    z-index: 11000;
    width: 320px;
    background: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 8px;
    gap: 8px;
}

.chat-gif-search {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #e5e7eb;
    font-size: 14px;
    padding: 6px 10px;
    outline: none;
    box-sizing: border-box;
    flex-shrink: 0;
}

.chat-gif-search:focus {
    border-color: rgba(96, 165, 250, 0.6);
    background: rgba(255, 255, 255, 0.1);
}

.chat-gif-search::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.chat-gif-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    max-height: 240px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.chat-gif-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    display: block;
}

.chat-gif-thumb:hover {
    opacity: 0.85;
    transform: scale(1.03);
}

.chat-gif-loading,
.chat-gif-hint {
    text-align: center;
    color: rgba(255, 255, 255, 0.45);
    font-size: 13px;
    padding: 20px 0;
}

.chat-gif-error {
    text-align: center;
    color: #f87171;
    font-size: 13px;
    padding: 12px 0;
}

.chat-gif-attribution {
    text-align: right;
    color: rgba(255, 255, 255, 0.3);
    font-size: 10px;
    padding-top: 2px;
    flex-shrink: 0;
}

.sendBox {
    width: auto;
    display: flex;
    flex-wrap: wrap;
    max-width: 700px;
}

.importantText {
    color: var(--chat-important);
    font-weight: 900;
}

.viewer-signin-cta {
    display: flex;
    align-items: center;
    padding: 6px 4px;
    max-width: 700px;
}

.viewer-signin-btn {
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bigText {
    font-size: 23px;
}

.strongText {
    font-style:italic;
    font-weight: 900;
    font-size: large;

}

.reverseText {
    color: var(--chat-reverse-text);
    background-color: var(--chat-reverse-bg);
}

.dollarText {
    color: var(--chat-dollar-text);
    background-color: var(--chat-dollar-bg);
    font-size: large;
}

.underText {
    color: var(--chat-under);
}

.ampText {
}

.plusText {
    color: var(--chat-plus);
}

.chatText {
    font-size: 15px;
    width: 100%;
    outline: none;
}
/*
.chatWindow::-webkit-resizer {
    //background-color: red;
} 
    */
.summaryScore {
    width: 60px;
    flex-direction: row;
    justify-content: center;
}
.lineTitle {
    text-align: center;
    width: 100%;
    color: var(--header-text);
    background-color: var(--header-bg);
}
    
.scorebox {
    display: flex;
}

.scorebox .side {
    flex: 1;
    padding: 2px 2px 2px 2px;
    background-color: var(--score-bg);
    color: var(--score-text);
}
.scorebox .scoreCol {
    flex-direction: row;
    padding: 2px 2px 2px 2px;
    background-color: var(--score-bg);
    color: var(--score-text);
}
    .scorebox .sideItem:nth-child(1) {
        border-bottom: 1px solid black;
    }
.chatMessage {
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (hover: hover) and (pointer: fine) {
    .chatBubbleEditable:hover .chatActionButton,
    .chatBubbleEditable:focus-within .chatActionButton {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .chatBubbleEditable:hover .chatActionButton:disabled,
    .chatBubbleEditable:focus-within .chatActionButton:disabled {
        opacity: 0.35;
    }
}

@media (hover: none), (pointer: coarse) {
    .chatBubbleActions {
        display: none;
    }
}

.setHeader {
  background-color: var(--header-bg);
  color: var(--header-accent);
  font-size: 12px;
  text-align: center;
  padding: 0 15px 0 15px;
}

.gameHeader {
    background-color: var(--header-bg);
    color: var(--header-accent);
    font-size: 12px;
    text-align: center;
}

.fa-dot-circle {
    font-size: 8px;
    text-align:center;
    vertical-align: middle;
    color: blue;
    padding: 0 3px 3px 0;
}

.scoreSummary {
    background-color: var(--secondary-bg);
    width: auto;
    margin-right: 15px;
}

.stickytop {
    display: flex;
    font-size: 14px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
}

.navtable {
    float: left;
    width: auto;
}

.summeries {
}
.matchSummary {
    flex:1;
}

.summary {
    flex: 1;
}

.iw-mIcon {
    padding: 5px 4px 0px 8px;
    display: block;
}
/*
.iw-cm-menu li {
    padding-left: 20px;
}

.iw-cm-menu {
    font: inherit;
}
    */
.red {
    color: var(--chat-important);
}

.slide-fade-enter-active {
    transition: all .3s ease;
}

.slide-fade-leave-active {
    transition: all .8s cubic-bezier(1.0, 0.5, 0.8, 1.0);
}

.slide-fade-enter, .slide-fade-leave-active, .slide-fade-leave-to {
    transform: translateX(10px);
    opacity: 0;
}


    .contextMenuItem {
    padding-left:10px;
    float: right;
}

/* Hack to fix the width of the game col */
.gameHeader div {
    width: 45px;
}

.lineStatusRow {
    font-weight: 700;
    font-size: 12px;
    position: relative;
}

.lineStatusDiv {
    padding: 1px 4px 2px 4px;
    height: 21px
}

.lineStatus {
    float: left;
}

.lineTime {
    left: 50%;
    text-align: center;
    position: absolute;
}

.lineServer {
    float: right;
    overflow: hidden;
}

.setWin {
    background-color: darkgray;
    color: cornsilk;
}

.setScoreInternal {
    height: 54px;
}

.scoringRow {
    height: 100%;
}

.setLose {
    background-color: darkgray;
    color: cornsilk;
    font-weight: 100;
}

@media all and (min-width: 801px) {
    /* CSS that should be displayed if width is equal to or less than 800px goes here */
    /* use default setting for table on computer screen */
}

@media all and (max-width: 800px) {
    /* CSS that should be displayed if width is equal to or less than 800px goes here */
    /* scale the table on smaller screens */
    table {
        width: 100%;
    }
}

.playerRow {
    background-color: var(--player-row-bg);
    font-size: 18pt;
    font-weight: 600;
    padding: 0px 5px 3px 5px;
    vertical-align: middle;
    width: 100%;
    color: var(--player-row-text);
}
.teamName {
    font-size: 12px;
    font-style: italic;
    padding-left: 1px;
    line-height: 1.3em;
}


.playerDiv {
    width: 100%;
    min-width: 0;
}

.playerDisplay {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    line-height: 1.25;
}

.playerNameGroup {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    flex: 0 1 auto;
    gap: 0;
}

.playerNameText {
    display: block;
    min-width: 0;
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doubles-separator {
    display: none;
    flex: 0 0 auto;
    padding: 0 4px;
}

.doublesPlayerDisplay {
    justify-content: flex-start;
    gap: 5px;
}

.viewOnlyPlayerDisplay .doubles-separator {
    display: inline-flex;
}


.longText {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 1px;
    line-height: .4em;
}

.playerInput {
    font-size: 20px;
    padding: 0 0px 0px 0px;
    box-sizing: border-box;
    width: 100%;
}

/* Sticky footer styles
-------------------------------------------------- */
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

p {
    margin: 0;
}

.border-top {
}

.border-bottom {
}

.box-shadow {
  box-shadow: var(--box-shadow);
}

.card {
    margin-bottom: 10px;
}

button.accept-policy {
  font-size: 1rem;
  line-height: inherit;
}

#matchid {
    width: 100px;
}

div.card {
    color: var(--card-text);
}

.display-4 {
    font-weight: 600;
}

.btn {
    background-color: var(--button-bg);
    border-color: var(--button-border);
    color: white !important;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
    position: relative;
    min-height: 100%;
    background: url("../img/tennis_court_dark.jpg") no-repeat center center fixed;
    background-color: var(--court-bg); /* incase background image doesn't appear */
    background-size: cover;
    color: var(--primary-text);
}

.lineHeader {
    background-color: var(--header-bg);
    color: var(--header-text);
    font-size: 14px;
    text-align: center;
}

body {
    margin: 0;
    background: var(--body-bg);
    color: var(--body-text);
    --signalr-status-bar-offset: 0px;
}

.layout-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.layout-page-container {
    flex: 1 0 auto;
    width: 100%;
    padding-top: 20px;
}

.layout-main {
    padding-top: 50px;
    padding-bottom: 0;
}
.footer {
  margin-top: auto;
  width: 100%;
  white-space: normal;
  padding: 12px 0 15px;
  line-height: 1.5;
  flex-shrink: 0;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px 16px;
}

.footer-primary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.footer-build-info {
    margin-left: auto;
    text-align: right;
}

@media (max-width: 767.98px) {
    .footer-build-info {
        margin-left: 0;
        text-align: left;
    }
}

.lineTable {
    margin-left: 0;
    margin-right: auto;
    margin-bottom: 5px;
    padding: 30px 5px 30px 5px;
    max-width: 700px;
    border: 1px solid slategrey;
}

table {
    border-spacing: 0;
    background-color: var(--table-bg);
}

.lineTable td {
    border: 1px solid var(--border-color);
}


.scoreValue {
    pointer-events: none;
}

.scoreSummary {
    
}

[v-cloak] {
    display: none !important;
}

.statusPlaying {
    background-color: var(--status-playing-bg);
    color: var(--status-playing-text);
}

.statusFinal {
    background-color: var(--status-final-bg);
    color: var(--status-final-text);
}

.statusAwaiting {
    background-color: var(--status-awaiting-bg);
    color: var(--status-awaiting-text);
}

.statusDelayedStart {
    background-color: var(--status-awaiting-bg);
    color: var(--status-awaiting-text);
}

.statusPostponed {
    background-color: var(--status-postponed-bg);
    color: var(--status-postponed-text);
}

.statusDelay {
    background-color: var(--status-awaiting-bg);
    color: var(--status-awaiting-text);
}

.statusCancelled {
    background-color: var(--status-cancelled-bg);
    color: var(--status-cancelled-text);
}

.statusRetire {
    background-color: var(--status-retire-bg);
    color: var(--status-retire-text);
}

.statusDoubleRetire {
    background-color: var(--status-retire-bg);
    color: var(--status-retire-text);
}

@media (max-width: 768px) {
    .chatAttachmentButton,
    .chatEmojiButton,
    .chatGifButton,
    .chatSettingsButton,
    .imageUploadButton,
    .sendBoxBtn {
        width: 35px;
        font-size: 16px;
    }

    .chatEmojiButton {
        font-size: 20px;
    }

    .chatGifButton {
        font-size: 12px;
    }

    .chat-emoji-picker {
        width: 272px;
    }

    .chat-gif-picker {
        width: 290px;
    }
    
    .chatText {
        font-size: 14px; /* Prevents zoom on iOS */
    }
    
    .chatMessage img {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* Serving information styling */
.servingRow {
    background-color: var(--serving-bg);
    color: var(--serving-text);
    padding: 8px 12px;
    border-top: 1px solid #ddd;
}

.servingInfo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.servingDisplay, .serveCountDisplay {
    display: flex;
    align-items: center;
    gap: 8px;
}

.servingLabel, .serveLabel {
    font-weight: 600;
    font-size: 14px;
    color: var(--serving-text);
    white-space: nowrap;
}

.serverButton, .serveButton {
    background: var(--serving-button-bg);
    color: var(--serving-button-text);
    border: 1px solid var(--serving-button-border);
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
    text-align: center;
}

.serverButton:hover, .serveButton:hover {
    background: var(--serving-button-hover-bg);
    border-color: #adb5bd;
}

.serverButton.active, .serveButton.active {
    background: var(--serving-button-active-bg);
    color: var(--serving-button-active-text);
    border-color: var(--serving-button-active-bg);
    box-shadow: var(--box-shadow-button-active);
}

.serverButton:focus, .serveButton:focus {
    outline: 2px solid #80bdff;
    outline-offset: 2px;
}

/* Mobile responsive adjustments for serving controls */
@media (max-width: 768px) {
    .servingInfo {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .servingDisplay, .serveCountDisplay {
        justify-content: center;
    }
    
    .serverButton, .serveButton {
        padding: 10px 16px;
        font-size: 14px;
        min-width: 80px;
    }
    
    .servingLabel, .serveLabel {
        font-size: 15px;
    }
}

/* Serving icons styling */
.serving-icons {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin-left: 0;
    gap: 2px;
    cursor: pointer;
}

.serving-icon {
    width: 24px;
    height: 24px;
    fill: var(--serving-icon-color); /* Green tennis color */
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

/* Silhouette style for non-serving state */
.serving-icon.silhouette {
    fill: var(--serving-icon-inactive);
    filter: none;
    opacity: 0.7;
}

.serving-icon:nth-child(2) {
    animation-delay: 0.2s; /* Slight delay for second serve icon */
}

/* Subtle bounce animation for serving icons */
@keyframes serveBounce {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-2px); }
}

/* Ensure icons are visible on different backgrounds */
.teamName .serving-icons {
    vertical-align: middle;
}

/* Styling for serving column header and cell */
.serving-header {
    background-color: var(--header-bg);
    color: var(--header-accent);
    font-size: 12px;
    text-align: center;
    width: 60px;
    padding: 0 8px;
}

.serving-cell {
    background-color: var(--score-bg);
    text-align: center;
    vertical-align: middle;
    width: 60px;
    padding: 4px;
    border: 1px solid var(--border-color);
}

/* Mobile adjustments for serving icons */
@media (max-width: 768px) {
    .serving-icon {
        width: 18px;
        height: 18px;
    }
    
    .serving-icons {
        margin-left: 0;
        gap: 4px;
    }
    
    .serving-header {
        width: 50px;
        font-size: 10px;
    }
    
    .serving-cell {
        width: 50px;
        padding: 2px;
    }
}


/* Tennis Scores slider styles (migrated from Scores.cshtml) */
.score-slider-viewport {
  position: relative;
  overflow: hidden;
  //margin-left: 1rem;
  //margin-right: 1rem;
}
@media (min-width: 992px) {
  .score-slider-viewport {
    //margin-left: 3rem;
    //margin-right: 3rem;
  }
}
.score-slider-track {
  display: flex;
  width: 100%;
  align-items: flex-start;
  transition: transform 300ms ease-in-out;
}
.score-slide {
  flex: 0 0 100%;
  max-width: 100%;
  position: relative;
  overflow-x: hidden;
  overflow-y: visible;
}
@media (min-width: 768px) {
  .score-slide {
    padding-left: 0;
    padding-right: 0;
  }
}
.slider-arrow {
  position: static;
  height: auto;
  /* removed min-height to ensure buttons don't exceed scorecard (.lineTable) height */
  border-radius: var(--border-radius-lg);
  background: var(--slider-arrow-bg); /* translucent grey */
  color: #fff;
  border: 2px solid var(--slider-arrow-border);
  box-shadow: var(--box-shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 150ms ease-in-out, transform 150ms ease-in-out;
  z-index: 2;
  font-weight: 700;
  font-size: 32px; /* larger arrow symbols */
  line-height: 1;
  padding: 0 12px;
}
.slider-arrow:hover {
  background: var(--slider-arrow-hover-bg);
  transform: translateY(-1px);
  box-shadow: var(--box-shadow-lg);
}
@media (hover: none) {
  .slider-arrow { display: none; }
}

.signalr-status-bar {
    background-color: var(--signalr-bar-bg); /* Grey background */
    color: var(--signalr-bar-text);
    font-size: 12px;
    padding: 4px 0;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 99;
    border-top: 1px solid var(--signalr-bar-border);
}

.has-signalr-status-bar .layout-main {
    padding-bottom: calc(var(--signalr-status-bar-offset) + 16px);
}

.has-signalr-status-bar .footer {
    margin-bottom: var(--signalr-status-bar-offset);
}

.connection-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: var(--border-radius-full);
    margin-right: 8px;
}

.connection-indicator.connected {
    background-color: var(--connection-connected); /* Green */
    animation: connection-indicator-pulse 1.2s ease-in-out infinite;
}

.connection-indicator.disconnected {
    background-color: var(--connection-disconnected); /* Red */
}

@keyframes connection-indicator-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.6;
    }
}

.connection-status-text {
    font-weight: 500;
}

.user-count-text {
    font-size: 11px;
    opacity: 0.9;
}

/* Adjust main content to account for status bar */
.container {
    /*margin-top: 30px;  Add space for the status bar */
}


/* Center scoreboard only on second slide */
.centered-scoreboard .lineTable {
  margin-left: auto;
  margin-right: auto;
}

/* Settings Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
}

.modal-overlay .modal-dialog {
    margin: 1.75rem auto;
    max-height: 90vh;
    overflow-y: auto;
}

.match-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin: 0.5rem 0 1rem;
}

.match-actions .btn {
    padding: 0.25rem 0.6rem;
    min-height: 32px;
}

.match-actions .btn,
.match-actions .btn:hover,
.match-actions .btn:focus,
.match-actions .btn:active,
.match-actions .btn:not(:disabled):not(.disabled):active {
    background-color: var(--button-bg);
    border-color: var(--button-border);
    color: #ffffff;
}

.scores-header-actions-slot,
.match-actions-mobile-header {
    display: none;
}

.match-action-icon-button {
    line-height: 1;
}

.match-action-icon-button i {
    margin: 0;
}

@media (max-width: 575.98px) {
    .scores-header-actions-slot {
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        justify-content: center;
        min-width: 0;
        margin: 0 0.5rem;
    }

    .match-actions-desktop {
        display: none;
    }

    .match-actions-mobile-header {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        gap: 0.35rem;
        margin: 0;
    }

    .match-actions-mobile-header .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2rem;
        min-width: 2rem;
        height: 2rem;
        min-height: 2rem;
        padding: 0;
        border-radius: 999px;
    }
}

.settings-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.settings-tab {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e5e7eb;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
}

.settings-tab.active {
    background: rgba(96, 165, 250, 0.2);
    border-color: #60a5fa;
    color: #ffffff;
}

.settings-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

.share-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem;
    border-radius: 4px;
}

.share-url-group {
    display: flex;
    width: 100%;
    flex-wrap: nowrap;
    align-items: stretch;
}

.share-url-group .form-control {
    flex: 1 1 auto;
    min-width: 0;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.share-url-group .btn {
    flex-shrink: 0;
    border-left: 0;
    border-radius: 0;
}

.share-url-group .btn:last-child {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

.share-actions {
    display: flex;
    gap: 0.5rem;
}

.share-toggle {
    margin-bottom: 0.5rem;
}

.settings-section {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-settings-option {
    margin-bottom: 0.85rem;
}

.chat-settings-option:last-child {
    margin-bottom: 0;
}

/* Season schedule table — compact on mobile */
@media (max-width: 575.98px) {
    .season-schedule-table {
        font-size: 0.72rem;
    }

    .season-schedule-table th,
    .season-schedule-table td {
        padding: 0.25rem 0.3rem;
        white-space: nowrap;
    }

    .season-schedule-table .badge {
        font-size: 0.6rem;
        padding: 0.15em 0.35em;
    }
}
