/* ============================================================
   CUSTOM STYLES - Mumble Server Manager
   Combines Logoth-red classic design with Bootstrap 5
   ============================================================ */

/* ============================================================
   BOOTSTRAP OVERRIDES
   ============================================================ */

/* Force Bootstrap container to 960px to match Logoth-red original */
.container {
    max-width: 960px !important;
}

/* ============================================================
   BASE STYLES
   ============================================================ */

* {
    margin: 0;
    padding: 0;
}

html, body {
    font-family: 'Helvetica neue', Lucida Grande, Helvetica, sans-serif;
    font-size: 14px;
    background: var(--light-bg);
}

body {
    min-height: 100vh;
}

h1:focus {
    outline: none;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-medium);
}

h2, h3, h4 {
    color: var(--text-medium);

}
h3 {
    margin: 1em 0;
}

p {
    color: var(--text-light);
    line-height: 20px;
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */

header {
    overflow: visible;
}

header #top-menu {
    background: var(--primary-dark);
    border-bottom: 1px solid var(--color-red-light);
    position: fixed;
    z-index: 1000;
    opacity: 0.97;
    width: 100%;
    height: 54px;
}

header #top-menu > .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

header h1,
header .site-logo {
    margin: 0 0 0 5px;
}

header h1 a,
header .site-logo a {
    color: var(--light-bg);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 1px;
    text-decoration: none;
    line-height: 54px;
    display: block;
}

header h1 a:hover,
header .site-logo a:hover {
    text-decoration: none;
    color: var(--color-white);
}

header h1 .logo-red,
header .site-logo .logo-red {
    color: var(--light-bg);
    font-weight: 300;
}

header h1 .logo-bracket,
header .site-logo .logo-bracket {
    color: var(--color-red-border);
    font-weight: 300;
}

header #top-menu nav {
    font-size: 0;
}

header #top-menu nav ul {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

header #top-menu nav li {
    display: inline;
}

header #top-menu nav a {
    text-transform: uppercase;
    text-decoration: none;
    font-weight: bold;
    color: var(--light-bg);
    font-size: 12px;
    padding: 0 18px;
    line-height: 54px;
}

header #top-menu nav a:hover {
    color: var(--accent-red);
}

/* Nav Toggle (hamburger) - hidden on desktop */
header #top-menu nav .nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 14px 12px;
    flex-direction: column;
    gap: 4px;
}

header #top-menu nav .nav-toggle-icon {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--light-bg);
    border-radius: 1px;
}

@media (max-width: 767px) {
    header #top-menu {
        height: auto;
        min-height: 54px;
    }

    header #top-menu nav .nav-toggle {
        display: flex;
    }

    header #top-menu nav ul {
        display: none;
        width: 100%;
        clear: both;
        padding: 0 0 8px;
    }

    header #top-menu nav ul.nav-open {
        display: block;
    }

    header #top-menu nav li {
        display: block;
    }

    header #top-menu nav a {
        display: block;
        padding: 10px 20px;
        font-size: 12px;
    }
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */

#main-content {
    padding-top: 54px;
    background: var(--light-bg);
    min-height: calc(100vh - 154px);
}

/* Billboard / Hero Section */
#billboard {
    background: var(--primary-red);
    min-height: 340px;
    padding: 0 0 20px;
}

/* Info-Top / Page Header Section */
#main-content #info-top {
    background: var(--primary-red);
    height: 120px;
}

#main-content #info-top h1 {
    color: var(--primary-dark);
    text-shadow: 0 1px 1px #cb585c;
    letter-spacing: -1px;
    font-size: 28px;
    font-weight: normal;
    padding-left: 30px;
    padding-top: 19px;
    text-transform: uppercase;
    line-height: normal;
    font-weight: bold;
}

#main-content #info-top h1:before {
    content: "> ";
    font-weight: bold;
    color: var(--primary-dark);
}

#billboard .row {
    align-items: center;
}

#billboard .content {
    padding: 70px 50px 20px 20px;
}

#billboard .content h1 {
    margin: 0;
    color: var(--primary-dark);
    text-shadow: 0 1px 1px var(--accent-red);
    letter-spacing: -1px;
    font-size: 28px;
    font-weight: 700;
    line-height: normal;
}

#billboard .content p {
    color: var(--light-bg);
    padding: 0 0 0 20px;
    margin: 14px 0;
}

