@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

body {
    overflow-x: hidden;
}

:root {
    --primary-color: #0072bc;
    --upper-nav-height: 56px;
    --lower-nav-height: 56px;
    --nav-bg-color: #0072bc;
    --nav-text-color: #ffffff;
    --nav-hover-color: #ffde59;
}

a, .btn-link {
    color: #000000;
    text-decoration: none;
}

    a:hover, .btn-link:hover {
        color: #000000;
        cursor: pointer;
    }

.text-justify a {
    text-decoration: underline;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#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;
    }

.breadcrumb {
    background-color: #e9ecef;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
}

.breadcrumb-item a {
    text-decoration: none;
}

::placeholder {
    color: rgba(0, 0, 0, 0.3) !important;
}

.carousel {
    border-bottom: rgba(0, 0, 0, 0.1) solid 1px;
}

.no-lr-padding {
    padding-left: 0;
    padding-right: 0;
}

/* Blazored.Modal */

.blazored-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
}

/* remove default shell so only custom content is visible */
.blazored-modal-content {
    background: transparent;
    box-shadow: none;
    border: 0;
    padding: 0;
    display: contents;
}

.blazored-modal-header {
    padding: 5px;
}

.blazored-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 5px;
}

.blazored-modal-content {
    padding: 5px;
}

/* Navbar */

.nav-item {
    font-size: 0.82rem;
    text-transform: uppercase;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 74px;
    padding: 0.35rem 0;
}

.site-branding-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.navbar-brand .site-branding-icon {
    width: 200px;
    height: 72px;
}

.navbar-brand .site-branding-placeholder {
    width: 176px;
    height: 72px;
}

.site-branding-banner {
    max-height: 56px;
    width: auto;
    object-fit: contain;
}

.navbar-brand.has-banner {
    gap: 0;
}

    .navbar-brand.has-banner .site-branding-banner {
        max-height: 48px;
    }

.footer-title.has-banner {
    gap: 0.5rem;
}

.branding-preview {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.branding-preview-frame {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 1rem;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
}

.branding-preview-frame .site-branding-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.branding-icon-clear {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    border-radius: 50%;
    --bs-btn-padding-x: 0.4rem;
    --bs-btn-padding-y: 0.4rem;
    line-height: 1;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
    color: #dc3545;
    border: none;
}

.branding-preview-placeholder {
    width: 140px;
    height: 140px;
    border-radius: 1rem;
    border: 1px dashed #ced4da;
    color: #6c757d;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.branding-preview-placeholder i {
    font-size: 2rem;
}

.branding-preview .site-branding-banner {
    max-height: 40px;
}

.site-branding-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background-color: #f1f3f5;
    color: #adb5bd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.site-branding-placeholder i {
    line-height: 1;
}

.footer-title {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.static-nav-link {
    color: rgba(0, 0, 0, 0.8) !important;
    cursor: default !important;
}

/* books/authors list */

.sidebar-heading {
    background-color: whitesmoke;
    border: rgba(0, 0, 0, 0.1) solid 1px;
    border-radius: 5px;
    padding: 0.5rem;
    margin-right: -30px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
}

ul.list {
    text-align: center;
    list-style-type: none;
    cursor: pointer;
    padding-left: 45px;
}

.list-items {
    text-align: left;
    font-size: 0.8rem;
    font-weight: 500;
    font-style: italic;
    padding-bottom: 5px;
}

    .list-items:hover {
        text-decoration: underline !important;
    }

.dropdown-button {
    font-size: 0.8rem !important;
    margin-right: -30px;
    margin-top: 0.5rem;
    border: rgba(0, 0, 0, 0.1) solid 1px;
}

    .dropdown-button:hover {
        font-size: 0.8rem !important;
        margin-right: -30px;
        margin-top: 0.5rem;
        border: rgba(0, 0, 0, 0.1) solid 1px;
        background-color: #f0f0f0;
    }

.dropdown-item {
    font-family: Arial;
    font-size: 12px;
    padding-top: 0.25rem;
    margin-right: 1rem;
}

.dropdown-menu {
    min-width: 198px;
}

/* Show login dropdown on hover */
.nav-item.dropdown:hover .nav-user-dropdown {
    display: block;
    margin-top: 0;
}

/* Ensure dropdown appears above other content */
.nav-user-dropdown {
    z-index: 1050;
}

.no-results {
    font-size: 1rem;
    font-weight: 500;
    font-style: italic;
    padding-left: 0.8rem;
}

/* home page bookshelves */

.heading-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem 1rem 1rem;
}

    .heading-row h3 {
        margin-bottom: 0;
        font-size: 1.25rem;
        font-style: italic;
    }

