/* Import app.css for public tools theme and global styles */
@import url('app.css');

/* ==========================================================================
   1. CORE VARIABLES & THEME
   ========================================================================== */
:root {
    /* Monochrome Palette */
    --br-bg-main: #ffffff;
    --br-bg-sidebar: #fbfbfd;
    --br-bg-topbar: #ffffff;
    --br-bg-topbar: rgba(255, 255, 255, 0.85);
    --br-bg-hover: #f5f5f7;
    --br-border: #000000;
    --br-border: rgba(0, 0, 0, 0.08);
    /* Typography & Accents */
    --br-text-primary: #1d1d1f;
    --br-text-secondary: #424245;
    --br-text-muted: #86868b;
    --br-accent: #0071e3;
    /* Transitions */
    --br-ease: cubic-bezier(0.25, 1, 0.5, 1);
}

/* ==========================================================================
   2. LAYOUT STRUCTURE
   ========================================================================== */
.br-layout-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--br-bg-main);
    color: var(--br-text-primary);
}

.br-top-bar {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--br-border);
    background: var(--br-bg-topbar);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    z-index: 100;
}

.br-content-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* ==========================================================================
   3. SIDEBAR & NAVIGATION
   ========================================================================== */
.br-sidebar {
    background: var(--br-bg-sidebar);
    border-right: 1px solid var(--br-border);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: width 0.4s var(--br-ease);
    overflow: hidden;
    will-change: width;
}

.br-sidebar-inner {
    width: 256px;
    height: 100%;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.br-menu-wrapper {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.br-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--br-text-secondary);
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: all 0.2s ease;
}

    .br-nav-link:hover {
        background-color: var(--br-bg-hover);
        color: var(--br-text-primary);
    }

    .br-nav-link.active {
        background-color: var(--br-text-primary);
        color: #ffffff;
        box-shadow: 0 4px 10px #000000;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

.br-nav-link.active svg,
        .br-nav-link.active i {
            color: #ffffff !important;
        }

/* Icons & Chevrons */
.br-nav-icon {
    width: 16px;
    height: 16px;
    stroke-width: 2px;
}

.br-nav-chevron {
    width: 12px;
    height: 12px;
    stroke-width: 3px;
    color: var(--br-text-muted);
    transition: transform 0.2s var(--br-ease);
}

    .br-nav-chevron.expanded {
        transform: rotate(90deg);
    }

.br-child-container {
    margin-left: 14px;
    margin-top: 2px;
    border-left: 1px solid var(--br-border);
    padding-left: 4px;
}

/* ==========================================================================
   4. INTERACTIVE COMPONENTS (HAMBURGER & DROPDOWNS)
   ========================================================================== */
.br-hamburger {
    width: 24px;
    height: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
}

    .br-hamburger span {
        display: block;
        height: 2px;
        width: 100%;
        background: var(--br-text-primary);
        border-radius: 2px;
        transition: all 0.3s;
        transform-origin: left center;
    }

    .br-hamburger.is-open span:nth-child(1) {
        transform: rotate(45deg);
        width: 20px;
    }

    .br-hamburger.is-open span:nth-child(2) {
        opacity: 0;
        width: 0;
    }

    .br-hamburger.is-open span:nth-child(3) {
        transform: rotate(-45deg);
        width: 20px;
    }

.br-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    background: #ffffff;
    border: 1px solid var(--br-border);
    border-radius: 14px;
    box-shadow: 0 12px 30px #000000;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    min-width: 220px;
    padding: 8px;
    z-index: 1000;
}

/* ==========================================================================
   5. MAIN CONTENT & STUDIO STAGE (BLOBS)
   ========================================================================== */
.br-main-view {
    position: relative;
    flex: 1;
    overflow-y: auto;
    padding: 40px 48px;
    background: transparent; /* Allows blobs to show through */
    z-index: 1;
}

.br-stage-blob {
    position: fixed;
    pointer-events: none;
    z-index: -1;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
}

.br-blob-1 {
    top: -5%;
    left: -5%;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, rgba(0, 113, 227, 0.12) 0, transparent 70%);
    animation: br-pulse 12s infinite alternate ease-in-out;
}

.br-blob-2 {
    bottom: -10%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(103, 232, 249, 0.1) 0, transparent 70%);
    animation: br-pulse 15s infinite alternate-reverse ease-in-out;
}

@keyframes br-pulse {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }

    100% {
        transform: scale(1.1);
        opacity: 0.6;
    }
}

/* ==========================================================================
   6. DASHBOARD CARDS
   ========================================================================== */
.br-card {
    background: #ffffff;
    border: 1px solid #000000;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px #000000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s var(--br-ease), box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-decoration: none;
    flex: 1 1 300px;
    max-width: 400px;
}

.br-card:hover {
    transform: translateY(-4px);
    border-color: #000000;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 12px 24px #000000;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.05);
}

.br-card-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--br-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.br-card-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--br-text-primary);
    line-height: 1;
}

/* ==========================================================================
   7. BLAZOR SPECIFICS (RECONNECT MODAL)
   ========================================================================== */
#components-reconnect-modal {
    background: #ffffff;
    background: rgba(255, 255, 255, 0.8);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    z-index: 2000;
}

/* ==========================================================================
   8. RADIO CARD COMPONENT
   ========================================================================== */
.br-radio-card {
    position: relative;
    display: block;
    cursor: pointer;
}

.br-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.br-radio-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    border: 2px solid var(--br-border);
    border-radius: 12px;
    background: var(--br-bg-main);
    transition: all 0.2s var(--br-ease);
    min-height: 100px;
}

.br-radio-card-content i {
    font-size: 1.5rem;
    color: var(--br-text-muted);
    margin-bottom: 0.5rem;
    transition: color 0.2s var(--br-ease);
}

.br-radio-card-content span {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--br-text-primary);
}

.br-radio-card:hover .br-radio-card-content {
    border-color: var(--br-accent);
    background: var(--br-bg-hover);
}

.br-radio-card input[type="radio"]:checked ~ .br-radio-card-content {
    border-color: var(--br-accent);
    background: rgba(0, 113, 227, 0.05);
}

.br-radio-card input[type="radio"]:checked ~ .br-radio-card-content i {
    color: var(--br-accent);
}

.br-radio-card input[type="radio"]:focus ~ .br-radio-card-content {
    outline: 2px solid var(--br-accent);
    outline-offset: 2px;
}
