﻿* {
    margin: 0;
    padding: 0;
}

body {
    background-color: white;
    font-family: Caecilia, TheSans, Verdana, sans-serif;
    font-size: 16px;
    display: flex;
    flex-direction: column;
}

.container, .bibinfo-container, .cards-container {
    max-width: 800px;
    margin: 0px 50px 0px 20px;
    justify-content: center;
    margin: auto;
}

.bibinfo-container {
    margin-top: 2%;
}

.book-cover {
    width: 140px;
    height: auto;
    border: 3px solid rgba(0, 0, 0, 0.6);
    border-radius: 3px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Font Faces */
@font-face {
    font-family: 'Caecilia';
    src: url('/webfonts/CaeciliaCom-55Roman.ttf') format('truetype');
}

@font-face {
    font-family: 'TheSans';
    src: url('/webfonts/TheSansB2-5_Plain.woff2') format('woff2'), url('/webfonts/TheSansB2-5_Plain.woff') format('woff');
}

@font-face {
    font-family: 'TheSans Bold';
    src: url('/webfonts/TheSansB2-7_Bold.woff2') format('woff2'), url('/webfonts/TheSansB2-7_Bold.woff') format('woff');
}

.bibinfo-text {
    font-family: 'Caecilia';
    font-size: 90%;
    font-weight: 400;
}

.book-title {
    font-size: 1.6em;
    margin-bottom: 40px;
}

.button-link {
    display: inline-block;
    padding: 4px 12px;
    font-size: 100%;
    line-height: 1.5;
    background-color: #002F5F;
    color: white;
    text-decoration: none;
    border: 2px solid white;
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.3s, border-color 0.3s;
}

    .button-link:active {
        background-color: #003f7f;
        border-color: #003f7f;
    }

.orange-calendar, .green-check {
    width: 15px;
    height: auto;
    margin-right: 5px;
}

.down-arrow {
    width: 20px;
    height: auto;
}

.orange-calendar {
    filter: invert(50%) sepia(96%) saturate(1433%) hue-rotate(2deg) brightness(105%) contrast(102%);
}

.green-check {
    filter: invert(53%) sepia(67%) saturate(517%) hue-rotate(71deg) brightness(93%) contrast(94%);
}

.info-icon {
    height: 18px;
    display: inline-block;
    margin-left: 5px;
    z-index: 1;
}

.status-div {
    display: flex;
    align-items: center;
}

h2, h3 {
    margin: 10px 5px;
}

.bibinfo-container h2, h3 {
    margin: 10px 5px 10px 0px;
}

.top-bar {
    height: 100px;
    background: #33597f;
    border-bottom: 4px solid #acdee6;
    display: flex;
    align-items: center;
}

#su-logo {
    height: 100px;
    width: auto;
    max-width: 100%;
    min-width: 90px;
}

.suHeader {
    background: #002F5F;
    color: white;
    width: 30%;
    padding-right: 1%;
    display: flex;
    justify-content: flex-end;
}

.top-bar h1 {
    margin: 10px 30px;
    color: white;
    font-size: 1.5rem;
    font-weight: 400;
}

#language-flag-desktop {
    margin-left: 25%;
}

.wrapper {
    padding: 10px 2px;
}

.order-group strong {
    display: block;
    margin-bottom: 10px;
}

.details-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

    .details-content .buttons {
        display: flex;
        justify-content: flex-end;
        gap: 2px;
    }

.strong {
    font-weight: 800;
}

    .strong span {
        font-weight: 400;
    }

.medium-strong {
    font-weight: 550;
}

/* Card Styles */

.down-arrow {
    width: 20px;
    height: auto;
    margin-left: auto;
    flex-basis: auto;
}

.up-arrow {
    width: 20px;
    height: auto;
    margin-left: auto;
    flex-basis: auto;
}

.loan-terms {
    display: flex;
    justify-content: flex-end;
}


.card {
    border: 2px solid #cacaca;
    border-radius: 5px;
    margin-bottom: 16px;
    overflow: hidden;
    font-family: 'TheSans';
}

    .card .down-arrow {
        display: inline-block;
    }

    .card .up-arrow {
        display: none;
    }

    .card summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        padding: 16px;
        background-color: #f7f7f7;
    }

    .card[open] .down-arrow {
        display: none;
    }

    .card[open] .up-arrow {
        display: inline-block;
    }

    .card summary::-webkit-details-marker {
        display: none;
    }

.summary-content {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

    .summary-content > div {
        flex: 1 1 30%;
        margin-right: 10px;
    }

.card-details {
    padding: 16px;
    background-color: white;
    line-height: 1.5;
}

#language-flag-mobile {
    display: none;
}

#showInfoModalBtn {
    display: flex;
    border-radius: 40px;
    padding: 10px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

    #showInfoModalBtn:hover {
        background-color: #cecece63;
    }

#loanInfoModal {
    background: white;
    box-shadow: 0 0 10px black;
    border-radius: 2px;
    position: fixed;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    padding: 1%;
    text-align: left;
    padding-left: 1%;
    display: none;
    margin-top: 20px;
    width: 680px;
    max-width: 80%;
    overflow-y: auto;
    max-height: 90%;
}

#loanInfoBackgroundOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    opacity: 0.6;
    display: none;
}

#loanInfoLinkWrapper {
    margin-top: 15px;
}

.close-x-btn {
    float: right;
    border: none;
    cursor: pointer;
    background: transparent;
    color: darkgrey;
    border-radius: 40px;
    font-size: 24px;
    height: 34px;
    width: 34px;
    margin-left: auto;
    transition: background-color 0.3s ease;
}

    .close-x-btn:hover {
        background-color: #cecece63;
    }

.loanInfoHeaderContainer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.loanInfoText {
    padding: 10px;
}

.loanTypesText {
    margin-top: 20px;
}

.loanItemText {
    margin-top: 15px;
}

.starnote {
    color: crimson;
}

/* DESKTOP */
@media only screen and (max-width: 1100px) {
    #language-flag-desktop {
        margin-left: 10%;
        margin-right: 5%;
    }

    .top-bar h1 {
        margin: 10px 30px;
        color: white;
        font-size: 1.2rem;
        font-weight: 400;
    }
}


/* TABLET */

@media only screen and (max-width: 768px) {

    .summary-content {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
    }

    .bibinfo-container {
        margin: 0px 20px 0px 20px;
        width: 95%;
    }

    .cards-container {
        margin: 20px 20px 20px 20px;
        width: 95%;
    }

    .summary-content > div {
        flex: 1 1 100%;
        margin-bottom: 10px;
    }

    .card summary {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* MOBILE */

@media only screen and (max-width: 480px) {

    .button-link {
        margin-right: 20px;
        margin-bottom: 10px;
    }

    .bibinfo-container {
        margin: 0px 20px 0px 20px;
        width: 95%;
    }

    .card {
        margin-right: 20px;
    }

    .cards-container {
        margin: 20px;
        width: 95%;
    }

    .summary-content > div {
        flex: 1 1 100%;
        margin-bottom: 10px;
    }

    .card summary {
        flex-direction: column;
        align-items: flex-start;
    }

    #language-flag-desktop {
        display: none;
    }

    #language-flag-mobile {
        display: block;
        position: absolute;
        right: 10px;
    }

    .book-title {
        margin-top: 30px;
    }

    .order-group {
        display: block;
    }

    .details-content {
        display: grid;
        justify-content: flex-start;
    }

        .details-content .buttons {
            display: flex;
            justify-content: flex-start;
            gap: 0px;
        }

    #loanInfoModal {
        padding: 15px;
    }
}
