﻿/* --------------------------------------------- */
/* RONZINO — LATIN CHARACTERS                   */
/* --------------------------------------------- */

@font-face {
    font-family: "Ronzino";
    src: url("/css/fonts/Ronzino-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Ronzino";
    src: url("/css/fonts/Ronzino-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Ronzino";
    src: url("/css/fonts/Ronzino-MediumOblique.woff2") format("woff2");
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Ronzino";
    src: url("/css/fonts/Ronzino-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Ronzino";
    src: url("/css/fonts/Ronzino-BoldOblique.woff2") format("woff2");
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Ronzino";
    src: url("/css/fonts/Ronzino-Oblique.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("/css/fonts/Inter-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Inter";
    src: url("/css/fonts/Inter-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: "Inter";
    src: url("/css/fonts/Inter-MediumItalic.woff2") format("woff2");
    font-weight: 500;
    font-style: italic;
}

@font-face {
    font-family: "Inter";
    src: url("/css/fonts/Inter-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: "Inter";
    src: url("/css/fonts/Inter-BoldItalic.woff2") format("woff2");
    font-weight: 700;
    font-style: italic;
}

@font-face {
    font-family: "Inter";
    src: url("/css/fonts/Inter-Italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
}


@font-face {
    font-family: "Vetrino";
    src: url("/css/fonts/Vetrino.woff2") format('woff2');
}

/* Wrapped in a cascade layer so Tailwind's utilities (@layer utilities) can
   override it. Unlayered rules always beat layered ones, which otherwise
   prevents Tailwind's p-* / m-* spacing utilities from applying. This file
   loads before css/tailwind.css, so `legacy` sorts below Tailwind's layers. */
@layer legacy {
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
}

:root {
    --color-bm-light: #FFF7E9;
    --color-bm-header-light: #FFF7E9E5;
    --color-bm-black: #282217;
    --color-bm-dark: #3F3729;
    --color-bm-birch: #463C2A;
    --color-bm-dark-descr: #3F372987;
    --color-bm-dark-descr-2: #3F3729A8;
    --color-bm-dark-price: #3F3729D1;
    --color-bm-header-dark: #282217E5;
    --color-bm-solitaire: #F3E3C9;
    --color-bm-rotunda-gold: #F3E0BF;
    --color-bm-moccasin: #FBE1B4;
    --color-bm-light-beige: #E8D1A9;
    --color-bm-light-descr: #F3E0BF80;
    --color-bm-light-descr-2: #F3E0BFA8;
    --color-bm-light-price: #F3E0BFE5;
    --color-bm-green: #7BBF47;
    --color-bm-light-green: #EFFFDBE6;
    --color-bm-wild-watermelon: #FF6668;
    --color-bm-red: #DB3526;
    --color-bm-blue: #1E61C5;
    --color-bm-light-blue: #EFF6FFE6;
    --color-bm-pastel-yellow: #F6DC84;
    --color-bm-deep-coral: #E2502B;
    --color-bm-link: #BD6E20;
    --color-bg-1: var(--color-bm-solitaire);
    --color-bg-1-alt: var(--color-bm-dark);
    --color-bg-2: var(--color-bm-light);
    --color-bg-2-alt: var(--color-bm-black);
    --color-text-primary: var(--color-bm-dark);
    --color-text-primary-alt: var(--color-bm-light);
    --color-text-secondary: var(--color-bm-dark-descr);
    --color-text-secondary-alt: var(--color-bm-dark-descr-2);
    --color-border: var(--color-bm-dark);
    --color-border-alt: var(--color-bm-black);
    --border: 1.5px solid var(--color-text-primary);
    --border-muted: 1.5px solid var(--color-text-secondary-alt);
}

div:has(> input[type="hidden"][name="__VIEWSTATE"]),
div:has(> input[type="hidden"][name="__VIEWSTATEGENERATOR"]) {
    display: none;
}

.no-wrap {
    white-space: nowrap;
}

a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

textarea, input {
    font-family: inherit;
}

.bm-link {
    font-weight: 700;
    font-size: 14px;
    line-height: 165%;
    letter-spacing: 0%;
    text-decoration: underline;
    text-decoration-style: solid;
    text-decoration-offset: 0%;
    text-decoration-thickness: 10%;
    color: var(--color-bm-link);
}

.t1, .t2, .t3, .t4, .t5, .t6,
h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    line-height: 150%;
    letter-spacing: 0%;
}

.t1, .t2, h1, h2 {
    font-family: DM Serif Display, serif;
}

.t1, h1 {
    font-family: "DM Serif Display", serif;
    font-size: 32px;
}

.t2, h2 {
    font-size: 22px;
}

.t3, h3 {
    font-weight: 700;
    font-size: 18px;
}

.t4, h4 {
    font-weight: 400;
    font-size: 18px;
}

.t5, h5 {
    font-weight: 700;
    font-size: 16px;
}

.t6, h6 {
    font-weight: 400;
    font-size: 16px;
}

.title-1 {
    font-family: DM Serif Display, serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 150%;
    letter-spacing: 0%;
}

.title-3 {
    font-weight: 500;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0%;
}

.text-1 {
    font-weight: 400;
    font-size: 16px;
    line-height: 150%;
    letter-spacing: 0%;
}

.text-regular, p {
    font-weight: 400;
    font-size: 14px;
    line-height: 150%;
    letter-spacing: 0%;
}

.text-bold, strong {
    font-weight: 700;
    font-size: 14px;
    line-height: 150%;
    letter-spacing: 0%;
}

.text-2-regular {
    font-weight: 400;
    font-size: 14px;
    line-height: 165%;
    letter-spacing: 0%;
}

.text-2-bold {
    font-weight: 700;
    font-size: 14px;
    line-height: 165%;
    letter-spacing: 0%;
}

.text-3-regular {
    font-weight: 400;
    font-size: 14px;
    line-height: 150%;
}

.bm-p1 {
    font-weight: 400;
    font-size: 12px;
    line-height: 150%;
}

ul li ul {
    padding-top: .5rem;
}

ul li ul li {
    margin-left: 1rem;
}

ul {
    padding: .5rem 0;
}

ul li {
    margin-left: 2rem;
}

li:not(:last-child) {
    margin-bottom: .25rem;
}

.static-page-img {
    max-height: 400px;
    width: auto;
    border-radius: 12px;
}

body {
    font-family: "Ronzino", "Inter", Arial;
    background-color: var(--color-bm-solitaire);
    color: var(--color-text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex-grow: 1;
}

.mobile-only,
.mobile-only-f {
    display: none !important;
}

.desktop-only-f {
    display: flex;
}

.layout {
    display: grid;
    padding: 1.5rem;
    height: 100%;
}

.one-column {
    max-width: 1040px;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.one-column__content {
    background-color: var(--color-bg-2);
    border-radius: 16px;
    padding: 1.5rem;
}

.one-column.fullscreen {
    max-width: revert;
    width: 100%;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background-color: transparent;
}

.two-columns {
    grid-template-columns: 1040px 330px;
    gap: 1.5rem;
}

.three-columns {
    grid-template-columns: 330px minmax(400px, 684px) 330px;
    gap: 1rem;
}

.main-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.main-column__content {
    background-color: var(--color-bg-2);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.side-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

    .side-column > div,
    .side-column > .uc-card {
        padding: .5rem;
        background-color: var(--color-bg-2);
        border-radius: 12px;
        width: 100%;
    }

    .side-column .books-carousel-container {
        padding: 1rem;
    }

@media (max-width: 1440px) {
    .layout {
        padding: 1rem;
    }

    .two-columns {
        grid-template-columns: minmax(360px, 90vw) 330px;
    }
}

@media (max-width: 1000px) {

    .layout {
        padding: 0;
    }

    .two-columns,
    .three-columns {
        display: flex;
        flex-direction: column;
        width: 100vw;
    }

    body, header {
        background-color: var(--color-bg-2);
    }

    .desktop-only,
    .desktop-only-f {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    .mobile-only-f {
        display: flex !important;
    }

    .book-details-header {
        border-bottom: 1px solid #3F372980;
    }

    .side-column {
        display: none;
    }
}

.styled-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease, color 0.2s ease, border 0.2s ease-out;
    height: min-content;
    background: none;
    text-decoration: none;
    color: var(--color-text-primary);
}

    .styled-btn.disabled {
        opacity: 0.6;
        pointer-events: none;
    }

    /* Wraps the icon so the counter bubble can anchor to the icon's corner. The bubble lives
       here rather than on the icon itself because the icon uses a CSS mask, which would clip
       its pseudo-element. Keeping it on the icon (not the button) means the bubble stays on
       the icon even when the button also has a text label. */
    .icon-badge-wrap {
        display: inline-flex;
    }

        .icon-badge-wrap[data-counter-enabled="true"] {
            position: relative;
        }

        .icon-badge-wrap[data-counter-enabled="true"]::after {
            content: attr(data-counter-bubble-text);
            position: absolute;
            top: -2px;
            right: -3px;
            padding: 0 5px;
            background: var(--color-bg-1-alt);
            color: var(--color-text-primary-alt);
            font-family: 'Roboto';
            font-size: 12px;
            border-radius: 64px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 1px 4px rgba(0,0,0,0.15);
            pointer-events: none;
            z-index: 1;
            min-width: 8px;
        }

        /* Notification counters (header bell + side-drawer item) use the accent red; other
           counters (e.g. messages) keep the default bubble colour. */
        .notification-counter .icon-badge-wrap[data-counter-enabled="true"]::after {
            background: var(--color-bm-red);
        }

.btn-standard {
    background-color: var(--color-bg-1);
}

    .btn-standard:hover {
        color: var(--color-text-primary-alt);
        background-color: var(--color-bg-1-alt);
    }

    .btn-standard:active {
        color: var(--color-text-primary-alt);
        background-color: var(--color-bg-2-alt);
    }

.btn-outlined {
    background-color: transparent;
    outline: var(--border);
}

    .btn-outlined:hover,
    .btn-outlined.active {
        color: var(--color-text-primary-alt);
        background-color: var(--color-bg-1-alt);
    }

        .btn-outlined:hover .text-regular,
        .btn-outlined.active .text-regular {
            color: var(--color-text-primary-alt);
        }

.btn-beige {
    background-color: var(--color-bg-1);
}

    .btn-beige:hover {
        color: var(--color-text-primary-alt);
        background-color: var(--color-bg-1-alt);
    }

    .btn-beige:active {
        background-color: var(--color-bg-2-alt);
    }

.btn-dark {
    background-color: var(--color-bg-1-alt);
    color: var(--color-text-primary-alt);
}

    .btn-dark span {
        color: var(--color-text-primary-alt);
    }

    .btn-dark:hover {
        background-color: var(--color-bg-2-alt);
    }

.btn-transperant {
    background-color: transparent;
}

.btn-bg-gradient {
    color: var(--color-text-primary-alt);
    background: radial-gradient(50% 50% at 50% 50%, #785B27 0%, #3F3729 100%);
}

.btn-1 {
    border-radius: 8px;
    padding: 7px 14px;
}

    .btn-1.btn-icon {
        padding: 0;
    }

        .btn-1.btn-icon .icon {
            height: 30px;
            width: 30px;
            text-decoration: none;
            color: currentColor;
        }

    .btn-1.btn-icon-medium {
        padding: 0;
    }

        .btn-1.btn-icon-medium .icon {
            height: 24px;
            width: 24px;
            text-decoration: none;
            color: currentColor;
        }

    .btn-1.large {
        height: 2.75rem;
        padding: 10px 16px;
    }

        .btn-1.large span {
            font-size: 18px;
        }

.btn-2 {
    background: none;
    height: 36px;
    border: 2px solid transparent;
}

    .btn-2:hover,
    .btn-2.active,
    .btn-2.current {
        color: var(--color-text-primary);
        background-color: transparent;
        border-bottom: 2px solid var(--color-text-primary);
    }

    .btn-2 .icon {
        height: 1.5rem;
        width: 1.5rem;
    }

    .btn-2 .text-regular {
        font-size: 16px;
    }

.btn-3 {
    border-radius: 15px;
    padding: 5px 14px;
    align-content: center;
    min-height: 30px;
}

.btn-4 {
    min-height: 24px;
}

.btn-5 {
    color: var(--color-text-primary);
    border-radius: 8px;
    padding: 7px 10px;
    background: radial-gradient(50% 50% at 50% 50%, #785B27 0%, #3F3729 100%);
}

    .btn-5 .icon {
        color: currentColor !important;
    }

.btn-6 {
    height: 40px;
    width: 40px;
    border-radius: 50%;
}

    .btn-6:hover span {
        color: var(--color-text-primary-alt);
    }

    .btn-6:not(.no-shadow) {
        box-shadow: 0px 6px 11.9px 0px #00000040;
    }

    .btn-6 .text-regular {
        display: none;
    }

    .btn-6 .icon {
        height: 24px;
        width: 24px;
    }

.bm-input-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    border: var(--border);
    border-radius: 6px;
    padding: 4px 10px;
    transition: all 0.25s ease-out;
}

    .bm-input-container.error {
        border: 1.5px solid var(--color-bm-red);
    }

        .bm-input-container.error:hover {
            border-color: var(--color-bm-red);
            box-shadow: 0 2px 6px rgba(0,0,0,0.1);
        }

.validation-error {
    color: var(--color-bm-red) !important;
    font-weight: 400;
    font-size: 14px;
}

.bm-input-label.error {
    color: var(--color-bm-red);
}

.bm-input-container[data-disabled="true"] {
    opacity: 0.5;
    pointer-events: none;
}

.bm-input-container.compact {
    height: 30px;
}

.bm-input-container.standard {
    height: 44px;
}

    .bm-input-container.standard input {
        width: 100%;
        height: 100%;
        font-weight: 400;
        font-size: 16px;
        line-height: 100%;
        letter-spacing: 0%;
    }

.bm-input-container:hover {
    border-color: var(--color-border-alt);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.bm-text-input {
    border: none;
    outline: none;
    font-size: 14px;
    background-color: transparent;
    color: var(--color-text-primary);
}

.bm-input-container .icon-left {
    order: -1;
    margin-right: 8px;
}

.bm-input-container .icon-right {
    margin-left: 8px;
}

    .bm-input-container .icon-left.icon,
    .bm-input-container .icon-right.icon {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
    }

.bm-search-icon {
    margin-left: 6px;
    color: #444;
    cursor: pointer;
    transition: color 0.25s ease-out;
}

.bm-input-container:hover .bm-search-icon {
    color: #000;
}

.bm-input-label {
    display: flex;
    align-items: center;
    gap: .5rem;
    line-height: 130%;
}

input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    background-color: var(--color-bg-2);
    margin: 0;
    font: inherit;
    color: currentColor;
    width: 0.875rem;
    height: 0.875rem;
    border: 0.15em solid currentColor;
    border-radius: 4px;
    display: grid;
    place-content: center;
}

input[type="checkbox"]:checked {
    background-color: var(--color-bg-1-alt);
}

input[type="checkbox"]::before {
    content: "";
    width: 0.65em;
    height: 0.65em;
    transform: scale(0);
    box-shadow: inset 1em 1em var(--color-bm-light);
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.badge {
    height: 26px;
    opacity: 1;
    border-radius: 13px;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    width: min-content;
    text-align: center;
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0%;
    text-align: center;
    vertical-align: middle;
}

    .badge .icon {
        height: 13.53px;
        width: 13.53px;
    }

    .badge.watermelon {
        background-color: var(--color-bm-wild-watermelon);
        color: var(--color-text-primary-alt);
    }

    .badge.green {
        background-color: var(--color-bm-green);
        color: var(--color-text-primary-alt);
    }

    .badge.yellow {
        background-color: var(--color-bm-pastel-yellow);
    }

    .badge.dark {
        background-color: var(--color-bg-1-alt);
        color: var(--color-bm-light);
    }

    .badge.outlined {
        background-color: transparent;
        border: 1.5px solid var(--color-bm-dark);
        color: var(--color-bm-dark);
    }

    .badge.solitaire {
        background-color: var(--color-bg-1);
    }

.book-card-container {
    display: flex;
    flex-direction: column;
    width: 116px;
    gap: 8px;
}

.book-card__cover-container {
    position: relative;
}

.book-cover {
    display: block;
    width: 116px;
    height: 178px;
    box-shadow: 4px 4px 16px 0px #00000040;
    border-radius: 8px;
    user-drag: none;
    -webkit-user-drag: none;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    background-color: var(--color-bg-1);
}

.book-cover h4,
.book-cover .text-1 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.book-cover h4 {
    -webkit-line-clamp: 4;
    line-height: 120%;
}

.book-cover .text-1 {
    line-height: 1.4rem;
    -webkit-line-clamp: 3;
}

.book-info {
    display: flex;
    flex-direction: column;
}

.book-info__title, .book-info__author {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.book-info__price-info {
    display: flex;
    flex-direction: row;
    gap: 4px;
}

.book-info__author, .price-info__old-price {
    color: var(--color-text-secondary);
}

.price-info__current-price {
    color: var(--color-bm-dark-price);
}

.price-info__old-price {
    text-decoration: line-through;
}

.book-card__cover-wrapper {
    position: relative;
    filter: drop-shadow(4px 4px 8px #00000040);
}

.book-card-container--library {
    width: 120px;
}

.book-card-container--library .book-card__cover-container {
    display: block;
}

.book-card-container--library .book-cover {
    width: 120px;
    height: 178px;
    text-align: center;
}

.book-card-container--library .book-cover h4 {
    -webkit-line-clamp: 3;
    font-size: 16px;
}

.book-card-container--library .book-cover .text-1 {
    -webkit-line-clamp: 2;
    font-size: 14px;
}

.liked-only-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    border-radius: 10px;
    background-color: var(--color-bg-1);
    text-decoration: none;
    color: var(--color-text-primary);
    font-size: 14px;
}

.liked-only-filter-btn.active {
    background-color: var(--color-bm-red);
    color: #fff;
}

.liked-only-filter-btn .icon {
    width: 18px;
    height: 18px;
    font-size: 18px;
    color: inherit;
}



@media (max-width: 1000px) {
    .book-card-container--library {
        width: 164px;
    }

    .book-card-container--library .book-cover {
        width: 164px;
        height: 244px;
    }
}

.books-carousel-container {
    display: flex;
    flex-direction: column;
    position: relative;
}

.books-carousel__track-wrapper {
    position: relative;
    margin-top: -14px;
    margin-bottom: -20px;
}

.books-carousel__description {
    font-size: 14px;
    color: var(--color-text-secondary-alt);
    margin-bottom: 1rem;
}

.books-carousel__books {
    display: flex;
    gap: .5rem;
    overflow-x: scroll;
    padding-top: 14px;
    padding-bottom: 20px;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    user-select: none;
    user-drag: none;
    touch-action: pan-y pan-x;
    scroll-behavior: smooth;
}

.main-column__content .books-carousel__books,
.side-column .books-carousel__books {
    margin-left: -1rem;
    margin-right: -1rem;
    width: calc(100% + 2rem);
    padding-left: 1rem;
    padding-right: 1rem;
    scroll-padding-left: 1rem;
    scroll-padding-right: 1rem;
}

.books-carousel__books.dragging {
    scroll-snap-type: none;
    scroll-behavior: auto;
}

    .books-carousel__books div,
    .books-carousel__books a {
        user-drag: none;
        -webkit-user-drag: none;
        user-select: none;
        -moz-user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
    }

    .books-carousel__books a {
        text-decoration: none;
    }

.carousel__author-container,
.carousel__book-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    scroll-snap-align: start;
}

    .carousel__author-container .author-card-container {
        z-index: 2;
    }

    .carousel__book-container[data-numbers-enabled="true"] {
        height: 320px;
        justify-content: flex-end;
    }

    .carousel__author-container[data-numbers-enabled="true"] {
        height: 340px;
        justify-content: flex-end;
    }


.carousel__index {
    position: absolute;
    top: -10px;
    left: 40%;
    transform: translateX(-50%);
    font-family: Vetrino, serif;
    font-weight: 400;
    font-size: 150px;
    line-height: 1;
    letter-spacing: -13%;
    text-align: center;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(180deg, var(--color-text-primary) 14.29%, var(--color-text-primary-alt) 65%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    width: 130%;
}

    .carousel__index.authors {
        left: 20%;
    }

.carousel__book-container .book-card-container {
    position: relative;
    z-index: 1;
}

.carousel-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.books-carousel__track-wrapper .carousel-nav-button {
    top: calc(14px + 89px);
}

.books-carousel__track-wrapper:has(.carousel__author-container[data-numbers-enabled="true"]) .carousel-nav-button {
    top: 220px;
}

.books-carousel__track-wrapper:has(.carousel__author-container[data-numbers-enabled="false"]) .carousel-nav-button {
    top: 136px;
}


    .carousel-nav-button.left {
        left: 0.5%;
    }

    .carousel-nav-button.right {
        right: 0.5%;
    }

@media (max-width: 1000px) {
    .carousel-nav-button {
        display: none;
    }
}

.author-card-container {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    width: 340px;
    height: min-content;
    padding: 0.25rem;
    background-color: var(--color-bg-1);
    cursor: pointer;
}

    .author-card-container[data-author-card-type="BooksPreview"] {
        width: 314px;
        border-radius: 14px;
    }

    .author-card-container[data-author-card-type="MyProfile"] {
        background-color: var(--color-bg-2);
    }

        .author-card-container[data-author-card-type="Compact"] .author-card__author-info,
        .author-card-container[data-author-card-type="MyProfile"] .author-card__author-info {
            border-bottom: 1px solid var(--color-text-secondary);
        }

        .author-card-container[data-author-card-type="BooksPreview"] .author-card__author-info {

        }

.author-card__books {
    display: none;
}

.author-card-container[data-author-card-type="BooksPreview"] .author-card__books {
    display: flex;
    gap: 0.35rem;
    padding: .5rem;
}

.books__preview-image {
    width: 94px;
    height: 146px;
    border-radius: 8px;
    box-shadow: 2px 2px 8px 0px #00000040;
}

.author-card__author-info {
    display: flex;
    flex-direction: row;
    gap: .75rem;
    padding: .5rem;
}

    .author-card__author-info img {
        width: 95px;
        height: 95px;
        border-radius: 7px;
        box-shadow: 1px 1px 6px 0px #00000040;
        background-color: var(--color-bg-1);
    }

    .author-card__author-info[data-author-card-type="BooksPreview"] img {
        width: 66px;
        height: 66px;
        border-radius: 50%;
        box-shadow: 4px 4px 16px 0px #00000040;
    }

.author-info__info {
    overflow: hidden;
}

.author-info__info h2 {
    text-overflow: ellipsis;
    overflow: hidden;
    line-height: 120%;
    white-space: nowrap;
}

.author-info__stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stats__stat {
    display: flex;
    gap: .25rem;
    align-items: center;
}

.stat__title {
    color: var(--color-text-secondary);
}

.stats__stat.favorites-count {
    display: none;
}

.author-card__author-info[data-author-card-type="BooksPreview"] .author-info__stats {
    flex-direction: row;
    gap: 1.25rem;
}

    .author-card__author-info[data-author-card-type="BooksPreview"] .author-info__stats .stats__stat {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

.author-card__author-info[data-author-card-type="BooksPreview"] .author-info__info .votes-count,
.author-card__author-info[data-author-card-type="BooksPreview"] .author-info__info .rating {
    display: none;
}

.author-card__author-info[data-author-card-type="MyProfile"] .author-info__info .t2,
.author-card__author-info[data-author-card-type="OtherProfile"] .author-info__info .t2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: wrap;
}

.author-card__author-info[data-author-card-type="MyProfile"] img,
.author-card__author-info[data-author-card-type="OtherProfile"] img {
    align-self: center;
}

.author-card__author-info[data-author-card-type="BooksPreview"] .author-info__info .favorites-count {
    display: flex;
}

.author-card__experience[data-author-card-type="Minimalistic"] .experience__progress,
.author-card__experience[data-author-card-type="BooksPreview"] {
    display: none;
}

.author-card__experience[data-author-card-type="Minimalistic"] .experience__title {
    width: 100%;
    border-radius: 8px;
    background-color: var(--color-bg-2);
    text-align: center;
}

.author-card__experience[data-author-card-type="Compact"] .experience__title,
.author-card__experience[data-author-card-type="MyProfile"] .experience__title {
    padding: .5rem;
}

.author-card__experience[data-author-card-type="Compact"] .experience__progress,
.author-card__experience[data-author-card-type="MyProfile"] .experience__progress {
    position: relative;
    width: 100%;
    border-radius: 8px;
    background-color: var(--color-bg-2);
    text-align: center;
}

.author-card__experience[data-author-card-type="OtherProfile"] .experience__progress {
    display: none;
}

@media (max-width: 1000px) {
    .author-card__experience[data-author-card-type="MyProfile"] .experience__progress {
        background-color: var(--color-bg-2) !important;
    }
}

.author-card__experience[data-author-card-type="MyProfile"] .experience__progress {
    background-color: var(--color-bg-1);
}

.progress__points {
    position: absolute;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0%;
    text-align: center;
    vertical-align: middle;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    margin: auto;
    line-height: 18px;
    color: var(--color-text-primary-alt);
    mix-blend-mode: difference;
}

.progress__completed {
    height: 18px;
    background-color: var(--color-bg-1-alt);
    border-radius: 8px;
}

.genres-selector-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.genres-selector-wrapper {
    display: flex;
    align-items: flex-start;
    overflow: hidden;
    gap: 8px;
    width: 100%;
    height: 40px;
}

    .genres-selector-wrapper a {
        user-drag: none;
        -webkit-user-drag: none;
    }

.genres-container {
    display: flex;
    flex-wrap: nowrap; /* keep in single row */
    overflow: auto; /* hide overflow badges */
    flex: 1; /* take all available horizontal space */
    gap: 8px;
    height: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--color-text-primary) var(--color-text-primary-alt);
}

/* TODO: update genres styles - this is a quick fix */
@media (max-width: 9000px) {
    .genres-container {
        flex-wrap: wrap;
        flex: unset;
    }

    .genres-selector-wrapper {
        flex-direction: column;
        height: auto;
    }
}

.ver-todo-badge {
    flex-shrink: 0; /* always visible */
}

.book-cover-img {
    width: 277px;
    height: 415px;
    opacity: 1;
    max-width: none;
    flex-shrink: 0;
    border-radius: 8px;
    gap: 1.5rem;
    background-color: var(--color-bg-1);
}

.book-cover-img_edit {
    width: 220px;
    height: 346px;
    max-width: none;
    flex-shrink: 0;
    opacity: 1;
    border-radius: 8px;
    background-color: var(--color-bg-1);
}

.book-cover-fallback {
    gap: .8rem;
}

.book-cover-fallback .book-cover__title,
.book-cover-fallback .book-cover__author-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.book-cover-fallback .book-cover__title {
    font-size: 1rem;
    -webkit-line-clamp: 4;
}

.book-cover-fallback .book-cover__author-name {
    font-size: .8rem;
    -webkit-line-clamp: 2;
}

.books__preview-image {
    background-color: var(--color-bg-2);
}

.books__preview-image.book-cover-fallback .book-cover__title {
    font-size: .85rem;
    -webkit-line-clamp: 3;
}

.books__preview-image.book-cover-fallback .mobile-divider {
    width: 60px;
    height: 1px;
}

.books__preview-image.book-cover-fallback .book-cover__author-name {
    font-size: .75rem;
    line-height: 125%;
}

@media (max-width: 1000px) {
    .book-cover-img,
    .book-cover-img_edit {
        width: 136px;
        height: 201px;
        align-self: center;
        backdrop-filter: blur(59px);
        box-shadow: 0px 11px 40px -10px var(--color-text-primary);
        gap: 1rem;
    }

        .book-cover-img h2 {
            font-size: 20px;
        }

    .book-details__mobile-meta {
        display: flex !important;
    }

    .dates-desktop {
        display: none;
    }
}

.purchase-btn {
    outline: none;
    border: none;
    border-radius: 8px;
    background-color: var(--color-bm-deep-coral);
    height: 44px;
    color: var(--color-text-primary-alt);
    font-weight: 400;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0%;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
}

/* Make purchase button stretch full width on mobile devices */
@media (max-width: 1000px) {
    .purchase-btn {
        display: flex;            /* make it a flex container for centering */
        flex: 1 1 100%;           /* allow it to grow/shrink and take full width */
        width: 100%;              /* ensure it fills parent's width */
        align-self: stretch;      /* stretch within a flex parent */
        justify-content: center;  /* center content horizontally */
        box-sizing: border-box;   /* include padding in width calculation */
    }
}

.purchase-btn__main {
    background: radial-gradient(50% 50% at 50% 50%, #785B27 0%, #3F3729 100%);
    height: 100%;
    border-radius: 8px;
    padding: 20px;
}

.original-price-light {
    color: #F3E0BFA8;
    text-decoration: line-through;
}

.discount {
    font-size: 14px;
}

.btn-1.book-action {
    height: 44px;
    padding: 10px;
}

.book-action .icon {
    height: 24px;
    width: 24px;
}

.comment-avatar {
    width: 34px;
    height: 34px;
    opacity: 1;
    border-radius: 17px;
}

.comment-avatar-wrap {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    line-height: 0;
}

/* First-gen avatar badge: a round 22x22 chip on the top-left corner of the avatar.
   Keyed on the shared [data-badge] attribute so both the comment avatar wrapper and
   UserCard's .uc-card__avatar-wrap reuse the same rule. */
[data-badge="first-gen"] {
    position: relative;
}

[data-badge="first-gen"]::after {
    content: "";
    position: absolute;
    top: -4px;
    left: -4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #FFD23D url('/img/icons/star-first-gen.svg') center / 16px 16px no-repeat;
    pointer-events: none;
}

.comment-avatar-wrap[data-badge="first-gen"]::after {
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    background: #FFD23D url('/img/icons/star-first-gen.svg') center / 8px 8px no-repeat;
}

.btn-1.outlined.page-btn {
    padding: 4px 10px;
}

.comment-input {
    resize: none;
    height: 74px;
    color: var(--color-bm-dark);
    gap: 10px;
    border-radius: 8px;
    border: var(--border);
    padding: 10px;
    background: var(--color-bg-2);
    outline: none;
    transition: height 0.2s ease-in-out;
    /* Set explicit line height for text inside textarea */
    line-height: 20px;
    /* Enable and style scrollbar: use thin scrollbar in Firefox with transparent track and dark thumb */
    scrollbar-width: thin;
    scrollbar-color: var(--color-bm-dark) transparent;
}

/* WebKit custom scrollbar for `.comment-input` only */
.comment-input::-webkit-scrollbar {
    width: 8px;
}

.comment-input::-webkit-scrollbar-track {
    background: transparent; /* transparent track */
}

.comment-input::-webkit-scrollbar-thumb {
    background-color: var(--color-bm-dark); /* BM Dark thumb */
    border-radius: 8px;
}

    .comment-input:focus {
        height: 140px;
    }

.comment-body {
    overflow-wrap: break-word;
    line-height: 150%;
}

.book-comment-form {
    background-color: var(--color-bg-1);
    border-radius: 8px;
}

.book-title-row__title {
    max-width: 445px;
}

.comment-input-header {
    font-weight: 400;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0%;
    vertical-align: middle;
}

.book-comments-count {
    font-family: DM Serif Display;
    font-weight: 400;
    font-size: 22px;
    line-height: 100%;
    letter-spacing: 0%;
    vertical-align: middle;
}

.comment-replies-list {
    border-left: 2px solid var(--color-text-secondary-alt);
}

.comment-action {
    color: #3F3729A8;
    text-decoration: underline;
}

    .comment-action.delete {
        margin-left: auto;
        color: var(--color-bm-red);
    }

.book-cover-container {
    position: relative;
}

.book-card[data-added-to-favorites="true"] .book-cover-container .book-cover-container__inner .favorite-book-btn .icon {
    -webkit-mask-image: url('/img/icons/bookmark-checked.svg');
    mask-image: url('/img/icons/bookmark-checked.svg');
}

.edit-book-btn,
.favorite-book-btn {
    position: absolute;
    right: 4px;
    top: 4px;
    height: 44px !important;
    width: 44px !important;
    padding: 7px !important;
    background-color: var(--color-bg-2);
}

.library-book-actions .book-action.library {
    position: revert;
    background-color: var(--color-bg-2);
}

.book-card-img {
    width: 170px;
    height: 256px;
    box-shadow: 4px 4px 28px -14px #0000004D;
    border-radius: 12px;
    gap: 2rem;
    background-color: var(--color-bg-1);
}

.book-card-img__title,
.book-card-img__author {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.book-card-img__title {
    -webkit-line-clamp: 5;
    font-size: 1.3rem;
    line-height: 120%;
}

.book-card-img__author {
    line-height: 1.4rem;
    -webkit-line-clamp: 3;
}

.book-card {
    display: grid;
    grid-template-columns: 1fr 3fr 2fr;
    gap: 1rem;
}

.library-book-actions {
    position: absolute;
    right: 4px;
    top: 4px;
    display: flex;
    gap: 4px;
}

@media (max-width: 1000px) {
    .book-card {
        display: grid;
        grid-template-columns: 136px 1fr;
        grid-template-rows: auto auto;
    }

    .book-card-stats {
        margin-top: auto;
    }

    .book-card-desc.mobile-only {
        display: -webkit-box !important;
    }

    .book-card-desc.t6.mobile-only {
        line-height: 20px;
    }

    .book-card-tags.mobile-only {
        display: grid !important;
        grid-auto-flow: row;
        grid-template-columns: 1fr;
        grid-auto-columns: min-content;
        grid-auto-rows: min-content;
    }

    .book-card-img {
        width: 136px;
        height: 214px;
        gap: 1rem;
    }

    .book-card-img__title {
        -webkit-line-clamp: 5;
        font-size: 1rem;
        line-height: 1.5rem;
    }

    .book-card-img__author {
        line-height: 120%;
        font-size: 0.9rem;
        -webkit-line-clamp: 3;
    }
}

.mobile-divider {
    height: 2px;
    width: 90px;
    grid-column: 1 / 3;
    background-color: #3F372980;
    justify-self: center;
}

.book-cover__title, .book-cover__author-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    overflow: hidden;
    -webkit-box-orient: vertical;
}

.book-card-desc {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-top: auto;
}

    .book-card-desc.t6.desktop-only {
        line-height: 20px;
    }

.book-meta-tag {
    border-radius: 15px;
    padding: 3px 14px;
    background: var(--color-bg-1);
    width: min-content;
}

/* Container */
.custom-select {
    position: relative;
    font-family: inherit;
    box-sizing: border-box;
}

    .custom-select[data-style="standard"] {
        font-size: 1rem;
        background: var(--color-bg-2);
        border: var(--border);
        border-radius: 8px;
        min-width: 280px;
        min-height: 44px;
        display: flex;
        justify-content: center;
    }


/* Trigger button */
.custom-select-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    padding: 0 10px;
    cursor: pointer;
    font-size: 1rem;
    color: #3f3729;
    outline: none;
    justify-content: space-between;
}

.custom-select[data-style="compact"] .custom-select-trigger .custom-select-arrow {
    display: none;
}

.custom-select-label {
    text-align: start;
    line-height: 100% !important;
}

.custom-select-arrow {
    margin: 0 2px 3px 8px;
    border: solid #3f3729;
    border-width: 0 1.5px 1.5px 0;
    display: inline-block;
    padding: 4px;
    transform: rotate(45deg);
    transition: transform 0.2s;
}

.custom-select.open .custom-select-arrow {
    transform: rotate(-135deg);
}

/* Options dropdown */
.custom-options {
    display: none;
    position: absolute;
    top: 85%;
    left: 0px;
    right: 0;
    background: var(--color-bg-2);
    box-shadow: 0px 0.5px 0px 1px var(--color-bg-1-alt);
    border-radius: 0 0 8px 8px;
    padding: 10px;
    z-index: 2;
}

.custom-select[data-style="compact"] .custom-options {
    border-radius: 10px;
    background-color: var(--color-bg-1);
    box-shadow: none;
    max-width: 280px;
}

.custom-select.open .custom-options {
    display: block;
}

.custom-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    cursor: pointer;
    color: #3f3729;
    background: none;
    font-size: 1rem;
    transition: background 0.15s;
}


.options-group-title {
    padding: 10px;
    font-weight: 700;
}

.custom-option.selected {
    font-weight: bold;
}

.custom-radio {
    width: 18px;
    height: 18px;
    border: 2px solid #3f3729;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    margin-left: 12px;
}

.custom-option.selected .custom-radio::after {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    background: #3f3729;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
}

.book-status-badge {
    height: 26px;
    gap: 2px;
    border-radius: 8px;
    padding: 4px 5px;
}

    .book-status-badge.en-progreso {
        background-color: var(--color-bm-pastel-yellow);
    }

    .book-status-badge.completed {
        background-color: var(--color-bm-green);
        color: var(--color-text-primary-alt);
    }

.garantee-mark {
    color: var(--color-bm-green);
}

.collapsible-wrapper {
    background: var(--color-bg-1);
    border-radius: 10px;
    margin: 1rem 0;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.collapsible__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 25px 20px;
    background: var(--color-bg-1);
    border-radius: 10px 10px 0 0;
    user-select: none;
}

.collapsible__icon {
    transition: transform 0.3s;
    display: flex;
    align-items: center;
}

.collapsible-wrapper[data-collapsed="true"] .collapsible__icon {
    transform: rotate(0deg);
}

.collapsible-wrapper:not([data-collapsed="true"]) .collapsible__icon {
    transform: rotate(180deg);
}

.collapsible__content {
    padding: 0 1rem 1rem 1rem;
    background: var(--color-bg-1);
    border-radius: 0 0 10px 10px;
    transition: max-height 0.3s, opacity 0.3s;
    opacity: 1;
    overflow: hidden;
}

.collapsible-wrapper[data-collapsed="true"] .collapsible__content {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
}

.book-cover-placeholder__title {
    font-family: DM Serif Display;
    font-weight: 400;
    font-size: 16px;
    line-height: 120%;
    letter-spacing: 0%;
    text-align: center;
    vertical-align: middle;
}

.profile-menu-container {
    position: relative;
    display: inline-block;
}

.profile-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 50px;
    min-width: 230px;
    background-color: #FFF7E9FC;
    backdrop-filter: blur(10px);
    border: var(--border);
    border-color: var(--color-text-secondary);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    z-index: 1001;
    padding: 0 1rem;
}

    .profile-dropdown-menu.show {
        display: block;
    }

.profile-menu-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.15s;
    position: relative;
}

    .profile-menu-item:not(:last-child) {
        border-bottom: 1px solid #0000002E;
    }

    .profile-menu-item .icon {
        margin-right: 6px;
        height: 24px;
        width: 24px;
        text-align: center;
    }

    .profile-menu-item.logout {
        color: var(--color-bm-red);
    }

    .profile-menu-item .profile-balance {
        margin-left: auto;
        background: var(--color-bg-1);
        border-radius: 8px;
        padding: 0.3em 0.5em;
        font-size: 0.95em;
        display: flex;
        align-items: center;
        gap: 0.3em;
    }

    .profile-menu-item .plus-btn {
        font-size: 18px;
    }

.profile-menu-item__counter {
    padding: 0.25rem;
    background-color: var(--color-bg-1-alt);
    color: var(--color-text-primary-alt);
    width: 24px;
    border-radius: 50%;
    font-size: 12px;
}

.price-free {
    color: var(--color-bm-deep-coral);
}

.original-price {
    color: var(--color-bm-dark-descr);
    text-decoration: line-through;
}

.discount-amount {
    background-color: var(--color-bm-deep-coral);
    color: var(--color-text-primary-alt);
    border-radius: 12px;
    text-align: center;
    padding: 2px 4px;
}

.styled-btn.liked .icon {
    color: var(--color-bm-red) !important;
}

.styled-btn.book-action.like:hover {
    background-color: var(--color-bg-2);
    color: var(--color-bm-red);
}

.text-green {
    color: var(--color-bm-green);
}

.popup-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

    .popup-dialog-overlay[style*="display: flex"] {
        display: flex !important;
    }

.popup-dialog-window {
    background: var(--color-bg-2);
    border-radius: 18px;
    min-width: 320px;
    max-width: 90vw;
    box-shadow: 0 2px 16px rgba(0,0,0,0.2);
    padding: 0;
    display: flex;
    flex-direction: column;
}

.popup-dialog-content {
    padding: 30px 10px 10px 10px;
}

.snackbar-container {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
    pointer-events: none;
}

.snackbar {
    min-width: 320px;
    max-width: 480px;
    border-radius: 16px;
    box-shadow: none;
    display: flex;
    border: 1.5px solid;
    backdrop-filter: blur(30px);
    align-items: center;
    padding: 18px 14px;
    font-size: 1rem;
    pointer-events: auto;
    position: relative;
    transition: opacity 0.4s;
    gap: 16px;
}

.snackbar-icon {
    display: inline-block;
    width: 32px !important;
    height: 32px !important;
}

.snackbar[data-variant="blue"] {
    background-color: var(--color-bm-light-blue);
    border-color: var(--color-bm-blue);
    color: var(--color-bm-blue);
}

.snackbar[data-variant="green"] {
    background-color: var(--color-bm-light-green);
    border-color: var(--color-bm-green);
    color: var(--color-bm-green);
}

.snackbar[data-variant="red"] {
    background-color: var(--color-bm-light);
    border-color: var(--color-bm-red);
    color: var(--color-bm-red);
}

.snackbar[data-variant="yellow"] {
    background-color: var(--color-bm-light);
    border-color: var(--color-bm-pastel-yellow);
    color: var(--color-bm-dark);
}

.snackbar-link .t4 {
    color: inherit;
}

.snackbar-container.mobile {
    bottom: 65px;
    left: 5px;
    right: 5px;
    align-items: center;
}

.snackbar.mobile {
    max-width: 340px;
    flex-direction: column;
    padding: 10px !important;
}

    .snackbar.mobile .snackbar-icon {
        width: 24px !important;
        height: 24px !important;
    }

        .snackbar.mobile .snackbar-icon.close-cross {
            cursor: pointer;
        }

    .snackbar.mobile .snackbar-link {
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.25rem;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        font-size: 1rem;
        transition: background-color 0.2s ease, color 0.2s ease, border 0.2s ease-out;
        text-decoration: none;
        height: 2.75rem;
        padding: 10px 16px;
        width: 100%;
    }

.snackbar[data-variant="green"].mobile .snackbar-link {
    background-color: var(--color-bm-green);
    color: var(--color-bm-light);
}

.snackbar[data-variant="blue"].mobile .snackbar-link {
    background-color: var(--color-bm-blue);
    color: var(--color-bm-light);
}

.snackbar[data-variant="red"].mobile .snackbar-link {
    background-color: var(--color-bm-red);
    color: var(--color-bm-light);
}

.snackbar[data-variant="yellow"].mobile .snackbar-link {
    background-color: var(--color-bm-pastel-yellow);
    color: var(--color-bm-dark);
}

@media (max-width: 1000px) {
    .snackbar-container {
        bottom: 65px;
        left: 5px;
        right: 5px;
        align-items: center;
    }

    .snackbar {
        max-width: 340px;
        flex-direction: column;
        padding: 10px !important;
    }

    .snackbar-icon {
        width: 24px !important;
        height: 24px !important;
    }

        .snackbar-icon.close-cross {
            cursor: pointer;
        }

    .snackbar-link {
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.25rem;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        font-size: 1rem;
        transition: background-color 0.2s ease, color 0.2s ease, border 0.2s ease-out;
        text-decoration: none;
        height: 2.75rem;
        padding: 10px 16px;
        width: 100%;
    }

    .snackbar[data-variant="green"] .snackbar-link {
        background-color: var(--color-bm-green);
        color: var(--color-light);
    }

    .snackbar[data-variant="blue"] .snackbar-link {
        background-color: var(--color-bm-blue);
        color: var(--color-light);
    }

    .snackbar[data-variant="red"] .snackbar-link {
        background-color: var(--color-bm-red);
        color: var(--color-light);
    }

    .snackbar[data-variant="yellow"] .snackbar-link {
        background-color: var(--color-bm-pastel-yellow);
        color: var(--color-dark);
    }
}

.snackbar.transparent {
    opacity: 0;
}

.snackbar-message {
    font-weight: 700;
    font-size: 1.1em;
    color: inherit;
}

.snackbar-link {
    font-weight: 400;
    text-decoration: none;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    color: inherit;
}

    .snackbar-link .icon.arrow-right {
        font-size: 1.1em;
        margin-left: 2px;
    }

.mobile-dock {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9000;
    background-color: #FFF7E9E5;
    backdrop-filter: blur(30px);
    height: 50px;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.04);
    justify-content: space-around;
    align-items: center;
    padding: 0;
}


.mobile-dock-profile-picture {
    width: 24px;
    height: 24px;
    border-radius: 17px;
    background-color: var(--color-bg-1, #FFF7E9); /* fallback hex if variable missing */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.mobile-dock a .icon {
    width: 24px;
    height: 24px;
}

.mobile-dock-btn {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #3F3729;
    text-decoration: none;
    font-size: 13px;
    height: 100%;
    transition: background 0.15s;
    padding: 0 2px;
}

    .mobile-dock-btn.disabled {
        pointer-events: none;
        opacity: 0.6;
    }

    .mobile-dock-btn:active,
    .mobile-dock-btn:focus {
        background: #f3e0bf;
    }

    .mobile-dock-btn .icon {
        font-size: 22px;
        margin-bottom: 2px;
    }

.mobile-dock-label {
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
}

@media (max-width: 1000px) {
    .mobile-dock {
        display: flex;
    }
}

.custom-checkbox {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-text-primary);
    border-radius: 4px;
    background: transparent;
    position: relative;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    vertical-align: middle;
}

    .custom-checkbox.checked {
        background: var(--color-bg-1-alt);
    }

        .custom-checkbox.checked:after {
            content: '';
            position: absolute;
            left: 4px;
            bottom: 2px;
            width: 4px;
            height: 10px;
            border: solid var(--color-text-primary-alt);
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
        }

    .custom-checkbox.indeterminate {
        background: var(--color-bg-1-alt);
    }

        .custom-checkbox.indeterminate:after {
            content: '';
            position: absolute;
            left: 2px;
            top: 6px;
            width: 10px;
            height: 2px;
            background: var(--color-bg-2);
            border-radius: 2px;
        }

.genres-selector {
    border: var(--border);
    border-radius: 8px;
}

.genres-options {
    display: none !important;
    border-top: none;
    max-height: 320px;
    overflow-y: auto;
    top: 92%;
}

    .genres-options.opened {
        display: flex !important;
    }

.genre-tag {
    border-radius: 15px;
    background-color: var(--color-bg-1);
    padding: 5px 6px;
}

.books-count {
    color: var(--color-text-secondary-alt);
    padding-left: 0.5rem;
}

.custom-option {
    border-radius: 6px;
}

    .custom-option .t6,
    .custom-checkbox .text-regular {
        transition: color 0.2s;
    }

    .custom-option.genre:hover {
        background-color: var(--color-text-primary);
    }

        .custom-option.genre:hover .custom-select-arrow {
            border-color: var(--color-text-primary-alt);
        }

        .custom-option.genre:hover .t6,
        .custom-option.genre:hover .text-regular {
            color: var(--color-text-primary-alt);
        }

            .custom-option.genre:hover .t6.books-count
            .custom-option.genre:hover .text-regular.books-count {
                color: var(--color-text-secondary-alt);
            }

        .custom-option.genre:hover .custom-checkbox {
            border-color: var(--color-text-primary-alt);
            background-color: var(--color-text-primary-alt);
        }

            .custom-option.genre:hover .custom-checkbox:after {
                border-color: var(--color-text-primary);
            }

            .custom-option.genre:hover .custom-checkbox.indeterminate:after {
                background-color: var(--color-bg-1-alt);
            }

.book-cover-upload-preview {
    width: 136px;
    height: 201px;
    border-radius: 8px;
    background: var(--color-bm-solitaire);
    box-shadow: 0px 11px 40px -10px var(--color-bg-1-alt);
    margin-top: 1.25rem;
    gap: 1rem;
}

.book-cover-upload-preview .t1,
.book-cover-upload-preview .text-1 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.book-cover-upload-preview .t1 {
    font-size: 1.2rem;
    -webkit-line-clamp: 3;
}

.book-cover-upload-preview .text-1 {
    font-size: 14px;
    -webkit-line-clamp: 2;
}

.delete-action {
    outline-color: var(--color-bm-red);
    color: var(--color-bm-red);
    border-width: 1.5px;
}

.btn-1.large.delete-action {
    padding: 10px 12px;
}

.delete-action:hover {
    background-color: var(--color-bm-red);
    color: var(--color-text-primary-alt);
}

.custom-text-area {
    border: var(--border);
    border-radius: 6px;
    padding: 4px 10px;
    min-height: 350px;
    max-height: 450px;
    transition: all 0.25s ease-out;
    resize: none;
    background-color: transparent;
    font-weight: 400;
    font-size: 16px;
    line-height: 140%;
    letter-spacing: 0%;
    outline: 0px !important;
    -webkit-appearance: none;
    color: var(--color-text-primary);
    scrollbar-width: thin;
    scrollbar-color: var(--color-bg-1-alt) transparent;
}

    .custom-text-area:hover {
        border-color: var(--color-border-alt);
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }

/* Switch (toggle) */
.bm-toggle {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    cursor: pointer;
}

.bm-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.bm-toggle-slider {
    position: absolute;
    inset: 0;
    background: #bcb4aa; /* off gray */
    border-radius: 999px;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

    .bm-toggle-slider:before {
        content: "";
        position: absolute;
        left: 2px;
        top: 2px;
        width: 22px;
        height: 22px;
        background: #fff;
        border-radius: 50%;
        transition: transform 0.2s ease;
        box-shadow: 0 1px 2px rgba(0,0,0,.25);
    }

.bm-toggle-input:checked + .bm-toggle-slider {
    background: var(--color-bm-green);
}

    .bm-toggle-input:checked + .bm-toggle-slider:before {
        transform: translateX(20px);
    }

.bm-toggle-input:focus + .bm-toggle-slider {
    box-shadow: 0 0 0 3px rgba(139,195,74,.35);
}

.bm-toggle-input:disabled + .bm-toggle-slider {
    opacity: .6;
    cursor: not-allowed;
}

.bm-switch .bm-switch-label {
    margin-right: 12px;
}

.bm-price-input {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 138px;
    align-items: stretch;
    border: var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    transition: all 0.25s ease-out;
    background: transparent;
}

@media (max-width: 1000px) {
    .bm-price-input {
        grid-template-columns: 1fr auto 85px;
    }
}

.bm-price-input.standard {
    min-height: 56px;
}

.bm-price-input:hover {
    border-color: var(--color-border-alt);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.bm-price-input__left,
.bm-price-input__right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.bm-price-input__label {
    color: var(--color-text-secondary-alt);
    line-height: 1;
    font-size: 12px;
}

.bm-price-input__field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bm-price-input input.bm-text-input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: var(--color-text-primary);
    width: 100%;
}

.bm-price-input__divider {
    width: 1px;
    background: #3F372980;
    margin: 0 10px;
}

.bm-affix {
    color: var(--color-text-secondary-alt);
    user-select: none;
    pointer-events: none;
    font-size: 16px;
}

    .bm-affix.prefix {
        margin-right: 2px;
    }

    .bm-affix.suffix {
        margin-left: 2px;
    }

.remove-genre {
    color: var(--color-text-primary);
}

.multi-select-dropdown {
    background: var(--color-bg-2);
    border: var(--border);
    border-radius: 8px;
    min-height: 44px;
}

.multi-select-dropdown[data-disabled="true"] {
    opacity: 0.6;
    pointer-events: none;
}

    .multi-select-dropdown:hover {
        border-color: var(--color-border-alt);
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }

    .multi-select-dropdown .custom-select-trigger {
        min-height: 40px;
    }

    .multi-select-dropdown .custom-options {
        display: none;
        position: absolute;
        top: 91%;
        background: var(--color-bg-2);
        box-shadow: 0px 0.5px 0px 1px var(--color-bg-1-alt);
        border-radius: 0 0 8px 8px;
        padding: 10px;
        z-index: 1000;
        max-height: 320px;
        overflow-y: auto;
    }

        .multi-select-dropdown .custom-options.opened {
            display: flex !important;
        }

    .multi-select-dropdown .multi-select-option {
        border-radius: 6px;
        cursor: pointer;
    }

        .multi-select-dropdown .multi-select-option:hover {
            background-color: var(--color-bg-1-alt);
        }

            .multi-select-dropdown .multi-select-option:hover .t6 {
                color: var(--color-text-primary-alt);
            }

            .multi-select-dropdown .multi-select-option:hover .books-count {
                color: var(--color-text-secondary-alt);
            }

            .multi-select-dropdown .multi-select-option:hover .custom-checkbox {
                border-color: var(--color-bg-2);
            }

                .multi-select-dropdown .multi-select-option:hover .custom-checkbox.checked {
                    background-color: var(--color-bg-2);
                }

                    .multi-select-dropdown .multi-select-option:hover .custom-checkbox.checked:after {
                        border-color: var(--color-text-primary);
                    }

    .multi-select-dropdown .option-checkbox {
        padding: 0;
        line-height: 0;
    }

/* Tooltip styles */
.tooltip {
    position: relative;
    cursor: help;
    display: inline-block;
}

.tooltip-content {
    position: absolute;
    bottom: calc(100% + 8px); /* Simplified positioning with gap */
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-bg-1-alt) !important; /* Force background */
    color: var(--color-text-primary-alt) !important; /* Force text color */
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 140%;
    white-space: normal;
    max-width: 280px;
    width: max-content;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    text-align: left; /* Ensure proper text alignment */
}

    .tooltip-content::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 0;
        border: 6px solid transparent;
        border-top-color: var(--color-border);
    }

.tooltip.show .tooltip-content {
    opacity: 1 !important;
    visibility: visible !important;
}

.book-series-edit-dialog-container {
    width: 600px;
}

/* Mobile adjustments */
@media (max-width: 1000px) {
    .tooltip-content {
        max-width: 240px;
        font-size: 13px;
        padding: 6px 10px;
        bottom: calc(100% + 6px);
    }

    .book-series-edit-dialog-container {
        min-width: 300px;
        width: revert;
    }

    .banners-carousel__nav {
        display: none;
    }
}

/* --- Banners Carousel --- */
.banners-carousel-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.banners-carousel {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    width: 100%;
    box-shadow:
        inset 0 4px 15px rgba(255, 255, 255, 0.15),
        0 6px 15px rgba(63, 55, 41, 0.30),
        0 20px 30px rgba(63, 55, 41, 0.15);
}

.banners-carousel__track {
    display: flex;
    overflow-x: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .banners-carousel__track::-webkit-scrollbar {
        display: none;
    }

.banners-carousel__slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: block;
    aspect-ratio: 1038 / 201;
    overflow: hidden;
}

.banners-carousel--mobile {
    overflow: visible;
    border-radius: 0;
    box-shadow: none;
}

.banners-carousel--mobile .banners-carousel__track {
    overflow-x: scroll;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 50px;
    margin-bottom: -50px;
    scroll-padding-left: 10px;
    scroll-padding-right: 10px;
    gap: 3px;
}

.banners-carousel--mobile .banners-carousel__slide {
    flex: 0 0 100%;
    border-radius: 12px;
    aspect-ratio: 340 / 170;
    box-shadow:
        inset 0 4px 15px rgba(255, 255, 255, 0.15),
        0 6px 15px rgba(63, 55, 41, 0.30),
        0 20px 30px rgba(63, 55, 41, 0.15);
}

    .banners-carousel__slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.banners-carousel__nav {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.banners-carousel__nav .btn-6 {
    width: 33px;
    height: 33px;
    background-color: transparent;
    border: 1px solid var(--color-text-primary-alt);
    color: var(--color-text-primary-alt);
    opacity: 0.6;
    transition: opacity linear .2s;
}

.banners-carousel__nav .btn-6:hover {
    opacity: 1;
}

.banners-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.banners-carousel__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid var(--color-text-primary);
    background-color: transparent;
    transition: background 0.2s;
    cursor: pointer;
}

    .banners-carousel__dot.active {
        background: var(--color-text-primary);
    }

/* Last read book card ("Sigue leyendo") */
.last-read-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 1.5rem;
    border-radius: 12px;
}

.last-read-card__cover-link {
    position: relative;
    flex-shrink: 0;
    align-self: center;
}

.last-read-card__cover {
    width: 147px;
    height: 220px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.last-read-card__cover--fallback {
    width: 147px;
    height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--color-bm-solitaire);
    border-radius: 6px;
    text-align: center;
    padding: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.last-read-card__cover-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 18px;
    color: var(--color-bm-black);
}

.last-read-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.last-read-card__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.last-read-card__author {
    text-decoration: none;
    line-height: 100%;
}

.last-read-card__title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 100%;
}

.last-read-card__genre {
    display: none;
}

.last-read-card__progress {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.last-read-card__progress-label {
    color: var(--color-text-primary);
    font-size: 14px;
}

.last-read-card__progress-track {
    width: 100%;
    max-width: 200px;
    height: 6px;
    background: #3f372918;
    border-radius: 8px;
    overflow: hidden;
}

.last-read-card__progress-fill {
    height: 100%;
    background: #3f3729;
    border-radius: 8px;
}

.last-read-card__bottom {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.last-read-card__chapter {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.last-read-card__chapter-name {
    font-weight: 600;
    font-size: 20px;
    color: var(--color-text-primary);
}

.last-read-card__action {
    flex-shrink: 0;
}

.last-read-card__btn {
    white-space: nowrap;
}

@media (max-width: 1000px) {
    .last-read-card {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .last-read-card__cover-link {
        order: 2;
    }

    .last-read-card__body {
        order: 1;
    }

    .last-read-card__chapter {
        display: none;
    }

    .last-read-card__cover--fallback {
        background: var(--color-bg-2);
    }
}

/* Book update carousel card */
.book-update-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: var(--color-bm-deep-coral);
    color: var(--color-bm-light);
    border: 1px solid var(--color-bm-light);
    font-size: 12px;
    font-weight: 700;
    height: 19px;
    padding: 0 4px;
    border-radius: 5px;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.book-info__update-title-row {
    display: flex;
    align-items: center;
    gap: 5px;
    overflow: hidden;
}

.book-info__update-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-bm-red);
}

.book-info__update-title-row .book-info__title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1000px) {
    .last-read-card__title {
        white-space: normal;
        order: -1;
        font-size: 20px;
        font-family: "Ronzino", Arial, sans-serif;
        line-height: 120%;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .last-read-card__author {
        font-size: 16px;
        color: var(--color-bm-dark-descr);
        line-height: 120%;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .last-read-card__genre {
        display: block;
        order: -2;
        font-size: 16px;
        color: var(--color-bm-dark-descr);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .last-read-card__progress-track {
        max-width: 100%;
    }

    .last-read-card__btn {
        width: 100%;
        justify-content: center;
    }
}

/* Widget variant: always renders with the mobile design regardless of viewport */
.last-read-card--widget {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 10px !important;
}

.last-read-card--widget .last-read-card__heading {
    flex-basis: 100%;
    order: -1;
    margin: 0;
}

.last-read-card--widget .last-read-card__cover-link {
    order: 2;
}

.last-read-card--widget .last-read-card__body {
    order: 1;
}

.last-read-card--widget .last-read-card__cover--fallback {
    background: var(--color-bg-2);
}

.last-read-card--widget .last-read-card__title {
    white-space: normal;
    order: -1;
    font-size: 18px;
    font-family: "Ronzino", Arial, sans-serif;
    line-height: 120%;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.last-read-card--widget .last-read-card__author {
    font-size: 16px;
    color: var(--color-bm-dark-descr);
    line-height: 120%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.last-read-card--widget .last-read-card__genre {
    display: block;
    order: -2;
    font-size: 16px;
    color: var(--color-bm-dark-descr);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.last-read-card--widget .last-read-card__progress-track {
    max-width: 100%;
}

.last-read-card--widget .last-read-card__btn {
    width: 100%;
    justify-content: center;
}
