/* ========================================
   KOI CUSTOM THEME
   ======================================== */

   :root {
    --koi-primary: rgb(55, 155, 254);
    --koi-dark: rgb(23, 23, 23);
    --koi-gray: rgb(55, 55, 55);
    --koi-orange: rgb(255, 106, 0);
}

/* Text colors */
.text-koi { 
    color: rgb(55, 155, 254) !important; 
}
.text-koi-dark { 
    color: rgb(23, 23, 23) !important; 
}
.text-koi-gray { 
    color: rgb(55, 55, 55) !important; 
}

/* Background colors */
.bg-koi { background-color: var(--koi-primary) !important; }
.bg-koi-dark { background-color: var(--koi-dark) !important; }


/* ================================
   Buttons
   ================================ */
.btn-koi {
    background-color: var(--koi-primary);
    border-color: var(--koi-primary);
    color: white;
}

.btn-koi:hover {
    background-color: rgb(45, 135, 224);
    border-color: rgb(45, 135, 224);
}
.button{
    color: #f98900ff;
    border: 1px solid #f98900ff;
    background-color: transparent;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.button:hover{
    background-color: rgba(91, 49, 28, 1);
    border: transparent;
}

.button i {
    color: #f98900ff;
}

.button:hover i {
    color: #fff;
}

.viewer-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border: none;
    border-radius: 9999px;
    background-color: #272727;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
}

.viewer-button:hover {
    background-color: #3a3a3a;
    color: #fff;
}

.viewer-button:focus-visible {
    outline: 2px solid rgb(55, 155, 254);
    outline-offset: 2px;
}

.viewer-button:disabled,
.viewer-button.viewer-button--disabled {
    opacity: 1;
    cursor: not-allowed;
    pointer-events: auto;
    background-color: #2a2a2a;
    color: #6a6a6a;
}

.viewer-button:disabled:hover,
.viewer-button.viewer-button--disabled:hover {
    background-color: #2a2a2a;
    color: #6a6a6a;
}

.viewer-button:disabled i,
.viewer-button.viewer-button--disabled i,
.viewer-button:disabled svg,
.viewer-button.viewer-button--disabled svg {
    color: #6a6a6a;
    fill: #6a6a6a;
}

.viewer-button .viewer-button-label {
    white-space: nowrap;
}

.voice-command-btn {
    color: rgb(255, 255, 255);
    border: 1px solid rgb(255, 255, 255);
    background-color: rgb(64, 64, 64);
}

.voice-command-btn:hover {
    background-color: rgb(40, 40, 40);
    border: 1px solid rgba(255, 255, 255, 0.55);
    color: rgb(255, 255, 255);
}


.wrapper {
    display: flex;
    flex-direction: column;
}

