@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

@font-face {
    font-family: 'Avenir LT Std';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/AvenirLTStd-Book.otf') format('opentype');
}

@font-face {
    font-family: Avenir;
    font-style: normal;
    font-weight: 700;
    src: url('../fonts/AvenirLTStd-Heavy.otf') format('opentype');
}

@font-face {
    font-family: CommuterSansSemiBold;
    font-style: normal;
    font-weight: 600;
    src: url('../fonts/Commuter Sans SemiBold.woff2') format('woff2');
}

:root {
    --ctcf-blue: #0A2947;
    --ctcf-gold: #E3BA57;
    --ctcf-cream: #EBE3CC;
    --ctcf-teal: #1C5766;
    --ctcf-red: #CC4F4F;
    --ctcf-link: #E0E0E0;
    --ctcf-hover: #4A5568;
}

html,
body {
    min-height: 100%;
    margin: 0;
    font-family: 'Open Sans', 'Segoe UI', sans-serif;
    color: var(--ctcf-blue);
    background: var(--ctcf-cream);
}

a,
.btn-link {
    color: var(--ctcf-blue);
}

.btn-primary {
    color: var(--ctcf-blue);
    background-color: var(--ctcf-gold);
    border-color: var(--ctcf-gold);
    font-family: CommuterSansSemiBold, 'Open Sans', sans-serif;
    font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus {
    color: var(--ctcf-blue);
    background-color: #e8b548;
    border-color: var(--ctcf-blue);
}

app {
    position: relative;
    display: flex;
    min-height: 100vh;
    background: var(--ctcf-cream);
}

.top-row {
    display: flex;
    align-items: center;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    background: var(--ctcf-cream);
}

.app-header {
    min-height: 56px;
    padding: 0.5rem 1.25rem;
    background: var(--ctcf-gold);
    box-shadow: 0 2px 8px rgba(10, 41, 71, 0.14);
    justify-content: flex-end;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 20;
}

.header-account {
    display: flex;
    align-items: center;
    gap: 1rem;
    white-space: nowrap;
}

.login-link {
    color: var(--ctcf-blue);
    font-weight: 700;
    text-decoration: none;
}

.login-link:hover {
    color: var(--ctcf-blue);
    text-decoration: underline;
}

.logout-button {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 40px;
    padding: 0.45rem 1.5rem;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--ctcf-red);
    font-family: CommuterSansSemiBold, 'Open Sans', sans-serif;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.logout-button:hover,
.logout-button:focus {
    background: #b94343;
}

.sidebar {
    background: var(--ctcf-blue);
    color: var(--ctcf-link);
}

.sidebar-brand {
    min-height: 170px;
    justify-content: center;
    padding: 1rem 0.35rem;
}

.sidebar .navbar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    margin: 0;
    padding: 0;
    color: #fff;
    font-size: 1.1rem;
    font-family: 'Open Sans', 'Segoe UI', sans-serif;
    white-space: nowrap;
}

.sidebar-brand .sidebar-logo {
    display: block;
    width: 230px !important;
    max-width: calc(100% - 1rem);
    height: auto !important;
    object-fit: contain;
}

.sidebar .oi {
    width: 1.5rem;
    font-size: 1rem;
    vertical-align: text-top;
    top: -1px;
}

.sidebar-nav {
    margin-top: 0;
    padding-bottom: 1rem;
    font-family: CommuterSansSemiBold, 'Open Sans', sans-serif;
}

.sidebar > .collapse,
.sidebar > div:not(.sidebar-brand) {
    width: 100%;
    margin-top: 0;
}

.sidebar .nav-item {
    font-size: 1.05rem;
    padding-bottom: 0.15rem;
}

.sidebar .nav-item a {
    display: flex;
    align-items: center;
    min-height: 42px;
    border-radius: 4px;
    color: var(--ctcf-link);
    line-height: 1.25;
}

.sidebar .nav-item a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.sidebar .nav-item a:hover {
    color: #fff;
    background: var(--ctcf-hover);
}

.navbar-toggler {
    background-color: rgba(255, 255, 255, 0.14);
}

.content {
    position: relative;
    flex: 1;
    padding: 2rem 1.5rem;
    background: var(--ctcf-cream);
}

.main-menu-link {
    color: var(--ctcf-blue);
    font-size: 1rem;
    text-decoration: underline;
}

.home-welcome {
    display: flex;
    min-height: calc(100vh - 240px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.home-welcome h1 {
    margin: 0 0 0.7rem;
    color: var(--ctcf-blue);
    font-family: Avenir, 'Avenir LT Std', 'Open Sans', sans-serif;
    font-size: clamp(2.75rem, 5vw, 4.8rem);
    font-weight: 700;
    line-height: 1.05;
}

.home-welcome p {
    margin: 0;
    color: var(--ctcf-teal);
    font-family: CommuterSansSemiBold, 'Open Sans', sans-serif;
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
}

.home-welcome-guest {
    min-height: calc(100vh - 220px);
}

.login-page {
    display: flex;
    min-height: calc(100vh - 210px);
    align-items: flex-start;
    justify-content: center;
    padding-top: 3rem;
}

.login-panel {
    width: min(100%, 720px);
    padding: 1.75rem 1rem 1.35rem;
    border: 1px solid rgba(10, 41, 71, 0.18);
    background: rgba(255, 255, 255, 0.58);
}

.login-panel h3 {
    margin: 0;
    color: #111;
    font-family: 'Open Sans', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
}

.login-panel .form-control {
    height: 38px;
    border-color: #ced4da;
    border-radius: 3px;
    font-family: 'Open Sans', sans-serif;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

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

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

@media (max-width: 767.98px) {
    app {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .sidebar-brand {
        min-height: 88px;
        justify-content: space-between;
    }

    .sidebar-brand .sidebar-logo {
        width: 170px !important;
        height: auto !important;
    }

    .sidebar-nav {
        margin-top: 0;
    }

    .sidebar > .collapse,
    .sidebar > div:not(.sidebar-brand) {
        margin-top: 0;
    }

    .app-header {
        justify-content: center;
        min-height: auto;
        padding: 0.7rem 1rem;
        text-align: center;
    }

    .header-account {
        justify-content: center;
        flex-wrap: wrap;
    }

    .content {
        padding: 1.5rem 1rem;
    }

    .home-welcome {
        min-height: 56vh;
    }

    .login-page {
        min-height: 56vh;
        padding-top: 1.5rem;
    }
}

@media (min-width: 768px) {
    app {
        flex-direction: row;
    }

    .sidebar {
        position: sticky;
        top: 0;
        display: flex;
        width: 315px;
        height: 100vh;
        flex-direction: column;
        flex-shrink: 0;
        padding: 0 0.75rem;
    }

    .main .top-row {
        position: sticky;
        top: 0;
    }

    .navbar-toggler {
        display: none;
    }

    .sidebar .collapse {
        display: block;
    }
}
