/* Toast wrapper — applied to .item-list by postProcessToast */
.meowl-donate-toast {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
}

/* Hide BB toast icon */
.meowl-donate-toast .toast-messages-icon .bb-icon {
    display: none !important;
}

/* Inner container */
.meowl-donate {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 2px 0;
}

/* CTA headline */
.meowl-donate__cta {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
}

/* Tier button card */
.meowl-donate__button {
    display: flex;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.meowl-donate__button--selected {
    border: 3px solid #ef5455;
}

/* Left side — video animation */
.meowl-donate__animation {
    width: 160px;
    min-width: 140px;
    flex-shrink: 0;
    background: #f8f8f6;
    position: relative;
    transition: opacity 0.2s ease;
}

/* Dim unselected tier animations */
.meowl-donate__button:not(.meowl-donate__button--selected) .meowl-donate__animation {
    opacity: 0.6;
}

.meowl-donate__animation-inner {
    border-radius: 9px;
    overflow: hidden;
    position: relative;
    z-index: 1;
    aspect-ratio: 3 / 1.7;
}

.meowl-donate__video {
    width: 100%;
    height: 118%;
    object-fit: cover;
    object-position: center 45%;
    display: block;
    margin-top: -9%;
}

/* Right side — price */
.meowl-donate__price {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f8f6;
    padding: 6px 4px;
    min-width: 0;
}

.meowl-donate__amount {
    font-weight: 700;
    font-size: 22px;
    color: #1e293b;
    line-height: 1.2;
}

.meowl-donate__converted {
    font-size: 13px;
    color: #7a7a7a;
    margin-top: 2px;
}

/* Custom field — contenteditable input */
.meowl-donate__custom-field {
    display: inline-flex;
    align-items: baseline;
    border-bottom: 1.5px solid #9ca3af;
    padding-bottom: 2px;
    max-width: 100%;
}

.meowl-donate__custom-field--active {
    border-bottom-color: #1e293b;
}

.meowl-donate__custom-currency {
    font-weight: 700;
    font-size: 22px;
    color: #1e293b;
    pointer-events: none;
    user-select: none;
    line-height: 1;
}

.meowl-donate__custom-input {
    display: inline-block;
    min-width: 20px;
    max-width: 80px;
    border: none;
    background: transparent;
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    outline: none;
    padding: 0 0 0 2px;
    line-height: 1;
    cursor: text;
}

.meowl-donate__custom-input:empty::before {
    content: "0";
    color: #d1d5db;
}

.meowl-donate__custom-input br {
    display: none;
}

/* Slot machine — cycling numbers */
.meowl-donate__slot {
    display: inline-flex;
    align-items: baseline;
    font-weight: 700;
    font-size: 22px;
    color: #9ca3af;
    border-bottom: 1.5px solid #9ca3af;
    padding-bottom: 2px;
}

.meowl-donate__slot-value {
    display: inline-block;
    height: 1em;
    overflow: hidden;
    line-height: 1;
    vertical-align: baseline;
}

.meowl-donate__slot-reel {
    display: flex;
    flex-direction: column;
    animation: meowl-donate-slot 8s linear infinite;
}

.meowl-donate__slot-reel span {
    height: 1em;
    line-height: 1;
}

@keyframes meowl-donate-slot {
    0%      { transform: translateY(0); }
    13.33%  { transform: translateY(0); animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
    16.67%  { transform: translateY(-14.286%); }
    30%     { transform: translateY(-14.286%); animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
    33.33%  { transform: translateY(-28.571%); }
    46.67%  { transform: translateY(-28.571%); animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
    50%     { transform: translateY(-42.857%); }
    63.33%  { transform: translateY(-42.857%); animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
    66.67%  { transform: translateY(-57.143%); }
    80%     { transform: translateY(-57.143%); animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
    83.33%  { transform: translateY(-71.429%); }
    96.67%  { transform: translateY(-71.429%); animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
    100%    { transform: translateY(-85.714%); }
}

/* Donate submit button — scoped to beat Elementor/BB generic button resets */
.meowl-donate .meowl-donate__submit {
    width: 100%;
    padding: 9px;
    background: #ef5455;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    transition: opacity 0.15s ease;
}

.meowl-donate .meowl-donate__submit:hover {
    opacity: 0.9;
    border: none;
}

.meowl-donate .meowl-donate__submit--loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Mobile — wider toast gets slightly larger fonts */
@media (min-width: 480px) {
    .meowl-donate__amount {
        font-size: 24px;
    }

    .meowl-donate__converted {
        font-size: 14px;
    }

    .meowl-donate__custom-currency,
    .meowl-donate__custom-input,
    .meowl-donate__slot {
        font-size: 24px;
    }

    .meowl-donate .meowl-donate__submit {
        font-size: 15px;
        padding: 10px;
    }
}

/* Font size steps — on field parent to cascade to both input and currency */
.meowl-donate__custom-field--md .meowl-donate__custom-input,
.meowl-donate__custom-field--md .meowl-donate__custom-currency {
    font-size: 18px;
}

.meowl-donate__custom-field--sm .meowl-donate__custom-input,
.meowl-donate__custom-field--sm .meowl-donate__custom-currency {
    font-size: 14px;
}
