/* MudBlazor Critical CSS - Phase 2 Sprint 2.1
   Minimal styles needed for above-fold initial render
   Full MudBlazor.min.css is deferred after this loads

   Includes:
   - Layout shell (MudLayout, MudAppBar, MudDrawer)
   - Navigation basics (MudNavMenu, MudNavLink)
   - Button foundations (primary actions)
   - Typography essentials
   - Progress indicators (loading states)
   - Form input basics
*/

/* ==========================================
   LAYOUT SHELL
   ========================================== */

/* Main layout container */
.mud-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.mud-layout-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

/* Main content area */
.mud-main-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 16px;
    overflow-y: auto;
}

/* ==========================================
   APP BAR
   ========================================== */

.mud-appbar {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 64px;
    background-color: #003566;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1100;
}

.mud-appbar-fixed-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.mud-appbar-toolbar {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
}

/* ==========================================
   DRAWER / SIDEBAR
   ========================================== */

.mud-drawer {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1200;
}

.mud-drawer-persistent {
    position: relative;
    flex-shrink: 0;
}

.mud-drawer-temporary {
    position: fixed;
    top: 0;
    bottom: 0;
}

.mud-drawer-anchor-left {
    left: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.12);
}

.mud-drawer-open {
    width: 240px;
    transition: width 0.2s ease-in-out;
}

.mud-drawer-closed {
    width: 0;
    overflow: hidden;
}

/* ==========================================
   NAVIGATION
   ========================================== */

.mud-navmenu {
    padding: 8px 0;
}

.mud-nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    border-radius: 4px;
    margin: 2px 8px;
    transition: background-color 0.15s ease;
}

.mud-nav-link:hover {
    background-color: rgba(0, 180, 216, 0.08);
}

.mud-nav-link-active,
.mud-nav-link.active {
    background-color: rgba(0, 180, 216, 0.12);
    color: #00B4D8;
}

.mud-nav-link-icon {
    margin-right: 16px;
    display: flex;
    align-items: center;
}

.mud-nav-link-text {
    flex: 1;
    font-size: 14px;
}

/* ==========================================
   BUTTONS
   ========================================== */

