/* ==========================================================================
   ModulWP – Fly-to-Cart  |  CSS
   ========================================================================== */

/* ── Toast container ─────────────────────────────────────────────────────── */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999998;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;  /* permite click-through pe zonele goale */
}

/* ── Toast card ──────────────────────────────────────────────────────────── */
.modulwp-toast {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #ffffff;
    border: 1px solid #e8eaf0;
    border-left: 4px solid #1a2a6c;
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .13);
    min-width: 300px;
    max-width: 360px;
    pointer-events: auto;

    /* Stare inițială – ascuns în dreapta */
    transform: translateX(calc(100% + 32px));
    opacity: 0;
}

/* Slide-in */
.modulwp-toast--in {
    animation: modulwp-slide-in .35s cubic-bezier(.22, .68, 0, 1.2) forwards;
}

/* Slide-out */
.modulwp-toast--out {
    animation: modulwp-slide-out .3s ease-in forwards;
}

@keyframes modulwp-slide-in {
    from { transform: translateX(calc(100% + 32px)); opacity: 0; }
    to   { transform: translateX(0);                 opacity: 1; }
}

@keyframes modulwp-slide-out {
    from { transform: translateX(0);                 opacity: 1; }
    to   { transform: translateX(calc(100% + 32px)); opacity: 0; }
}

/* ── Toast parts ─────────────────────────────────────────────────────────── */
.modulwp-toast__body {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.modulwp-toast__img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    border: 1px solid #e8eaf0;
}

.modulwp-toast__img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f2fa;
    border-radius: 6px;
    flex-shrink: 0;
}

.modulwp-toast__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.modulwp-toast__check {
    font-size: 13px;
    font-weight: 700;
    color: #1a2a6c;
    white-space: nowrap;
}

.modulwp-toast__name {
    font-size: 12px;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

.modulwp-toast__btn {
    display: inline-block;
    background: #1a2a6c;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .2s ease;
}

.modulwp-toast__btn:hover {
    background: #2a3d8f;
}

/* ── Bounce animation pentru iconița coș ────────────────────────────────── */
.modulwp-cart-bounce {
    animation: modulwp-cart-bounce .5s ease forwards;
    transform-origin: center;
}

@keyframes modulwp-cart-bounce {
    0%   { transform: scale(1); }
    25%  { transform: scale(1.45); }
    55%  { transform: scale(0.9); }
    75%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    #toast-container {
        bottom: 12px;
        right: 12px;
        left: 12px;
    }

    .modulwp-toast {
        min-width: unset;
        max-width: 100%;
    }
}