img.book-cover {
    width: 100px;
    max-height: 150px;
}

.book-title {
    font-size: 1rem;
    font-weight: 700;
    min-height: 3rem;
    max-height: 3rem;
    overflow: hidden;
}

.book-author {
    font-size: 0.8rem;
    font-style: italic;
    min-height: 1.25rem;
    max-height: 1.25rem;
    overflow: hidden;
    color: rgba(0, 0, 0, 0.6);
}

.book-button {
    width: 30%;
    height: 2rem;
    background-color: rgba(255, 255, 255, 0.7);
    color: rgba(0, 0, 0, 0.5);
    border: rgba(0, 0, 0, 0.3) solid 1px;
}

.book-button-layout {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image :hover {
    opacity: 1;
}

    .image :hover button {
        transform: none;
        opacity: 1;
    }

.hover-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(255,255,255, 0.5);
    opacity: 0;
    transition: all 0.5s;
}

    .hover-overlay button {
        z-index: 1000;
        transition: all 0.5s;
    }

    .hover-overlay button {
        transform: translateY(-50px);
    }

/* login & register screens */

.title-text {
    font-size: 1.6rem;
}

.link-text a {
    font-size: 1rem;
    color: rgba(71, 71, 105, 0.5);
    text-decoration: none;
}

    .link-text a:hover {
        color: slategray;
        text-decoration: none;
    }

/* file uploads */

/* Hide file inputs only when explicitly opted in */
input[type="file"].hidden-file-input {
    visibility: hidden;
}

button.image-picker {
    margin-top: -3rem;
}

.image-preview {
    width: 10rem;
    margin: 1rem 0;
}

    .image-preview img {
        width: 100%;
    }

/* pagination */

.page-item.active .page-link {
    z-index: 3;
    color: #fff !important;
    background-color: #343a40 !important;
    border-color: #343a40 !important;
}

.page-link {
    color: #000;
}

.page-item.disabled .page-link {
    color: rgba(0,0,0, 0.4);
}

.page-item:not(.disabled) .page-link {
    color: rgba(0,0,0, 0.8);
}

/* container width control */
@media (min-width: 1200px) {
    .container {
        width: 1150px;
    }
}

/* TandF style header */
#upper-nav {
    background-color: #ffffff;
    color: rgba(0, 0, 0, 0.85);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

    #upper-nav .navbar-brand,
    #upper-nav .navbar-brand span,
    #upper-nav .nav-link,
    #upper-nav .nav-link span,
    #upper-nav .nav-elements .nav-link,
    #upper-nav .folder-link {
        color: inherit !important;
    }

#upper-nav .nav-elements {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

    #upper-nav .navbar-brand:hover,
        #upper-nav .nav-link:hover,
        #upper-nav .nav-link:focus {
            color: var(--primary-color) !important;
        }

    #upper-nav .navbar-toggler {
        border-color: rgba(0, 0, 0, 0.2);
    }

