@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600&family=Poppins:wght@300&display=swap');

/* set-up */
:root {
    --primary: rgba(255, 184, 0, 1);
    --white: rgba(255, 255, 255, 1);
    --textDarkBold: rgba(0, 0, 0, 0.8);
    --textDarkReguler: rgba(0, 0, 0, .5);
    --gray: rgb(219, 219, 219);
    --darkGray: rgba(146, 146, 146, 0.8);
    --poppins: 'Poppins', sans-serif;
}

/* set-up flex */
.container-login {
    overflow: hidden;
}

/* end set-up flex */

/* ===== LOGIN PAGE ===== */
.login-left {
    height: 99%;
    margin-left: .2rem;
    border-radius: 20px;
    background-color: var(--primary);
    overflow: hidden;
}

.login-left img {
    filter: drop-shadow(2px 2px 10px rgba(0, 0, 0, .3));
}

.login-left p {
    width: 70%;
    color: var(--white);
    text-align: center;
    font-size: 1.8rem;
    font-weight: bold;
}

.login-right h1 {
    font-size: 3rem;
}

.login-right form .user-box {
    position: relative;
}

.login-right form .user-box input {
    width: 100%;
    padding: 10px 0;
    font-size: 1rem;
    color: black;
    margin-bottom: .9rem;
    border: none;
    border-bottom: 1px solid black;
    outline: none;
    background: transparent;
}

.login-right form .user-box label {
    position: absolute;
    top: 0;
    left: 0;
    padding: 10px 0;
    font-size: 16px;
    color: black;
    pointer-events: none;
    transition: .5s;
}

.login-right form .user-box input:focus~label,
.login-right form .user-box input:valid~label {
    top: -12px;
    left: 0;
    font-size: .7rem;
}

.form-group {
    margin-bottom: 1rem;
}

/* ===== HOME PAGE ===== */

nav .searchbar {
    width: 50%;
    color: var(--textDarkReguler);
    padding: 5px 15px;
    border-radius: 50px;
    background-color: var(--gray);
}

nav input {
    width: 100%;
    margin-left: 1rem;
    border: none;
    outline: none;
    color: var(--textDarkReguler);
    background-color: var(--gray);
}

nav p {
    color: var(--textDarkReguler);
}

nav .profil a {
    text-decoration: none;
}

.dropdown:hover>.dropdown-menu {
    display: block;
}

.dropdown .dropdown-menu {
    position: absolute;
    right: 0rem;
}

.dropdown>.dropdown-toggle:active {
    /*Without this, clicking will make it sticky*/
    pointer-events: none;
}

/* === CAROUSEL / SLIDER === */
.slider-inner {
    gap: 1rem;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    overflow-x: scroll;
    scroll-behavior: smooth;
}

.slider-item {
    gap: 8rem;
    flex: 0 0 100%;
    scroll-snap-align: start;
    padding: 1.5rem;
    border-radius: 15px;
    background-color: var(--primary);
}

.slider-image {
    max-width: 200px;
    margin-right: 2rem;
}

.slider-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 3px 3px 20px rgba(0, 0, 0, .3);
}

.slider-text-mobile {
    display: none;
    color: var(--white);
}

.slider-indicators {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    gap: 10px;
}

.slider-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: gray;
    cursor: pointer;
}

.slider-indicator.active {
    background-color: var(--primary);
}

/* ===== MAIN ===== */
/* ===== new book ===== */
.new-book,
.content {
    margin: 1rem auto;
}

.new-book-items {
    display: flex;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    gap: 1rem;
}

.new-book-item,
.book {
    max-width: 160px;
    text-align: center;
    line-height: 15px;
}

.new-book-item img,
.book-image img {
    width: 160px;
}

.book-text p {
    font-size: .9rem;
}

.book-text small {
    font-size: .7rem;
}

/* ===== CONTENT ===== */
.bar-category::-webkit-scrollbar {
    background-color: transparent;
}

.bar-category {
    white-space: nowrap;
    overflow-x: scroll;
}

.bar-category a {
    display: inline-block;
    text-decoration: none;
    padding: 5px;
    color: var(--textDarkReguler);
}

.bar-category a.active,
.bar-category a:hover {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}


.books {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    max-height: 1000px;
    overflow-y: scroll;
}

