/*
|--------------------------------------------------------------------------
| Navbar publique — mini-panier fonctionnel
|--------------------------------------------------------------------------
*/

.public-cart-dropdown {
    position: relative;
}

.public-navbar-cart-toggle {
    position: relative;
    border: 0;
}

.public-navbar-cart-count {
    position: absolute;
    top: -5px;
    right: -7px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 19px;
    height: 19px;
    padding: 0 5px;

    color: #fff;
    background: #b9852f;

    border: 2px solid #fffdf8;
    border-radius: 999px;

    font-size: .62rem;
    font-weight: 850;
    line-height: 1;
}

.public-navbar-cart-count.is-updating {
    animation: publicCartBadgePop .42s ease;
}

@keyframes publicCartBadgePop {
    0% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1);
    }
}

.public-cart-menu {
    width: min(430px, calc(100vw - 1.5rem));
    max-height: min(680px, calc(100vh - 90px));

    margin-top: .8rem !important;
    padding: 0;

    overflow: hidden;

    color: #3f4c45;
    background: #fffdf8;

    border: 1px solid #e3d8c6;
    border-radius: 18px;

    box-shadow:
        0 24px 65px rgba(54, 48, 38, .18);
}

.public-mini-cart-loader {
    position: relative;
    min-height: 150px;
}

.public-mini-cart-loading,
.public-mini-cart-error {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: .75rem;

    min-height: 180px;
    padding: 1.5rem;

    color: #69736d;
    text-align: center;
}

.public-mini-cart-loading__spinner {
    width: 30px;
    height: 30px;

    border: 3px solid #dfd4c2;
    border-top-color: #245a4d;
    border-radius: 50%;

    animation: publicCartSpinner .7s linear infinite;
}

@keyframes publicCartSpinner {
    to {
        transform: rotate(360deg);
    }
}

.public-mini-cart-loader.is-loading::before {
    content: "";

    position: absolute;
    inset: 0;
    z-index: 20;

    background: rgba(255, 253, 248, .72);
    backdrop-filter: blur(2px);
}

.public-mini-cart-loader.is-loading::after {
    content: "";

    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 21;

    width: 30px;
    height: 30px;

    border: 3px solid #dfd4c2;
    border-top-color: #245a4d;
    border-radius: 50%;

    transform: translate(-50%, -50%);

    animation: publicCartOverlaySpinner .7s linear infinite;
}

@keyframes publicCartOverlaySpinner {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.public-mini-cart-error i {
    color: #a95f56;
    font-size: 1.4rem;
}

@media (max-width: 767.98px) {
    .public-cart-menu {
        position: fixed !important;
        top: 68px !important;
        right: .65rem !important;
        left: .65rem !important;

        width: auto;
        max-height: calc(100vh - 82px);

        margin: 0 !important;

        transform: none !important;
    }
}