.mi-libro {
    box-sizing: border-box;
    width: 100%;
    max-width: 34rem;
    margin: 1.25rem auto;
    padding: clamp(1rem, 3vw, 1.5rem);
    border: 1px solid #d6dfe5;
    border-radius: .75rem;
    background: #f7f9fb;
    color: #1b2738;
    font: 400 1rem/1.5 var(--wp--preset--font-family--body, system-ui), sans-serif;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
}

.mi-libro [hidden] {
    display: none !important;
}

.mi-libro p {
    margin: 0;
    padding: 0;
}

.mi-libro .mi-libro__titolo {
    margin-bottom: .85rem;
    font-size: 1.125rem;
    line-height: 1.35;
}

.mi-libro .mi-libro__venditore {
    margin-top: .7rem;
    color: #485769;
    font-size: .875rem;
}

.mi-libro .mi-libro__pulsante {
    display: inline-block;
    box-sizing: border-box;
    max-width: 100%;
    min-height: 44px;
    padding: .6rem 1rem;
    border: 1px solid transparent;
    border-radius: .4rem;
    background: #1b2738;
    color: #fff;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    white-space: normal;
    cursor: pointer;
}

.mi-libro .mi-libro__pulsante:hover {
    background: #304760;
    color: #fff;
}

.mi-libro :is(a, button, summary, input):focus-visible {
    outline: 2px solid #145784;
    outline-offset: 3px;
}

.mi-libro [data-mi-stato]:not(:empty) {
    margin-top: .6rem;
    font-size: .875rem;
}

.mi-libro [data-mi-carrello] {
    margin-top: .75rem;
    padding-top: .65rem;
    border-top: 1px solid #d6dfe5;
}

.mi-libro [data-mi-contatore] {
    width: fit-content;
    margin: auto;
    font-weight: 600;
    cursor: pointer;
}

.mi-libro [data-mi-righe] {
    margin: .5rem 0 .75rem;
    padding: 0;
    list-style: none;
    text-align: left;
}

.mi-libro [data-mi-righe] li {
    margin: 0;
    padding: .4rem 0;
}

.mi-libro [data-mi-righe] input {
    box-sizing: border-box;
    width: 4rem;
    min-height: 36px;
    padding: .25rem;
    color: #1b2738;
    font: inherit;
}

.mi-libro [data-mi-righe] button {
    min-height: 36px;
    padding: .25rem .4rem;
    border: 0;
    background: transparent;
    color: #1b2738;
    font: inherit;
    font-size: .875rem;
    text-decoration: underline;
    cursor: pointer;
}

.mi-libro__scheda {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.mi-libro .mi-libro__copertina {
    display: block;
    width: 6.25rem;
    max-width: 30%;
    height: auto;
    max-height: 10rem;
    object-fit: contain;
    margin: 0;
}

.mi-libro__contenuto {
    min-width: 0;
}

.mi-libro__copertina + .mi-libro__contenuto {
    text-align: left;
}

@media (max-width: 400px) {
    .mi-libro__scheda {
        flex-direction: column;
        gap: .65rem;
    }

    .mi-libro__copertina + .mi-libro__contenuto {
        text-align: center;
    }
}

.mi-libro-errore {
    margin: 1.25rem auto;
    padding: .75rem 1rem;
    max-width: 34rem;
    border: 2px dashed #b32d2e;
    border-radius: .5rem;
    background: #fcf0f1;
    color: #8a1f1f;
    font-size: .9rem;
}