#billboard .content a {
    background: var(--primary-dark);
    color: var(--light-bg);
    border: 1px solid #c54549;
    text-decoration: none;
    padding: 18px 36px;
    border-radius: 40px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    display: inline-block;
}

#billboard .content a:hover {
    background: var(--accent-green);
    color: var(--primary-dark);
}

#billboard .content a:after {
    content: " »";
}

#billboard img {
    padding: 20px 20px 20px 10px;
    max-width: 100%;
}

/* ============================================================
   CONTENT BOXES
   ============================================================ */

.left-column {
    margin-top: -24px;
}

.content-box,
.left-column .content {
    background: white;
    border-radius: 18px;
    box-shadow: 0px 0px 18px rgba(0, 0, 0, 0.10);
    padding: 6px 14px;
    margin-bottom: 16px;
}

.content-box h2,
.left-column .content h2 {
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: -1px;
    font-size: 21px;
    font-weight: 700;
    line-height: normal;
    margin: 17px 0;
}

.content-box h3,
.left-column .content h3 {
    color: var(--text-light);
    letter-spacing: -1px;
    font-size: 16.38px;
    font-weight: 700;
}

.content-box p,
.left-column .content p {
    color: var(--color-gray-light);
}

.content-box a,
.left-column .content a {
    color: var(--accent-red);
    text-decoration: none;
    font-weight: bold;
}

.content-box a:hover,
.left-column .content a:hover {
    color: var(--primary-red);
}

.content-box .line-separator,
.left-column .content .line-separator {
    height: 2px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1em;
}

.content-box .highlight,
.left-column .content .highlight {
    color: var(--accent-red);
}

.content-box ol,
.left-column .content ol {
    font-size: 18px;
    font-weight: bold;
    color: var(--color-gray-light);
    line-height: normal;
}

/* ============================================================
   RIGHT SIDEBAR
   ============================================================ */

.right-column {
    background: transparent;
}

.right-column h3 {
    text-transform: uppercase;
    color: var(--text-light);
    font-size: 16.38px;
    font-weight: 700;
}

.right-column h4 {
    text-transform: uppercase;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 700;
}

.right-column a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: bold;
}

.right-column a:hover {
    color: var(--primary-red);
}

.right-column .line-separator {
    height: 2px;
    border-bottom: 2px solid var(--text-lighter);
    margin-bottom: 1em;
}

/* Capacity Slider */
.current-capacity-wrapper {
    padding-bottom: 25px;
    clear: both;
}

.current-capacity-wrapper .numbers {
    float: left;
    padding: 0 8px;
    font-size: 14px;
    font-weight: bold;
    color: var(--text-medium);
}

.current-capacity-wrapper #current-capacity-slider {
    width: 220px;
    position: relative;
    height: 16px;
    border: 1px solid var(--text-lighter);
    float: left;
}

.current-capacity-wrapper .ui-slider-range {
    background: var(--accent-green);
    position: absolute;
    border: 0;
    top: 0px;
    height: 16px;
    left: 0;
}

/* News Accordion */
#latest-news-accordion h4 {
    outline: none;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--text-lighter);
    margin-bottom: 1em;
}

#latest-news-accordion h4:after {
    content: " +";
    float: right;
}

#latest-news-accordion h4:hover {
    color: var(--primary-red) !important;
    cursor: pointer;
}

#latest-news-accordion .date {
    font-size: 11px;
    color: var(--color-gray-light);
}

#latest-news-accordion .news {
    padding-bottom: 10px;
    border-bottom: 2px solid var(--text-lighter);
    margin-bottom: 1em;
    color: var(--color-gray-light) !important;
}

/* ============================================================
   FOOTER
   ============================================================ */

footer #footer {
    height: 100px;
    margin: -16px 0 0 40px;
    text-align: left;
}

footer #footer p {
    color: #999;
    margin: 0;
    padding-top: 40px;
}

footer #footer a {
    color: #999;
    text-decoration: none;
}

footer #footer a:hover {
    color: var(--primary-red);
}

/* ============================================================
   BOOTSTRAP COMPONENT OVERRIDES
   ============================================================ */

/* Cards */
.card {
    border-radius: 18px;
    box-shadow: 0px 0px 18px rgba(0, 0, 0, 0.10);
    border: none;
}