#lower-nav {
    background-color: var(--nav-bg-color);
    color: var(--nav-text-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.25) !important;
}

    #lower-nav .nav-link,
    #lower-nav .folder-link {
        color: var(--nav-text-color) !important;
    }

        #lower-nav .nav-link:hover,
        #lower-nav .nav-link:focus {
            color: var(--nav-hover-color) !important;
        }

        #lower-nav .nav-link.active,
        #lower-nav .nav-item.show > .nav-link {
            color: var(--nav-hover-color) !important;
        }

    #lower-nav .navbar-toggler {
        border-color: rgba(255, 255, 255, 0.35);
    }


@media (max-width: 767.98px) {
    #upper-nav .navbar-brand {
        padding-top: 0.25rem;
        padding-bottom: 0.25rem;
    }

        #upper-nav .navbar-brand .site-branding-icon {
            width: 132px;
            height: 56px;
        }

        #upper-nav .navbar-brand .site-branding-placeholder {
            width: 132px;
            height: 56px;
        }

        #upper-nav .navbar-brand.has-banner .site-branding-banner {
            max-height: 36px;
        }

    #upper-nav .nav-elements .navbar-nav {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }

    #upper-nav .nav-elements .nav-item {
        margin-left: 0;
    }

    #upper-nav .nav-elements .nav-link {
        text-transform: uppercase;
        font-weight: 600;
        font-size: 0.85rem;
    }
}

@media (max-width: 575.98px) {
    .branding-preview-frame,
    .branding-preview-placeholder {
        width: 110px;
        height: 110px;
    }
}



/* Nested dropdowns */
.dropdown-submenu {
    position: relative;
}

    .dropdown-submenu > .dropdown-menu {
        top: 0;
        left: 100%;
        margin-left: -1px;
    }

@media (max-width: 991.98px) {
    .dropdown-submenu > .dropdown-menu {
        left: 0;
        margin-left: 0;
    }
}

/* Home news spotlight */
.news-spotlight-section {
    padding: 3rem 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9ff 100%);
}

.news-spotlight-section .section-header {
    gap: 1rem;
}

.news-spotlight-section .section-link {
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.news-spotlight-section .section-link:hover,
.news-spotlight-section .section-link:focus {
    text-decoration: underline;
}

.news-spotlight-section .section-eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.news-spotlight-section .section-title {
    font-weight: 700;
    font-size: 1.85rem;
    color: #0b1a45;
}

.news-feature-card {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    background-color: #101735;
    color: #ffffff;
    box-shadow: 0 20px 40px rgba(16, 23, 53, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.news-feature-card .feature-image {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    background-color: #18224d;
    filter: brightness(0.75);
}

.news-feature-card::after {
    content: "";
    position: absolute;
    inset: 0;
    transition: opacity 0.2s ease;
}

.news-feature-card:hover,
.news-feature-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 28px 48px rgba(16, 23, 53, 0.32);
}

.news-feature-card:hover::after,
.news-feature-card:focus-visible::after {
    opacity: 0.85;
}

.news-feature-card .feature-content {
    position: relative;
    z-index: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
    justify-content: flex-end;
}

.feature-meta {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}

.feature-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
}

.feature-description {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.news-list-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(15, 30, 90, 0.08);
    box-shadow: 0 12px 24px rgba(15, 30, 90, 0.08);
}

.news-list-card ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0;
}

