/* =========================================
   PROJECT 1973 BROILER - APP.CSS
   Based on Source: PROJECT 1973 boiler src.pdf
   ========================================= */

/* QUICK EDIT GUIDE
   - To tweak visuals quickly search for "CHANGE THIS" comments.
   - Top variables control global theme/colors/typography.
   - Sections are grouped (1. VARIABLES, 2. BASE, 3. NAV, 4. MAIN, 5. ERRORS, 6. DASHBOARD).
   - Utilities at the bottom are safe places to add small helpers (spacing, text states).
*/

/* =========================================================
   1. VARIABLES & THEMES
   ========================================================= */

/* Global theme variables */

/* =========================================
   GLOBAL OVERFLOW FIX
   ========================================= */
html, body {
    max-width: 100%;
    overflow-x: hidden; /* Disables horizontal scrollbar globally */
    position: relative; /* Ensures containment */
}

:root {
    /* CHANGE THIS: page background color */
    --bg-color: #ffffff;
    /* CHANGE THIS: primary text color used across body and components */
    --text-color: #1a1a1a;
    /* CHANGE THIS: navbar background */
    --nav-bg: #f8f9fa;
    /* CHANGE THIS: primary action color (buttons, links) */
    --primary: #007bff;
    /* CHANGE THIS: card / surface background */
    --card-bg: #ffffff;
    /* CHANGE THIS: standard border color used across components */
    --border: #dee2e6;
    /* CHANGE THIS: default font stack for the app */
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Dark theme overrides */
[data-theme="dark"] {
    --bg-color: #121212; /* CHANGE THIS: dark background */
    --text-color: #e0e0e0; /* CHANGE THIS: dark theme text */
    --nav-bg: #1e1e1e; /* CHANGE THIS: navbar bg in dark */
    --primary: #bb86fc; /* CHANGE THIS: primary accent for dark */
    --card-bg: #2d2d2d; /* CHANGE THIS: card bg for dark */
    --border: #404040; /* CHANGE THIS: border in dark */
}

/* Sepia theme overrides */
[data-theme="sepia"] {
    --bg-color: #f4ecd8; /* CHANGE THIS: sepia background */
    --text-color: #433422; /* CHANGE THIS: sepia text */
    --nav-bg: #eaddcf; /* CHANGE THIS: navbar sepia */
    --primary: #d2691e; /* CHANGE THIS: primary sepia accent */
    --card-bg: #fffbf0; /* CHANGE THIS: card bg sepia */
    --border: #d7c9b1; /* CHANGE THIS: border sepia */
}

/* =========================================================
   2. BASE STYLES
   ========================================================= */

html,
body {
    /* CHANGE THIS: main font stack or override --font-main in :root */
    font-family: var(--font-main);
    /* Theme-driven colors */
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    width: 100%;
    height: 100%;
    /* CHANGE THIS: duration for theme color transitions */
    transition: background-color 0.3s, color 0.3s;
}

/* App root layout */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh; /* CHANGE THIS if you want content to grow */
}

/* =========================================================
   3. NAVBAR
   ========================================================= */

.top-nav {
    background-color: var(--nav-bg); /* CHANGE THIS */
    border-bottom: 1px solid var(--border); /* CHANGE THIS */
    padding: 1rem; /* CHANGE THIS */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Branding */
.brand {
    font-weight: bold; /* CHANGE THIS */
    font-size: 1.2rem; /* CHANGE THIS */
}

/* Navigation button group */
.nav-buttons button {
    margin-left: 0.5rem; /* CHANGE THIS */
    padding: 0.5rem 1rem; /* CHANGE THIS */
    border: 1px solid var(--border); /* CHANGE THIS */
    background: var(--card-bg); /* CHANGE THIS */
    color: var(--text-color); /* CHANGE THIS */
    border-radius: 4px; /* CHANGE THIS */
    cursor: pointer;
    transition: all 0.2s;
}

    .nav-buttons button:hover {
        filter: brightness(0.95); /* CHANGE THIS */
    }

/* =========================================================
   4. MAIN CONTENT & COMPONENTS
   ========================================================= */

.content {
    flex: 1;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    /* padding: 2rem; */
    /* max-width: 900px; */
}

/* Card component */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 1.5rem; /* CHANGE THIS */
    border-radius: 8px; /* CHANGE THIS */
    margin-bottom: 1rem; /* CHANGE THIS */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* CHANGE THIS */
}

/* Primary button */
.btn-primary {
    background-color: var(--primary); /* CHANGE THIS */
    color: white; /* CHANGE THIS */
    border: none;
    padding: 0.75rem 1.5rem; /* CHANGE THIS */
    border-radius: 4px; /* CHANGE THIS */
    cursor: pointer;
    font-weight: bold;
    transition: filter 0.2s;
}

    .btn-primary:hover {
        filter: brightness(1.1); /* CHANGE THIS */
    }

/* =========================================================
   5. ERROR UI
   ========================================================= */

#blazor-error-ui {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 1000;
    display: none;
    padding: 0.6rem 1.25rem 0.7rem;
    background: #fff3cd; /* CHANGE THIS */
    color: #856404; /* CHANGE THIS */
    border-top: 1px solid #ffeeba; /* CHANGE THIS */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

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

/* =========================================================
   6. CUSTOM: REVIEW MASTER W UTILITIES
   ========================================================= */

.dashboard-container {
    width: 100%;
}

.action-bar {
    display: flex;
    gap: 1rem; /* CHANGE THIS */
    margin: 2rem 0; /* CHANGE THIS */
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* CHANGE THIS */
    gap: 1rem; /* CHANGE THIS */
}

    .library-grid .card {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

/* =========================================================
   7. UTILITIES & ANIMATIONS
   ========================================================= */

/* Spacing utilities */
.mt-1 {
    margin-top: 0.5rem;
}
/* CHANGE THIS */
.mt-2 {
    margin-top: 1rem;
}
/* CHANGE THIS */

/* Semantic text helpers */
.text-danger {
    color: #dc3545; /* CHANGE THIS */
}

/* Animations (moved out of Razor files) */

@keyframes springUp {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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