/* Yagoda — Отзыв за скидку | v1.0.0 */

/* ─── Banner wrapper ──────────────────────────────────────────────── */
.yrd-banner {
    border-radius: 18px;
    padding: 28px 32px;
    margin-bottom: 28px;
    color: #fff;
    position: relative;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.5;
    transition: background 0.6s ease, box-shadow 0.6s ease;

    /* Default: berry gradient */
    background: linear-gradient(135deg, #3a0d1e 0%, #7b1d4a 55%, #c0392b 100%);
    box-shadow: 0 10px 40px rgba(100, 10, 40, 0.38);
}

/* Decorative glow — top right */
.yrd-banner::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -60px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 65%);
    pointer-events: none;
}

/* Decorative glow — bottom left */
.yrd-banner::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -40px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 200, 150, 0.07) 0%, transparent 65%);
    pointer-events: none;
}

/* Done state: switch to green */
.yrd-banner.yrd-is-done {
    background: linear-gradient(135deg, #072b12 0%, #1a6b35 55%, #27ae60 100%);
    box-shadow: 0 10px 40px rgba(10, 80, 30, 0.42);
}

/* ─── State visibility ────────────────────────────────────────────── */
.yrd-state {
    display: none;
    align-items: flex-start;
    gap: 22px;
}

.yrd-state.yrd-active {
    display: flex;
}

/* ─── Icon ────────────────────────────────────────────────────────── */
.yrd-icon {
    font-size: 52px;
    line-height: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    user-select: none;
}

/* ─── Body text ───────────────────────────────────────────────────── */
.yrd-body {
    flex: 1;
    min-width: 0;
}

.yrd-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.3;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.yrd-desc {
    font-size: 14px;
    margin: 0 0 20px;
    opacity: 0.92;
    line-height: 1.65;
}

/* ─── Buttons ─────────────────────────────────────────────────────── */
.yrd-btn {
    display: inline-flex;
    align-items: center;
    border: none;
    border-radius: 50px;
    padding: 13px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, opacity 0.16s ease;
    line-height: 1;
    text-decoration: none;
    font-family: inherit;
}

.yrd-btn:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.65);
    outline-offset: 3px;
}

/* Primary: white button for promo state */
.yrd-btn-review {
    background: #fff;
    color: #7b1d4a;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.yrd-btn-review:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.32);
}

/* Actions row for pending state */
.yrd-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Secondary: ghost button */
.yrd-btn-secondary {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.38);
    backdrop-filter: blur(6px);
}

.yrd-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
}

/* Confirm: pulsing green button */
.yrd-btn-confirm {
    background: #2ecc71;
    color: #fff;
    box-shadow: 0 4px 18px rgba(46, 204, 113, 0.45);
    animation: yrd-pulse 2.2s ease-in-out infinite;
}

.yrd-btn-confirm:hover {
    background: #27ae60;
    transform: translateY(-2px);
    animation: none;
    box-shadow: 0 6px 24px rgba(46, 204, 113, 0.55);
}

@keyframes yrd-pulse {
    0%, 100% { box-shadow: 0 4px 18px rgba(46, 204, 113, 0.45); }
    50%       { box-shadow: 0 4px 32px rgba(46, 204, 113, 0.75); }
}

/* ─── Animated SVG checkmark ──────────────────────────────────────── */
.yrd-checkmark {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
}

.yrd-checkmark circle {
    stroke: rgba(255, 255, 255, 0.55);
    stroke-width: 2;
    stroke-dasharray: 157;
    stroke-dashoffset: 157;
}

.yrd-checkmark path {
    stroke: #fff;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
}

/* Animate only when state-done becomes active */
.yrd-state-done.yrd-active .yrd-checkmark circle {
    animation: yrd-circle 0.5s ease-out forwards;
}

.yrd-state-done.yrd-active .yrd-checkmark path {
    animation: yrd-check 0.4s ease-out 0.45s forwards;
}

@keyframes yrd-circle {
    to { stroke-dashoffset: 0; }
}

@keyframes yrd-check {
    to { stroke-dashoffset: 0; }
}

/* ─── Done state extras ───────────────────────────────────────────── */
.yrd-state-done .yrd-title {
    font-size: 22px;
}

.yrd-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.18);
    border: 1.5px solid rgba(255, 255, 255, 0.38);
    border-radius: 50px;
    padding: 7px 20px;
    font-size: 15px;
    margin: 4px 0 0;
    backdrop-filter: blur(6px);
}

.yrd-badge strong {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* ─── Mobile ──────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .yrd-banner {
        padding: 20px 18px;
        border-radius: 14px;
        margin-bottom: 20px;
    }

    .yrd-state.yrd-active {
        flex-direction: column;
        gap: 14px;
    }

    .yrd-icon {
        font-size: 38px;
    }

    .yrd-title {
        font-size: 17px;
    }

    .yrd-checkmark {
        width: 56px;
        height: 56px;
    }

    .yrd-btn {
        padding: 12px 22px;
        font-size: 14px;
    }

    .yrd-state-done .yrd-title {
        font-size: 19px;
    }

    .yrd-badge strong {
        font-size: 19px;
    }
}
