﻿html, body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ecfeef;
    color: #000;
}

/* Links and Buttons */
a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Validation */
.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

/* Error Display */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,...your long svg...) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* Custom checkbox */
.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* App Loader */
.app-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 5px solid #ddd;
    border-top-color: #333;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.main-content {
    position: relative;
    z-index: 1;
}

/* === NEW STYLES FOR PAGE STRUCTURE === */

/* Global Layout Container */
.layout-container {
    display: flex;
    position: relative;
    min-height: calc(100vh - 70px); /* subtract top-bar height */
}

/* Sticky Logo Sidebar */
.logo-sidebar {
    width: 4rem;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    position: sticky;
    top: 15rem; /* height of the top-bar */
    left: 15rem;
    height:100%;
}

    .logo-sidebar img {
        height: auto;
        opacity: 0.8;
    }

@media (max-width: 768px) {
    .logo-sidebar {
        opacity: 0.1; /* More subtle */
    }
}

/* Right-side Page Content */
.page-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    margin-left:0;
}

/* Top Bar */
.top-bar {
    width: 100%;
    height: 6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    padding: 1rem 2rem;
    border-bottom: 1px solid #ccc;
    position: fixed; /* Change from sticky to fixed */
    top: 0; /* Stick to top of viewport */
    left: 0; /* Ensure it spans full width */
    z-index: 1000; /* High z-index to stay above content */
    box-shadow: 1px 1px 10px 0 rgba(0, 0, 0, 0.25);
}
/* Title */
.site-title {
    font-size: 1.4rem;
    font-weight: bold;
    margin-left: 150px;
    color: #474747;
}

/* Top Right Controls (Home + Dropdown) */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.button-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    height: 48px;
    padding: 1rem 1.7rem;
    background-color: transparent; 
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    border: 0.2px solid #6F8789;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

    /* Icon styling */
    .button-home i {
        font-size: 20px;
    }

    /* Hover state */
    .button-home:hover {
        background-color: #F1AF41;
    }

    /* Active (click) state */
    .button-home:active {
        background-color: rgba(90, 159, 102, 0.2); /* green + 20% black overlay */
    }

    /* Optional focus state */
    .button-home:focus {
        outline: none;
    }

.nav-link-home {
    text-decoration:none;
    color: #000;
    width:100%;
}
    .nav-link-home:hover {
        color: #FFFFFF;
        width: 100%;
    }
    .nav-link-home:active {
        color: #000;
        width: 100%;
    }


/* Main Body Styling */
.main-body {
    padding: 2rem;
    flex-grow: 1;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        padding: 1rem;
        gap: 0.5rem;
    }

    .site-title {
        margin-left: 0;
        font-size: 18px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .nav-controls {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .button-home {
        flex: 1 1 auto;
        width: 100%;
        justify-content: center;
    }

    .layout-container {
        flex-direction: column;
        padding-top: 100px; 
    }

    .logo-sidebar {
        display: none; /* Hide sidebar on small screens */
    }

    .page-content {
        width: 100%;
    }

    .main-body {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .top-bar {
        padding: 0.75rem;
    }

    .site-title {
        font-size: 16px;
    }

    .button-home {
        font-size: 14px;
        gap: 8px;
    }

    .main-body {
        padding: 0.5rem;
    }
}



