/* =========================================================
   GLOBAL BASE
   ========================================================= */

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}


/* =========================================================
   ROOT / LAYOUT
   ========================================================= */

.page {
    position: relative;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.site-layout {
    min-height: 100vh;
    background: #f7fafb;
}


/* =========================================================
   HEADER – BASE (MOBILE FIRST)
   ========================================================= */

.site-header {
    display: flex;
    flex-direction: column; /* stack on mobile */
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 16px;
    z-index: 100;
}

/* LOGO ROW (mobile: own row, centered) */
.header-logo {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 8px;
}

/* ACTION ROW (Apply + Menu) */
.header-actions {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
}

/* Left group (desktop use) */
.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Logo */
.logo {
    height: 48px;
}

/* Brand text */
.brand {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
}


/* =========================================================
   CTA BUTTONS
   ========================================================= */

.cta-btn {
    border-radius: 999px;
}

/* Mobile CTA */
.mobile-cta {
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 999px;
}


/* =========================================================
   PAGE CONTENT
   ========================================================= */

.site-content {
    padding: 40px;
    background-color: #f7faf9;
    min-height: 100vh;
    font-size: 12px;
}


/* =========================================================
   CONTENT FRAME (DESKTOP BORDERS)
   ========================================================= */

.content-frame {
    padding: 0;
    border-radius: 8px 8px 0 0;
}

@media (min-width: 1400px) {
    .content-frame {
        border-left: 1px solid #e5e7eb;
        border-right: 1px solid #e5e7eb;
        box-shadow: 0 0 0 1px #e5e7eb;
    }
}


/* =========================================================
   BOOTSTRAP NAVIGATION COLORS
   ========================================================= */

.navbar .nav-link,
.navbar .nav-link:visited,
.navbar .dropdown-item,
.navbar .dropdown-item:visited {
    color: #000 !important;
}

    .navbar .nav-link:hover,
    .navbar .dropdown-item:hover {
        color: #000 !important;
    }

    .navbar .nav-link.active {
        font-weight: 600;
    }


/* =========================================================
   DESKTOP RESTORE (IMPORTANT)
   ========================================================= */

@media (min-width: 992px) {

    .site-header {
        flex-direction: row; /* restore row layout */
        align-items: center;
        justify-content: space-between;
        padding: 30px 40px;
    }

    .header-logo {
        width: auto;
        justify-content: flex-start;
        margin-bottom: 0;
    }

    .header-actions {
        width: auto;
        gap: 24px;
    }

    /* Desktop CTA visible */
    .cta-btn {
        display: inline-flex;
    }

    /* Mobile CTA hidden */
    .mobile-cta {
        display: none;
    }
}

/* =========================================================
   FORMS / BUTTONS / VALIDATION
   ========================================================= */

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;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control::placeholder,
.form-floating > .form-control-plaintext::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control:focus::placeholder,
.form-floating > .form-control-plaintext:focus::placeholder {
    text-align: start;
}


/* =========================================================
   BLAZOR ERROR UI
   ========================================================= */

#blazor-error-ui {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.6rem 1.25rem 0.7rem;
    background: lightyellow;
    color-scheme: light only;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        position: absolute;
        top: 0.5rem;
        right: 0.75rem;
        cursor: pointer;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,...) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }


/* =============================
   BLAZOR .NET 10 PRELOADER
============================= */
.app-preloader {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    transition: opacity .35s ease, visibility .35s ease;
}

    .app-preloader.hide {
        opacity: 0;
        visibility: hidden;
    }

.preloader-inner {
    text-align: center;
}

.spinner {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 4px solid rgba(0,0,0,.12);
    border-top-color: #019345; /* bootstrap primary */
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

.preloader-text {
    font-family: Roboto, Segoe UI, Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    opacity: .75;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