.news-list-item {
    display: flex;
    gap: 1rem;
    width: 100%;
    background: transparent;
    border: none;
    text-align: left;
    padding: 0.35rem 0.25rem;
    border-radius: 14px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.news-list-item:hover,
.news-list-item:focus-visible {
    background: rgba(11, 26, 69, 0.06);
    transform: translateX(4px);
}

.news-list-item .thumb {
    width: 120px;
    height: 72px;
    background: linear-gradient(135deg, #4f6bdc 0%, #8c9df5 100%);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.news-list-item .body {
    flex: 1;
}

.news-meta {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #5c6b92;
    margin-bottom: 0.35rem;
}

.news-title {
    font-size: 1rem;
    font-weight: 600;
    color: #0b1a45;
    margin-bottom: 0.25rem;
}

.news-summary {
    font-size: 0.85rem;
    color: #5b6785;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-empty {
    border: 1px dashed rgba(11, 26, 69, 0.2);
    border-radius: 18px;
    background: rgba(250, 251, 255, 0.7);
}

.news-feature-card.shimmer,
.news-list-card.shimmer {
    background: linear-gradient(90deg, rgba(225, 230, 245, 0.2) 0%, rgba(225, 230, 245, 0.8) 50%, rgba(225, 230, 245, 0.2) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.2s ease-in-out infinite;
    border-radius: 24px;
    min-height: 320px;
}

.news-list-card.shimmer {
    min-height: 320px;
}

@media (max-width: 991.98px) {
    .news-feature-card {
        min-height: 300px;
    }

    .news-list-card {
        margin-top: 0.5rem;
    }
}

@media (max-width: 575.98px) {
    .news-feature-card .feature-content {
        padding: 1.75rem;
    }

    .news-feature-card {
        min-height: 280px;
    }

    .news-title {
        font-size: 0.95rem;
    }

    .news-list-item .thumb {
        width: 80px;
        height: 64px;
    }
}

/* Quick access catalogue */
.quick-access-section {
    background: linear-gradient(180deg, #f6f8ff 0%, #ffffff 100%);
    padding: 3rem 0;
}

.quick-access-section .section-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    max-width: 620px;
}

.quick-access-section .section-eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.quick-access-section .section-title {
    font-weight: 700;
    font-size: 1.85rem;
    color: #0b1a45;
}

.quick-access-section .section-description {
    font-size: 1rem;
    color: #5b6785;
    margin-top: 0.75rem;
}

.quick-access-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
}

@media (max-width: 480px) {
    .quick-access-grid {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
        gap: 1rem;
    }

    .quick-access-card {
        min-height: 150px;
        padding: 1.25rem 0.75rem;
    }
}

@media (min-width: 576px) {
    .quick-access-grid {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }
}

@media (min-width: 768px) {
    .quick-access-grid {
        grid-template-columns: repeat(4, minmax(160px, 1fr));
    }
}

.quick-access-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1.5rem 1rem;
    background-color: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(11, 26, 69, 0.08);
    box-shadow: 0 8px 20px rgba(11, 26, 69, 0.06);
    text-align: center;
    color: #0b1a45;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 180px;
    appearance: none;
    -webkit-appearance: none;
}

.quick-access-card:hover,
.quick-access-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(11, 26, 69, 0.12);
    outline: none;
}

.quick-access-card:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(9, 90, 199, 0.35);
}

.quick-access-card.empty {
    border-style: dashed;
    color: #6c757d;
    background: transparent;
    box-shadow: none;
    cursor: default;
}

.quick-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(10, 100, 240, 0.12);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.quick-icon i {
    font-size: 1.9rem;
}

.quick-label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: center;
}

.quick-title {
    font-weight: 600;
    font-size: 1rem;
}

.quick-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 0.15rem 0.65rem;
    border-radius: 999px;
    background: rgba(9, 49, 243, 0.12);
    color: #0b1a45;
    font-size: 0.75rem;
    font-weight: 600;
}

.quick-count.placeholder {
    background: linear-gradient(90deg, rgba(200, 210, 230, 0.35) 0%, rgba(200, 210, 230, 0.9) 50%, rgba(200, 210, 230, 0.35) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.2s ease-in-out infinite;
    color: transparent;
}

.quick-access-card.loading {
    border: 1px solid rgba(11, 26, 69, 0.05);
    box-shadow: none;
    cursor: default;
    min-height: 160px;
}

.quick-access-card.loading .skeleton-icon,
.quick-access-card.loading .skeleton-line {
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(210, 216, 230, 0.2) 0%, rgba(210, 216, 230, 0.7) 50%, rgba(210, 216, 230, 0.2) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.2s ease-in-out infinite;
}

.skeleton-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
}

.skeleton-line {
    width: 70%;
    height: 16px;
}

@keyframes shimmer {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}