.mud-button-root {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
    outline: 0;
    border: 0;
    margin: 0;
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
    text-decoration: none;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.75;
    letter-spacing: 0.02857em;
    text-transform: uppercase;
    min-width: 64px;
    padding: 6px 16px;
    border-radius: 4px;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.mud-button-root:disabled {
    pointer-events: none;
    opacity: 0.5;
}

/* Filled button */
.mud-button-filled {
    color: #ffffff;
    background-color: #00B4D8;
}

.mud-button-filled:hover {
    background-color: #0096c7;
}

.mud-button-filled-primary {
    background-color: #00B4D8;
}

.mud-button-filled-secondary {
    background-color: #003566;
}

/* Outlined button */
.mud-button-outlined {
    background-color: transparent;
    border: 1px solid currentColor;
}

.mud-button-outlined-primary {
    color: #00B4D8;
    border-color: rgba(0, 180, 216, 0.5);
}

/* Text button */
.mud-button-text {
    background-color: transparent;
    padding: 6px 8px;
}

.mud-button-text-primary {
    color: #00B4D8;
}

/* Icon button */
.mud-icon-button {
    padding: 8px;
    border-radius: 50%;
    min-width: auto;
    background-color: transparent;
}

.mud-icon-button:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* FAB */
.mud-fab {
    padding: 0;
    min-height: 56px;
    min-width: 56px;
    border-radius: 50%;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

/* ==========================================
   ICONS
   ========================================== */

.mud-icon-root {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.mud-icon-size-small {
    font-size: 1.25rem;
}

.mud-icon-size-medium {
    font-size: 1.5rem;
}

.mud-icon-size-large {
    font-size: 2.25rem;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */

.mud-typography {
    margin: 0;
}

.mud-typography-h1 {
    font-size: 6rem;
    font-weight: 300;
    line-height: 1.167;
}

.mud-typography-h2 {
    font-size: 3.75rem;
    font-weight: 300;
    line-height: 1.2;
}

.mud-typography-h3 {
    font-size: 3rem;
    font-weight: 400;
    line-height: 1.167;
}

.mud-typography-h4 {
    font-size: 2.125rem;
    font-weight: 400;
    line-height: 1.235;
}

.mud-typography-h5 {
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.334;
}

.mud-typography-h6 {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.6;
}

.mud-typography-subtitle1 {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.75;
}

.mud-typography-subtitle2 {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.57;
}

.mud-typography-body1 {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
}

.mud-typography-body2 {
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.43;
}

.mud-typography-caption {
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.66;
}

/* ==========================================
   PROGRESS INDICATORS
   ========================================== */

/* Linear progress */
.mud-progress-linear {
    display: block;
    width: 100%;
    height: 4px;
    overflow: hidden;
    background-color: rgba(0, 180, 216, 0.2);
    border-radius: 2px;
}

.mud-progress-linear-bar {
    width: 100%;
    height: 100%;
    background-color: #00B4D8;
}

.mud-progress-linear-indeterminate .mud-progress-linear-bar {
    width: auto;
    animation: mud-progress-indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
}

@keyframes mud-progress-indeterminate {
    0% { left: -35%; right: 100%; }
    60% { left: 100%; right: -90%; }
    100% { left: 100%; right: -90%; }
}

/* Circular progress */
.mud-progress-circular {
    display: inline-flex;
    color: #00B4D8;
}

.mud-progress-circular-svg {
    display: block;
}

.mud-progress-circular-circle {
    stroke: currentColor;
    stroke-dasharray: 80px, 200px;
    stroke-dashoffset: 0;
}

.mud-progress-circular-indeterminate .mud-progress-circular-svg {
    animation: mud-progress-circular-rotate 1.4s linear infinite;
}

.mud-progress-circular-indeterminate .mud-progress-circular-circle {
    animation: mud-progress-circular-dash 1.4s ease-in-out infinite;
}

@keyframes mud-progress-circular-rotate {
    100% { transform: rotate(360deg); }
}

@keyframes mud-progress-circular-dash {
    0% { stroke-dasharray: 1px, 200px; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 100px, 200px; stroke-dashoffset: -15px; }
    100% { stroke-dasharray: 100px, 200px; stroke-dashoffset: -125px; }
}

/* ==========================================
   FORM INPUTS (BASICS)
   ========================================== */

.mud-input-control {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.mud-input {
    font: inherit;
    color: currentColor;
    width: 100%;
    border: 0;
    margin: 0;
    padding: 8px 12px;
    display: block;
    min-width: 0;
    background: none;
    box-sizing: border-box;
    outline: none;
}

.mud-input-outlined {
    border: 1px solid rgba(0, 0, 0, 0.23);
    border-radius: 4px;
    background-color: #ffffff;
}

.mud-input-outlined:focus,
.mud-input-outlined:focus-within {
    border-color: #00B4D8;
    border-width: 2px;
    padding: 7px 11px;
}

.mud-input-label {
    font-size: 0.875rem;
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 4px;
}

/* ==========================================
   CARDS (BASIC)
   ========================================== */

.mud-paper {
    background-color: #ffffff;
    color: rgba(0, 0, 0, 0.87);
    border-radius: 4px;
}

.mud-paper-outlined {
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.mud-elevation-1 { box-shadow: 0 2px 1px -1px rgba(0,0,0,0.2), 0 1px 1px 0 rgba(0,0,0,0.14), 0 1px 3px 0 rgba(0,0,0,0.12); }
.mud-elevation-2 { box-shadow: 0 3px 1px -2px rgba(0,0,0,0.2), 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12); }
.mud-elevation-3 { box-shadow: 0 3px 3px -2px rgba(0,0,0,0.2), 0 3px 4px 0 rgba(0,0,0,0.14), 0 1px 8px 0 rgba(0,0,0,0.12); }
.mud-elevation-4 { box-shadow: 0 2px 4px -1px rgba(0,0,0,0.2), 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12); }

.mud-card {
    overflow: hidden;
}

.mud-card-content {
    padding: 16px;
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */

.d-flex { display: flex !important; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.flex-column { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }
.justify-center { justify-content: center !important; }
.justify-space-between { justify-content: space-between !important; }
.align-center { align-items: center !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.gap-2 { gap: 8px !important; }
.gap-3 { gap: 12px !important; }
.gap-4 { gap: 16px !important; }
.pa-0 { padding: 0 !important; }
.pa-2 { padding: 8px !important; }
.pa-3 { padding: 12px !important; }
.pa-4 { padding: 16px !important; }
.ma-0 { margin: 0 !important; }
.ma-2 { margin: 8px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-4 { margin-top: 16px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-4 { margin-bottom: 16px !important; }
.ml-2 { margin-left: 8px !important; }
.mr-2 { margin-right: 8px !important; }
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }
.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }
.text-center { text-align: center !important; }
.cursor-pointer { cursor: pointer !important; }

/* ==========================================
   RESPONSIVE BREAKPOINTS
   ========================================== */

@media (max-width: 599px) {
    .mud-drawer-open {
        width: 100%;
    }
    .mud-main-content {
        padding: 8px;
    }
}

@media (min-width: 600px) and (max-width: 959px) {
    .mud-drawer-open {
        width: 200px;
    }
}