.books a,
.new-book-items a,
.lainnya-body a,
.slider-item a {
    text-decoration: none;
    color: var(--textDarkBold);
}

.slider-item a {
    color: var(--white);
}

.book-text-content small {
    color: var(--darkGray);
}

.book-text-mobile {
    display: none;
}

/* ===== PROFIL & PENGATURAN HOME ===== */
.profil-pengaturan-page {
    color: var(--white);
    font-family: var(--poppins);
}

.profil-banner {
    padding: 5rem 0;
    background: #18181B url('../image/background/pattern.svg') no-repeat center center/cover;
}

.nama h1 {
    font-size: 48px;
}

/* ===== DETAIL BUKU DESKTOP ===== */
.mobile-detail {
    display: none;
}

.desktop-detail .wrapper {
    display: flex;
    gap: 1rem;
}

.side-desktop {
    flex: 1;
    position: sticky;
    top: 1rem;
    z-index: 2;
}

.image-wrapper {
    padding: 1rem;
    box-sizing: border-box;
    border-radius: 5px;
    box-shadow: 1px 1px 10px rgba(0, 0, 0, .2);
}

.content-desktop {
    flex: 3;
    max-height: 75vh;
    overflow-y: auto;
}

.content-desktop p {
    text-align: justify;
}

.content-desktop::-webkit-scrollbar,
.lainnya-body::-webkit-scrollbar {
    width: 0;
}

.detail-desktop {
    line-height: 14px;
}

.detail-desktop small {
    font-weight: bold;
    font-size: 10px;
    color: var(--darkGray);
}

.detail-desktop p {
    font-size: 14px;
}

.terkait-desktop {
    flex: 1;
}