.feature-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 0.75rem;
}
/* classes for analytics chart */
/* Overall Dashboard Container */
.analytics-dashboard {
    font-family: Arial, sans-serif;
    padding: 10px;
    /* border: 1px solid #ddd; */
    border-radius: 8px;
    background-color: transparent;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Tab Navigation Styling */
.analytics-tabs {
    display: flex; /* Makes tabs line up horizontally */
    border-bottom: 1px solid #fefefeff;
    background-color: transparent;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.tab-button {
    flex: 1; /* Distribute space equally */
    padding: 15px 20px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #929191ff;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-align: center; /* Center the text in each tab */
}

.tab-button:hover {
    background-color: #9e9e9eff;
    color: #333;
}

.tab-button.active {
    background-color: #4c4b4bff;
    color: orange; /* Highlight active tab */
    border-bottom: 3px solid rgba(73, 84, 96, 0.48); /* Stronger indicator for active tab */
    padding-bottom: 12px; /* Adjust padding to offset the border */
}

/* Chart Container Styling */
.chart-container {
    padding: 20px;
    background-color: #fff;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    min-height: 400px; /* Ensure some minimum height for the chart area */
    display: flex; /* Use flexbox to manage child chart placeholders */
    justify-content: center; /* Center the chart placeholder */
    align-items: center; /* Vertically center */
}

.chart-placeholder {
    display: none; /* Hide all charts by default */
    text-align: center;
    color: #666;
    width: 100%; /* Make placeholder fill container */
}

.chart-placeholder.active-chart {
    display: block; /* Show only the active chart */
}

.chart-placeholder h3 {
    margin-top: 0;
    color: #333;
}

.chart-placeholder img {
    max-width: 100%;
    height: auto;
    border: 1px dashed #ccc;
    border-radius: 5px;
    margin-top: 15px;
}


/* ================================
   Hamburger Menu & Mobile Sidebar
   ================================ */

/* Hamburger menu button */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: var(--header-height);
    right: 10px;
    margin: 10px 0;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    width: fit-content;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.sidebar-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: rgb(55, 155, 254);
    border-radius: 2px;
    transition: all 0.3s;
}

.sidebar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.sidebar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.sidebar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Responsive — mobile: icon rail (aligned with hamburger-menu.css) */
@media (max-width: 767.98px) {
    .sidebar-toggle {
        display: none !important;
    }

    .sidebar-overlay,
    .sidebar-overlay.active {
        display: none !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .dashboard-container {
        flex-direction: row;
        align-items: stretch;
        min-width: 0;
    }

    .dashboard-container #sidebar-container {
        flex-shrink: 0;
    }

    .dashboard-container .sidebar {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        width: 56px !important;
        min-width: 56px !important;
        max-width: 56px !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        margin-right: 8px !important;
        padding: 8px 0 !important;
        border-radius: 10px !important;
        z-index: 1 !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        align-self: flex-start !important;
    }

    .dashboard-container .sidebar.active {
        transform: none !important;
    }

    .dashboard-container .sidebar .nav-menu {
        padding: 0 6px;
    }

    .dashboard-container .sidebar .nav-link {
        position: relative;
        justify-content: center;
        padding: 10px 6px;
        min-height: 44px;
        box-sizing: border-box;
    }

    .dashboard-container .sidebar .nav-link .nav-icon {
        margin-right: 0;
        flex-shrink: 0;
        color: rgba(255, 255, 255, 0.78);
    }

    .dashboard-container .sidebar .nav-link:hover .nav-icon,
    .dashboard-container .sidebar .nav-link:focus-visible .nav-icon {
        color: #fff;
    }

    .dashboard-container .sidebar .nav-link.active .nav-icon {
        color: rgb(55, 155, 254);
    }

    .dashboard-container .sidebar .nav-link-text {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .dashboard-container .sidebar .sidebar-section-break {
        margin-left: 8px;
        margin-right: 8px;
        margin-top: 4px;
        margin-bottom: 4px;
    }

    .dashboard-container .main-content {
        width: auto !important;
        flex: 1 1 0%;
        min-width: 0;
    }
}

/* ── Community: comments grouped by channel → video → comments ───────────── */
.community-channel-block {
    border: 1px solid var(--bs-border-color-translucent, rgba(255, 255, 255, 0.12));
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    background: var(--bs-body-bg, #16181c);
}

.community-channel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--bs-border-color-translucent, rgba(255, 255, 255, 0.1));
}

.community-channel-videos {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.community-video-block {
    border: 1px solid var(--bs-border-color-translucent, rgba(255, 255, 255, 0.08));
    border-radius: 10px;
    overflow: hidden;
}

.community-video-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
}

.community-video-open {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
    cursor: pointer;
}

.community-video-open:hover .community-video-title,
.community-video-open:focus-visible .community-video-title {
    color: var(--bs-primary);
}

.community-video-open:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
    border-radius: 6px;
}

.community-video-title {
    font-weight: 600;
    min-width: 0;
    overflow-wrap: anywhere;
}

.community-video-count {
    margin-left: auto;
    flex-shrink: 0;
}

.community-video-comments {
    padding: 4px 12px;
}

.community-comment-row {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--bs-border-color-translucent, rgba(255, 255, 255, 0.06));
}

.community-video-comments .community-comment-row:first-child {
    border-top: 0;
}

.community-comment-main {
    /* Keep the comment text readable: the main block never shrinks below a
       sensible width (or the full row when it's narrower than that), which
       forces the action buttons to wrap onto their own line rather than
       squeezing/overlapping the comment details. */
    min-width: min(240px, 100%);
    flex: 1 1 auto;
}

.community-comment-meta {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.community-reply-context {
    margin: 2px 0;
    overflow-wrap: anywhere;
}

.community-comment-body {
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: pre-wrap;
    max-height: 8em;
    overflow-y: auto;
}

.community-comment-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
    align-items: flex-start;
    /* Stay pinned to the right inline, and when the row wraps this block drops
       onto its own line (right-aligned) beneath the comment details. Allow the
       block to shrink to the row width (min-width:0) so its buttons wrap onto a
       new line instead of overflowing/clipping the last button (e.g. Delete) on
       narrow/mobile screens. */
    margin-left: auto;
    min-width: 0;
    max-width: 100%;
}

.community-comment-row.is-pinned {
    background: rgba(255, 196, 120, 0.06);
    border-radius: 0.5rem;
    margin: 0 -0.35rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

.community-comment-row.is-hidden {
    opacity: 0.72;
}

.community-comment-row.is-hidden .community-comment-body {
    color: var(--bs-secondary-color, rgba(255, 255, 255, 0.55));
}

.community-pinned-badge,
.community-hidden-badge {
    font-weight: 600;
}

.community-avatar-fallback {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}
