/* Same design as lavedonio.com (github.com/Lavedonio/site_lavedonio_django):
   colors, fonts, navbar, page headers and footer. */

/* ------ General Styles ------ */
:root {
    /* The navbar is at least 9vh tall, but its content (brand + padding) needs
       5.375rem, which is more on most phones. main.js refines it with the real height. */
    --navbar-height: max(9vh, 5.375rem);

    /* Solid colors */
    --navbar-background-color: #000124;
    --navbar-text-color: #CFCFCF;
    --offcanvas-background-color: #000012;
    --footer-background-color: #222326;
    --footer-text-color: #E8F2F8;
    --accent-color: #000599;

    /* Colors with transparency */
    --navbar-background-color-transparent: #000124B3;
    --footer-text-color-transparent: #E8F2F833;
}

/* Dark Mode color variations */
html[data-bs-theme="dark"] {
    --navbar-background-color: #000124;
    --offcanvas-background-color: #000012;
    --footer-background-color: #3A3B41;
    --navbar-background-color-transparent: #040520B3;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


/* ------ Fonts ------ */
.font-poppins {
    font-family: 'Poppins', arial, tahoma, sans-serif;
}

.brand-font {
    font-family: 'Dancing Script', cursive;
}


/* ------ Bootstrap Overrides ------ */
.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--accent-color);
}

.btn-accent {
    --bs-btn-color: #FFFFFF;
    --bs-btn-bg: var(--accent-color);
    --bs-btn-border-color: var(--accent-color);
    --bs-btn-hover-color: #FFFFFF;
    --bs-btn-hover-bg: #0007C2;
    --bs-btn-hover-border-color: #0007C2;
    --bs-btn-active-color: #FFFFFF;
    --bs-btn-active-bg: #0007C2;
    --bs-btn-active-border-color: #0007C2;
    --bs-btn-disabled-bg: var(--accent-color);
    --bs-btn-disabled-border-color: var(--accent-color);
}

/* .icon-link is made for SVG icons. With the icon font, the glyph sits on the
   baseline of a line taller than its 1em box, so it's centered in the box instead */
.icon-link > i.bi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/* ------ Navbar ------ */
#main-nav {
    min-height: var(--navbar-height);
    background-color: var(--navbar-background-color);
}

#main-nav.scrolled-down {
    transform: translateY(-100%);
    transition: all 0.3s ease-in-out;
}

#main-nav.scrolled-up {
    transform: translateY(0);
    transition: all 0.3s ease-in-out;
}

.navbar-brand--font-size {
    font-size: 2.5rem;
}

.navbar-brand__suffix {
    font-family: 'Poppins', arial, tahoma, sans-serif;
    font-size: 1rem;
    color: var(--navbar-text-color);
}

.navbar--text-color {
    color: var(--navbar-text-color);
}

.offcanvas--background-color {
    background-color: var(--offcanvas-background-color);
}

.offcanvas-brand--font-size {
    font-size: 1.75rem;
}


/* ------ Messages ------ */
.messages-container {
    top: var(--navbar-height);
    z-index: 1090;
}


/* ------ Footer ------ */
.custom-footer {
    background-color: var(--footer-background-color);
    color: var(--footer-text-color);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.custom-footer a {
    color: var(--footer-text-color);
}

.custom-footer__top {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.custom-footer__bottom {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 1.5rem;
}

.custom-footer__brand {
    color: var(--footer-text-color);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.custom-footer__info {
    display: block;
    text-align: center;
    color: var(--footer-text-color);
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 0.25rem;
}

.custom-footer__social {
    font-size: 1.5rem;
    opacity: 0.7;
    transition: opacity 200ms ease;
}

.custom-footer__social:hover {
    opacity: 1;
}


/* ------ Hero (home page) ------ */
.hero-main {
    display: flex;
    align-items: center;
    margin-top: calc(-1 * var(--navbar-height));
    padding-top: var(--navbar-height);
    min-height: 100svh;
}

.hero-main__text {
    line-height: 1.4;
    margin-bottom: 1.5rem;
}

.background-gradient {
    background-image: radial-gradient(circle at right bottom, var(--footer-text-color), var(--navbar-background-color), var(--offcanvas-background-color));
}

.hero-feature {
    color: var(--footer-text-color);
}

.hero-feature > .bi {
    font-size: 1.75rem;
}

.line {
    border: 2px solid #333;
    width: 100px;
    margin-top: 23px;
    margin-bottom: 20px;
    margin-left: 5px;
}

.line--light {
    border-color: var(--footer-text-color);
}


/* ------ Page headers ------ */
/* Goes behind the navbar, but its content starts below it */
.page-header {
    display: flex;
    align-items: stretch;
    margin-top: calc(-1 * var(--navbar-height));
    padding-top: var(--navbar-height);
    min-height: calc(12vh + var(--navbar-height));
    background-image: linear-gradient(270deg, var(--footer-text-color), var(--navbar-background-color), var(--offcanvas-background-color));
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

@media screen and (min-width: 1200px) {
    .page-header {
        min-height: calc(15vh + var(--navbar-height));
    }
}

.page-header__heading {
    color: var(--footer-text-color);
    font-weight: normal;
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.page-header__subheading {
    max-width: 48rem;
    margin-bottom: 1.5rem;
    color: var(--footer-text-color);
    font-size: 1.0625rem;
    line-height: 1.5;
}

.page-header .breadcrumb {
    --bs-breadcrumb-divider-color: var(--footer-text-color);
    --bs-breadcrumb-item-active-color: var(--footer-text-color);
    margin-bottom: 0;
}

.page-header .breadcrumb a {
    color: var(--footer-text-color);
}

.section-heading {
    font-family: 'Poppins', arial, tahoma, sans-serif;
    font-weight: normal;
    font-size: 1.5rem;
}


/* ------ Common blocks ------ */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--bs-secondary-color);
}

.empty-state > .bi {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 3rem;
}

.narrow-section {
    max-width: 640px;
    margin: 2.5rem auto;
}

.login-section {
    max-width: 420px;
    margin: 3rem auto;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}


/* ------ Tags ------ */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.625rem;
    border: 2px solid transparent;
    border-radius: 50rem;
    background-color: var(--accent-color);
    color: #FFFFFF;
    font-size: 0.8125rem;
    line-height: 1.6;
    text-decoration: none;
}

.tag-chip:hover,
.tag-chip:focus {
    color: #FFFFFF;
    filter: brightness(1.2);
}

.tag-chip--active {
    border-color: var(--bs-emphasis-color);
}


/* ------ File browser ------ */
.file-table td,
.file-table th {
    vertical-align: middle;
}

.file-table__name {
    min-width: 12rem;
    overflow-wrap: anywhere;
}

/* The item's name, not its tags */
.file-table__name > a {
    color: var(--bs-emphasis-color);
    text-decoration: none;
}

.file-table__name > a:hover {
    text-decoration: underline;
}

.file-icon {
    font-size: 1.25rem;
    margin-right: 0.5rem;
}

.file-icon--folder {
    color: #E0A100;
}

.file-icon--link {
    color: #0D6EFD;
}

.visibility-badge {
    font-weight: normal;
}

.quota-bar {
    height: 0.5rem;
}

.copy-field {
    font-family: var(--bs-font-monospace);
    font-size: 0.875rem;
}

.preview-image {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

.share-list {
    max-height: 14rem;
    overflow-y: auto;
    padding: 0.5rem 0.75rem;
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
}