.lainnya-body {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.lainnya-item-image {
    max-width: 50px;
}

.lainnya-item-image img {
    width: 100%;
}

.lainnya-item-body {
    line-height: 14px;
}

.lainnya-item-body h6 {
    font-size: 12px;
}

.lainnya-item-body small {
    font-size: 11px;
}


/* ===== QUOTES ===== */
.quotes {
    margin: 3rem auto;
    padding: 2rem 3rem;
    max-width: 98%;
    border-radius: 15px;
    background-color: var(--primary);
}

.quote-image {
    transform: translateY(2rem);
}

footer {
    padding: 1rem 0 0 0;
    font-family: var(--poppins);
    border-top: 1px solid var(--gray);
}

/* ======== DASHBOARD PAGE ======== */
.main-dashboard {
    background-color: var(--gray);
}

aside {
    flex: 1;
    position: relative;
    background-color: #fff;
    z-index: 2;
    overflow: hidden;
}

.dropdown-menu {
    width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
}

.dropdown-menu li {
    margin: 0 .5rem;
}

.dropdown-menu a {
    margin: 0 !important;
}

.side-brand {
    border-bottom: 1px solid var(--gray);
}

.side-items {
    height: 100%;
    margin-top: 3rem;
}

.side-items li a {
    display: block;
    width: 100%;
    padding: .3rem .8rem;
    margin: 1rem .5rem 0 -9%;
    border-radius: 4px;
}

.side-items li.log-out {
    width: 85%;
    bottom: 4.5rem;
    position: absolute;
}

.side-footer p {
    position: absolute;
    font-size: .6rem;
    padding: 1rem 1rem 0 1rem;
    border-top: 1px solid var(--gray);
    bottom: 0;
    left: .6rem;
}

.contents {
    flex: 5;
    position: relative;
    overflow-y: auto;
}

.contents nav {
    background-color: #fff;
    box-shadow: 1px 1px 10px rgba(0, 0, 0, .5);
    z-index: 1;
}

.content-dashboard {
    min-height: 91vh;
    padding: 3rem 2rem;
    box-sizing: border-box;
    transform: translateY(-.9rem);
    background-color: var(--gray);
}

.content-dashboard .card-profile {
    width: 60%;
}


/* ======== RESPONSIVE ======== */
@media only screen and (max-width: 768px) {
    .container-login {
        flex-direction: column;
    }

    .login-left {
        height: 50%;
        margin: 0;
        padding: 0 1rem;
        border-radius: 0;
    }

    .login-left img {
        width: 200px;
    }

    .login-left p {
        width: 100%;
        font-size: 1.2rem;
    }

    .login-right {
        transform: translateY(-2rem);
        padding: 1.5rem;
        background-color: var(--white);
        border-radius: 15px 15px 0 0;
    }

    .login-right h1 {
        font-size: 2rem;
    }

    .login-right p {
        font-size: 1rem;
    }

    .login-right form {
        width: 100%;
    }

    .login-right .form-header {
        margin-bottom: 1.4rem;
    }

    nav .navBrand h3 {
        font-size: 1.2rem;
    }

    .searchbar input {
        margin-left: 0;
    }

    .carousel {
        gap: 1rem;
        padding: .8rem .8rem .8rem 1rem;
    }

    .carousel-img {
        width: 100px;
    }

    .carousel-img img {
        width: 100%;
    }

    .carousel-content {
        display: none;
    }

    .carousel-content-mobile {
        display: block;
        line-height: 14px;
    }

    .slider-inner {
        gap: .5rem;
    }

    .slider-item {
        flex: 0 0 100%;
        gap: .5rem;
        border-radius: 5px;
        padding: .8rem 0 .8rem .8rem;
        box-sizing: border-box;
    }

    .slider-image {
        max-width: 100px;
        margin-right: 1rem;
    }

    .slider-image img {
        width: 100%;
        border-radius: 3px;
    }

    .slider-text {
        display: none;
    }

    .slider-text-mobile {
        display: block;
        line-height: 14px;
    }

    .slider-text-mobile th {
        padding-right: 1rem;
    }

    .slider-text-mobile th,
    .slider-text-mobile td {
        font-size: .8rem;
    }

    .new-book .title h4 {
        margin-bottom: .5rem;
        font-size: 1rem;
    }
    

    .new-book h4,
    .new-book-items {
        margin: 0 .3rem;
        gap: .3rem;
    }

    .new-book-item .book-cover {
        width: 80px;
    }

    .new-book-item img,
    .book-cover img {
        width: 100%;
    }

    .book-text {
        width: 80px;
        margin-top: .5rem;
    }

    .new-book .book-text p.judul {
        font-size: .65rem;
        line-height: 12px;
    }

    .new-book .book-text small {
        color: var(--textDarkReguler);
        font-size: .7rem;
    }

    .content {
        padding: .3rem;
    }

    .books {
        flex-direction: row;
        width: 100%;
        gap: 1rem;
    }

    .book-text-content {
        display: none;
    }

    .book {
        display: flex;
        align-items: center;
        max-width: 400px;
        width: 100%;
    }

    .book-image {
        max-width: 100px;
    }

    .book-image img {
        width: 100%;
    }

    .book-text-mobile {
        display: block;
        text-align: left;
        margin-left: 1.5rem;
        line-height: 5px;
        width: 100%;
    }

    .book-text-mobile p {
        color: var(--darkGray);
    }

    .quotes {
        padding: .5rem;
        border-radius: 5px;
    }

    .quote-text h1 {
        font-size: 1.2rem;
    }

    .quote-image {
        transform: translateY(.5rem);
    }

    .quote-image img {
        width: 200px;
    }

    footer p {
        font-size: .8rem;
    }


    /* ===== detail buku  */
    .mobile-detail {
        max-height: 100vh;
        display: block;
    }

    .desktop-detail{
        display: none;
    }


    .back-button {
        position: absolute;
        top: 10px;
        left: 10px;
    }
    
    .back-button button {
        color: var(--gray);
        border: none;
        background-color: transparent;
    }

    .mobile-image {
        display: flex;
        align-items: center;
        justify-content: center;
        max-width: 100%;
        height: 350px;
        overflow: hidden;
    }

    .mobile-image img {
        width: 100%;
        object-fit: cover;
    }

    .mobile-body {
        padding: .5rem 1rem 1rem 1rem;
        transform: translateY(-1.5rem);
        border-radius: 30px 30px 0 0;
        box-sizing: border-box;
        background-color: var(--white);
    }

    .mobile-body-header {
        display: flex;
        justify-content: center;
        margin-bottom: 2rem;
    }

    .button-rounded {
        width: 30%;
        height: 8px;
        border-radius: 50px;
        background-color: var(--darkGray);
    }

    .mobile-data th {
        color: var(--textDarkReguler);
        padding-right: .8rem;
    }

    .mobile-data th,
    .mobile-data td {
        font-size: 1.3rem;
    }

    .mobile-deskripsi p {
        text-align: justify;
    }

}