.card-body {
    color: var(--text-light);
}

/* Buttons */
.btn-primary {
    background: var(--primary-dark);
    border-color: #c54549;
}

.btn-primary:hover {
    background: var(--accent-green);
    color: var(--primary-dark);
    border-color: var(--accent-green);
}

/* Badges */
.badge {
    font-weight: bold;
}

/* Alerts */
.alert {
    border-radius: 12px;
}

/* ============================================================
   UTILITIES
   ============================================================ */

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.text-muted {
    color: var(--text-light) !important;
}

/* Refresh controls styling */
.refresh-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Stat cards for admin dashboard */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    min-height: 120px;
}

.stat-card h2 {
    color: var(--primary-red);
    font-size: 2.5rem;
    margin: 0.5rem 0;
}

.stat-card h6 {
    color: var(--text-medium);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-card small {
    color: var(--text-lighter);
    font-size: 0.85rem;
}

.stat-card i {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 2rem;
    color: rgba(0, 0, 0, 0.05);
}

/* ============================================================
   BLAZOR RECONNECTION OVERLAY
   ============================================================ */

#components-reconnect-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: rgba(40, 40, 40, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
}

#components-reconnect-modal.components-reconnect-hide {
    display: none;
}

.components-reconnect-card {
    text-align: center;
    color: var(--color-white);
    font-family: var(--font-family);
    padding: 2rem;
}

.components-reconnect-card h5 {
    margin-top: 1.25rem;
    font-size: var(--font-size-large);
    color: var(--color-white);
}

.components-reconnect-card p {
    margin-top: 0.5rem;
    color: var(--color-gray-lighter);
    font-size: var(--font-size-base);
}

/* Pulsing dots animation */
.components-rejoining-animation {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.components-rejoining-animation div {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-primary-red);
    animation: rejoining-pulse 1.2s ease-in-out infinite;
}

.components-rejoining-animation div:nth-child(2) {
    animation-delay: 0.2s;
}

.components-rejoining-animation div:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes rejoining-pulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* Failed/rejected states */
#components-reconnect-modal.components-reconnect-failed .components-reconnect-card h5,
#components-reconnect-modal.components-reconnect-rejected .components-reconnect-card h5 {
    color: var(--accent-red);
}

#components-reconnect-modal.components-reconnect-failed .components-rejoining-animation div,
#components-reconnect-modal.components-reconnect-rejected .components-rejoining-animation div {
    background: var(--accent-red);
    animation: none;
    opacity: 1;
}

/* ============================================================
   INTERACTIVE STATES - RED GLOW THEME
   ============================================================ */

/* Hover States - Slight Red Glow */
.btn:hover,
.badge:hover,
a:hover {
    filter: drop-shadow(0 0 4px rgba(173, 26, 26, 0.3));
    transition: filter 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Button Interactive States */
.btn-primary {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(173, 26, 26, 0.4);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(173, 26, 26, 0.3);
}

.btn-primary:focus,
.btn-primary:focus-visible {
    outline: 3px solid var(--accent-red);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(173, 26, 26, 0.2);
}

.btn-secondary {
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--text-light);
    border-color: var(--accent-red);
    box-shadow: 0 2px 8px rgba(173, 26, 26, 0.2);
}

.btn-secondary:focus,
.btn-secondary:focus-visible {
    outline: 2px solid var(--accent-red);
    outline-offset: 2px;
}

/* Form Input Interactive States */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
textarea,
select {
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

input[type="text"]:hover,
input[type="password"]:hover,
input[type="email"]:hover,
input[type="number"]:hover,
textarea:hover,
select:hover {
    border-color: var(--accent-red);
    box-shadow: 0 0 8px rgba(173, 26, 26, 0.1);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: var(--accent-red);
    outline: none;
    box-shadow: 0 0 0 3px rgba(173, 26, 26, 0.15),
                0 2px 8px rgba(173, 26, 26, 0.1);
    position: relative;
}

/* Red underline focus effect */
input[type="text"]:focus::after,
input[type="password"]:focus::after,
input[type="email"]:focus::after,
input[type="number"]:focus::after,
textarea:focus::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-red);
    animation: expandUnderline 0.3s ease;
}

