.clp-toast-wrap {
    position: fixed;
    z-index: 999999;
    width: min(320px, calc(100vw - 20px));
    pointer-events: none;
    direction: rtl;
    font-family: inherit;
    --clp-safe-top: 14px;
    --clp-safe-bottom: 14px;
}

.clp-top-right { top: var(--clp-safe-top); right: 14px; }
.clp-top-left { top: var(--clp-safe-top); left: 14px; }
.clp-bottom-right { bottom: var(--clp-safe-bottom); right: 14px; }
.clp-bottom-left { bottom: var(--clp-safe-bottom); left: 14px; }

.clp-toast {
    position: relative;
    display: grid;
    grid-template-columns: 68px 1fr;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px;
    border-radius: 16px;
    background: rgba(255, 250, 247, .98);
    border: 1px solid rgba(88, 28, 135, .08);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .16);
    opacity: 0;
    transform: translateY(-8px) scale(.98);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: auto;
    overflow: hidden;
}

.clp-bottom-right .clp-toast,
.clp-bottom-left .clp-toast {
    transform: translateY(8px) scale(.98);
}

.clp-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.clp-toast__media {
    position: relative;
}

.clp-toast__image {
    display: block;
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 14px;
    background: #f6f3ef;
}

.clp-toast__badge {
    position: absolute;
    left: -6px;
    bottom: -6px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #f7e6ec;
    color: #6b213e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    border: 2px solid #fff;
    box-shadow: 0 6px 16px rgba(107, 33, 62, .12);
}

.clp-toast__content {
    min-width: 0;
    padding-left: 18px;
}

.clp-toast__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 11px;
    line-height: 1.4;
    color: #7c6f64;
    flex-wrap: wrap;
}

.clp-toast__kind {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    color: #61403a;
}

.clp-toast__text {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.85;
    color: #2f261f;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.clp-toast__brand {
    margin-top: 4px;
    font-size: 10.5px;
    color: #9c8d83;
}

.clp-toast__close {
    position: absolute;
    top: 7px;
    left: 7px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 0;
    background: rgba(255,255,255,.6);
    color: #9b8f85;
    font-size: 14px;
    line-height: 20px;
    padding: 0;
    cursor: pointer;
}

.clp-toast__link {
    color: inherit;
    text-decoration: none;
}

.clp-toast__progress {
    position: absolute;
    right: 10px;
    left: 10px;
    bottom: 0;
    height: 3px;
    background: rgba(107, 33, 62, .08);
    border-radius: 999px 999px 0 0;
    overflow: hidden;
}

.clp-toast__progress::after {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #a16207, #7c2d12, #6b213e);
    transform-origin: right center;
    animation: clp-progress linear forwards;
    animation-duration: var(--clp-duration, 5s);
}

@keyframes clp-progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@media (max-width: 767px) {
    .clp-toast-wrap {
        width: min(300px, calc(100vw - 16px));
    }

    .clp-top-right,
    .clp-top-left { right: 8px; left: auto; }

    .clp-bottom-right,
    .clp-bottom-left { right: 8px; left: auto; }

    .clp-toast {
        grid-template-columns: 60px 1fr;
        gap: 8px;
        padding: 8px;
        border-radius: 14px;
    }

    .clp-toast__image {
        width: 60px;
        height: 60px;
        border-radius: 12px;
    }

    .clp-toast__badge {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }

    .clp-toast__content {
        padding-left: 16px;
    }

    .clp-toast__text {
        font-size: 12px;
        line-height: 1.8;
    }
}

@media (prefers-reduced-motion: reduce) {
    .clp-toast,
    .clp-toast__progress::after { transition: none; animation: none; }
}
