@font-face {
    font-family: 'Inter Tight Regular';
    src: url('/assets/fonts/InterTight-Regular.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter Tight Medium';
    src: url('/assets/fonts/InterTight-Medium.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter Tight Light';
    src: url('/assets/fonts/InterTight-Light.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

html {
    font-size: 16px; /* Sets the base for rem */
}

p {
    font-size: 1rem; /* 16px */
    line-height: 1.6;
}

li {
    font-size: 1rem; /* 16px */
}

.text-muted {
    font-size: 0.875rem; /* 14px */
}

.card.custom-card .card-text {
    font-size: 0.9rem !important;
}

a, .btn-link {
    color: #0071c1;
}

.info-container {
    position: relative;
    top: -50px;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.tooltip-container {
    z-index:1000
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.rz-dropdown-items-wrapper {
    max-height: 500px !important;
    overflow-y: scroll !important;
}

.rz-dropdown-item {
    color: black !important;
}

.tox-statusbar__branding {
    display: none;
}

/* Only apply scroll to the inner items wrapper */
.rz-dropdown-items-wrapper {
    max-height: 300px !important;
    overflow-y: auto !important;
    scrollbar-width: thin;
    scrollbar-color: #999 #eee;
}

    /* Webkit scrollbar styling */
    .rz-dropdown-items-wrapper::-webkit-scrollbar {
        width: 6px;
    }

    .rz-dropdown-items-wrapper::-webkit-scrollbar-thumb {
        background-color: #aaa;
        border-radius: 4px;
    }

    .rz-dropdown-items-wrapper::-webkit-scrollbar-track {
        background: #f0f0f0;
    }

    /* Optional: scroll shadow/fade */
    .rz-dropdown-items-wrapper::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        height: 30px;
        width: 100%;
        background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.95) 80%);
        pointer-events: none;
    }

/* Tighter spacing between items */
.rz-dropdown-item {
    padding: 4px 8px !important;
    line-height: 1.2 !important;
    font-size: 0.9rem;
}

.error-highlight {
    color: red;
    font-weight: bold;
    background-color: #ffe6e6;
    padding: 8px;
    border-radius: 4px;
}

/* Light mode (default) */
[data-theme-mode="light"] .rz-card {
    color: #212529;
}

/* Dark mode override */
[data-theme-mode="dark"] .rz-card, 
[data-theme-mode="dark"] .form-control {
    background-color: var(--gray-100) !important;
    color: #f8f9fa !important;
}

[data-theme-mode="dark"] .ticket-message-support,
[data-theme-mode="dark"] .ticket-message-card {
    background-color: #172f48;
}

/* Dark mode global text default */
[data-theme-mode="dark"] {
    color: #b7b7b7;
}

    [data-theme-mode="dark"] .dropdown-menu .dropdown-item,
    [data-theme-mode="dark"] .nav-tabs-header .nav-item .nav-link,
    [data-theme-mode="dark"] .form-check-label,
    [data-theme-mode="dark"] .btn-outline-primary,
    [data-theme-mode="dark"] .card-title,
    [data-theme-mode="dark"] .nav-tabs,
    [data-theme-mode="dark"] .ticket-message-body,
    [data-theme-mode="dark"] .ticket-message-author-name,
    [data-theme-mode="dark"] .modal-body,
    [data-theme-mode="dark"] .me-3,
    [data-theme-mode="dark"] .col-6 {
        color: #b7b7b7 !important;
    }

[data-theme-mode="dark"] .card.custom-card {
    background-color: #fdfdfd;
}

[data-theme-mode="dark"] :is(h1, h2, h3, h4, h5, h6, strong) {
    color: #b7b7b7 !important;
}

    .page-layout {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

.content-wrapper {
    display: flex;
    flex: 1;
    min-height: 0;
}

.sidebar {
    width: 230px;
    min-width: 230px;
    max-width: 230px;
    background-color: rgb(var(--sidebar-bg, 5, 39, 103));
    color: rgb(var(--sidebar-link-color, 163, 174, 209));
    padding: 4.5rem 0.5rem;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 300;
}

    .sidebar.collapsed {
        width: 74px !important;
        min-width: 74px !important;
        max-width: 74px !important;
        overflow: hidden;
        transition: width 0.3s ease;
    }

    .sidebar .nav-link {
        display: block;
        color: rgb(var(--sidebar-link-color, 163, 174, 209));
        padding: 10px 14px;
        font-family: "Montserrat", sans-serif;
        font-weight: 500;
        margin: 4px 0;
        border-radius: 6px;
        transition: background-color 0.2s, color 0.2s;
        text-decoration: none;
    }

        .sidebar .nav-link:hover {
            background-color: #1f2b5a;
            color: #ffffff;
        }

        .sidebar .nav-link.active {
            background-color: #0d6efd;
            color: #ffffff !important;
            font-weight: 700;
        }

    .sidebar .badge {
        background-color: #0d6efd;
        color: white;
        font-size: 0.75rem;
        padding: 2px 6px;
        border-radius: 12px;
        float: right;
        margin-top: 2px;
    }

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    overflow-x: hidden;
}

/* Animate rotation */
.collapse-icon {
    transition: transform 0.3s ease;
    font-size: 1.5rem;
}

accordion-body {
    font-size: 14px;
}

/* Rotate when sidebar is collapsed */
.sidebar-collapsed .collapse-icon {
    transform: rotate(90deg);
}

.header-content-left {
    display: flex;
    align-items: center;
}

.sidebar-logo {
    margin-top: -64px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sidebar-collapsed .sidebar-logo img {
    width: 32px;
}

.sidebar .category-name {
    color: #5affb4;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.065rem;
    text-transform: uppercase;
    padding: 0.75rem 1.65rem;
    white-space: nowrap;
    opacity: 0.5;
}

.app-header {
    padding-left: 230px;
    transition: height 0.2s ease-in-out;
    background-color: rgb(var(--main-header-bg, 255, 255, 255)); 
}

/* Branding header image: scale to 90px tall, centered, no repeat */
.app-header {
    background-repeat: no-repeat;
    background-position: center;
    background-size: auto 90px; /* width auto, height 90px */
}

    /* Ensure the header itself is tall enough to show the image */
    .app-header.branding-enabled {
        height: 90px !important; /* was 4.7rem */
    }

    /* Header link color (controlled by Branding -> Header Link Color) */
    .app-header a,
    .app-header .nav-link {
        color: rgb(var(--header-link-color, 0, 113, 193)) !important;
    }

        .app-header a:hover,
        .app-header .nav-link:hover {
            filter: brightness(1.1);
        }

[data-theme-mode="dark"] .app-header {
    background-color: rgb(var(--header-bg, 30, 30, 30));
}

/* Push main content down only when the branding header is active */
.app-header.branding-enabled + .content-wrapper .main-content,
.page-layout:has(.app-header.branding-enabled) .main-content {
    margin-block-start: 7rem !important;
}

/* Default sidebar color (light mode or no data-theme-mode) */
.sidebar {
    background-color: rgb(var(--sidebar-bg, 5, 39, 103));
}

/* Dark mode overrides with black fallback */
[data-theme-mode="dark"] .sidebar {
    background-color: rgb(var(--sidebar-bg, 0, 0, 0));
}

.sidebar-collapsed .app-header {
    padding-left: 74px !important;
}

.ops-logo {
    max-height: 120px;
    transition: width 0.3s ease;
}

.sidebar-collapsed .ops-logo {
    width: 58px !important;
    margin-top: 7px;
}

.mobile-toggle {
    margin-left: 0.75rem;
    padding-left: 0;
}

.sub-menu {
    display: block;
    padding-left: 1rem;
    margin-top: 0.25rem;
}

    .sub-menu li {
        margin-bottom: 0.25rem;
    }

.highlighted-message {
    background-color: yellow;
    transition: background-color 1s ease;
}

.footer-ad {
    padding:24px;
}

img[src^="/images/players/"] {
    max-width: 70px;
}

[data-theme-mode='dark'] .text-muted {
    color: #999999 !important;
}

[data-theme-mode='dark'] .rz-dialog-content {
    background-color: #2b2b2b;
    color: white;
}

.screenshot-image {
    max-width:450px !important;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -230px;
        top: 0;
        height: 100%;
        z-index: 1050;
        transition: left 0.3s ease;
    }

    .page.mobile-sidebar-open .sidebar {
        left: 0;
    }

    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }
}

@media (max-width: 991.98px) {
    .ops-logo {
        width: 50px;
    }
}

/* Hide Blazor Server reconnect modal */
#components-reconnect-modal,
#components-reconnect-modal .components-reconnect-show,
#components-reconnect-modal .components-reconnect-failed,
#components-reconnect-modal .components-reconnect-rejected {
    display: none !important;
}

/* Make sure custom modals always sit above pool icons/graphics */
.custom-modal-overlay {
    background-color: rgba(0,0,0,0.5);
    z-index: 1050; /* same as Bootstrap modal */
    position: fixed; /* cover entire viewport */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* optional if you use Bootstrap's modal classes directly */
.modal {
    z-index: 1050;
}

.modal-dialog {
    z-index: 1060;
}

.modal-backdrop {
    z-index: 1040;
}

:root {
    --ops-content-text: #111;
    --ops-content-heading: #0b0b0b;
    --ops-content-muted: rgba(0,0,0,.75);
}

.page.branding-enabled .main-content p,
.page.branding-enabled .main-content li,
.page.branding-enabled .main-content strong,
.page.branding-enabled .main-content b,
.page.branding-enabled .main-content .text-muted {
    color: var(--ops-content-text);
}

.page.branding-enabled .main-content h1,
.page.branding-enabled .main-content h2,
.page.branding-enabled .main-content h3,
.page.branding-enabled .main-content h4,
.page.branding-enabled .main-content h5 {
    color: var(--ops-content-heading);
}

.page.branding-enabled .main-content .alert {
    color: var(--ops-alert-text);
    background: var(--ops-alert-bg);
    border: 1px solid var(--ops-alert-border);
}

    .page.branding-enabled .main-content .alert a {
        color: inherit;
        text-decoration: underline;
    }

:root {
    --ops-success: #198754;
}

.page.branding-enabled .main-content .text-success {
    color: var(--ops-success) !important;
}

/* ===========================
   RadzenHtmlEditor (Quill)
   Force readable editor text/background even with Branding
   (must be AFTER .main-content p/li/etc rules)
   =========================== */

.main-content .rz-html-editor,
.main-content .rz-html-editor .ql-container,
.main-content .rz-html-editor .ql-editor,
.main-content .rz-html-editor-content {
    background-color: #fff !important;
}

    /* Quill types inside <p>, <span>, etc — override your .main-content p rule */
    .main-content .rz-html-editor .ql-editor,
    .main-content .rz-html-editor .ql-editor *,
    .main-content .rz-html-editor-content,
    .main-content .rz-html-editor-content * {
        color: #212529 !important;
    }

        /* Placeholder */
        .main-content .rz-html-editor .ql-editor.ql-blank::before,
        .main-content .rz-html-editor-content.ql-blank::before {
            color: rgba(33, 37, 41, 0.55) !important;
        }

        /* Links inside editor */
        .main-content .rz-html-editor .ql-editor a,
        .main-content .rz-html-editor-content a {
            color: #0d6efd !important;
        }

.ops-img-resize-box {
    position: absolute;
    border: 2px solid #0d6efd;
    box-sizing: border-box;
    z-index: 9999;
    pointer-events: none;
}

.ops-img-resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid #0d6efd;
    background: #fff;
    box-sizing: border-box;
    z-index: 10000;
    pointer-events: auto;
}

    .ops-img-resize-handle.br {
        cursor: nwse-resize;
    }

    .ops-img-resize-handle.bl {
        cursor: nesw-resize;
    }

    .ops-img-resize-handle.tr {
        cursor: nesw-resize;
    }

    .ops-img-resize-handle.tl {
        cursor: nwse-resize;
    }

.ops-img-toolbar {
    position: absolute;
    z-index: 10001;
    background: #fff;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
    padding: 6px;
    display: flex;
    gap: 6px;
    align-items: center;
    pointer-events: auto;
    user-select: none;
}

    .ops-img-toolbar button {
        border: 1px solid rgba(0,0,0,.2);
        background: #f8f9fa;
        border-radius: 6px;
        padding: 4px 8px;
        line-height: 1;
        cursor: pointer;
    }

        .ops-img-toolbar button:hover {
            background: #e9ecef;
        }

    .ops-img-toolbar input[type="number"] {
        border: 1px solid rgba(0,0,0,.2);
        border-radius: 6px;
        padding: 3px 6px;
    }

.ops-img-toolbar-sep {
    width: 1px;
    height: 22px;
    background: rgba(0,0,0,.15);
    margin: 0 4px;
}

.ops-img-resize-handle {
    touch-action: none; /* critical for pointer events */
}

/* default profile name color (non-branded leagues) */
.profile-name {
    color: inherit !important;
}

/* when branding is enabled, tint the semibold name */
.app-header.branding-enabled ~ .content-wrapper .profile-name,
.page-layout:has(.app-header.branding-enabled) .profile-name {
    color: var(--ops-success, rgb(var(--bs-success-rgb))) !important;
}

@media print {
    .no-print {
        display: none !important;
    }
}