@keyframes expandUnderline {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* Active/Focus States - Stronger Red Outline */
.card:focus-within {
    box-shadow: 0 0 0 3px rgba(173, 26, 26, 0.2),
                0px 4px 18px rgba(173, 26, 26, 0.15);
    transition: box-shadow 0.3s ease;
}

/* Disabled States - Red-tinted Grayscale */
.btn:disabled,
.btn.disabled,
input:disabled,
textarea:disabled,
select:disabled {
    opacity: 0.4;
    filter: grayscale(0.8) sepia(0.2) hue-rotate(-10deg);
    cursor: not-allowed;
    box-shadow: none;
}

.btn:disabled:hover,
input:disabled:hover,
textarea:disabled:hover,
select:disabled:hover {
    transform: none;
    filter: grayscale(0.8) sepia(0.2) hue-rotate(-10deg);
    box-shadow: none;
}

/* Loading States - Red Progress/Spinner */
.spinner-border {
    border-color: var(--accent-red);
    border-right-color: transparent;
}

.spinner-border-sm {
    border-width: 0.15em;
}

/* Loading overlay with red accent */
.loading-overlay {
    position: relative;
}

.loading-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Badge Interactive States */
.badge {
    transition: all 0.3s ease;
    cursor: default;
}

.badge.bg-success {
    background-color: var(--accent-green) !important;
}

.badge.bg-info {
    background-color: #17a2b8 !important;
}

.badge.bg-info:hover {
    background-color: #138496 !important;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

/* Link Interactive States */
a {
    transition: all 0.2s ease;
    position: relative;
}

a:focus {
    outline: 2px solid var(--accent-red);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Card Interactive States */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0px 4px 24px rgba(173, 26, 26, 0.12);
}

/* Content Box Interactive States */
.content-box {
    transition: all 0.3s ease;
}

.content-box:hover {
    box-shadow: 0px 4px 24px rgba(173, 26, 26, 0.12);
}

/* Copy Button States (assuming these exist) */
.copy-btn,
button[title*="Copy"],
button[aria-label*="Copy"] {
    transition: all 0.2s ease;
}

.copy-btn:hover,
button[title*="Copy"]:hover,
button[aria-label*="Copy"]:hover {
    background: var(--accent-red);
    color: white;
    transform: scale(1.05);
}

.copy-btn:active,
button[title*="Copy"]:active,
button[aria-label*="Copy"]:active {
    transform: scale(0.95);
}

/* Icon Transform on Click */
.copy-btn i,
button[title*="Copy"] i,
button[aria-label*="Copy"] i {
    transition: transform 0.3s ease;
}

.copy-btn.copied i,
button[title*="Copy"].copied i,
button[aria-label*="Copy"].copied i {
    transform: rotate(360deg) scale(1.2);
}

/* Refresh Button Animation */
.refresh-controls button i {
    transition: transform 0.5s ease;
}

.refresh-controls button:active i,
.refresh-controls button.refreshing i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Status Badge Pulse Animation */
.badge.bg-success {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(40, 167, 69, 0.4);
    }
    50% {
        box-shadow: 0 0 16px rgba(40, 167, 69, 0.6);
    }
}

/* ============================================================
   FAQ ACCORDION
   ============================================================ */

.left-column .content details {
    border-bottom: 1px solid var(--border-color);
    padding: 0.5em 0;
}

.left-column .content details:last-of-type {
    border-bottom: none;
}

.left-column .content details summary {
    cursor: pointer;
    font-weight: bold;
    color: var(--text-medium);
    padding: 0.4em 0;
    list-style: none;
}

.left-column .content details summary::before {
    content: "+ ";
    color: var(--accent-red);
    font-weight: bold;
}

.left-column .content details[open] summary::before {
    content: "- ";
}

.left-column .content details summary:hover {
    color: var(--primary-red);
}

.left-column .content details p {
    margin: 0.3em 0 0.5em 1em;
    line-height: 1.6;
}

/* ============================================================
   BLAZOR ERROR UI
   ============================================================ */

#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;
}

#blazor-error-ui .reload {
    margin-left: 1rem;
}

/* ============================================================
   SIDEBAR CAPACITY
   ============================================================ */

.available-spots {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--accent-green);
}

/* ============================================================
   STATS CHART
   ============================================================ */

.stats-chart-wrapper {
    padding: 0.25rem 0;
}

.stats-chart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 0;
    color: var(--bs-secondary-color);
    font-size: 1.5rem;
}
