/* Container */
.mobilepay-donation-container {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    /* overflow: hidden; Removed to allow hearts to fly out */
}

.mpd-header h3 {
    color: black;
    margin-top: 0;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.mpd-header p {
    color: #666;
    text-align: center;
    margin-bottom: 24px;
}

/* Mode Selector (Segmented Control) */
.mpd-mode-selector {
    display: flex;
    background: #e3e3e3;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 24px;
    border: 1px solid #edf2f7;
}

.mpd-mode-option {
    flex: 1;
    text-align: center;
    position: relative;
    cursor: pointer;
}

.mpd-mode-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.mpd-mode-option span {
    display: block;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #718096;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.mpd-mode-option input:checked+span {
    background: #ffffff;
    color: #5a67d8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Slider Wrapper */
.mpd-slider-wrapper {
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    transition: opacity 0.3s ease, margin 0.3s ease, height 0.3s ease;
    overflow: hidden;
    /* Kept for collapse animation */
}

.mpd-slider-wrapper.mpd-hidden {
    opacity: 0;
    height: 0;
    margin-bottom: 0;
    pointer-events: none;
}

/* The actual slider input */
.mpd-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    z-index: 2;
    position: relative;
    background: transparent;
    /* Track color handled by fill div */
}

/* Slider Thumb */
.mpd-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    background: #5a67d8;
    /* Primary Brand Color */
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 0 4px rgba(90, 103, 216, 0.2);
    transition: transform 0.1s ease;
}

.mpd-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.mpd-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    background: #5a67d8;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 0 4px rgba(90, 103, 216, 0.2);
}

/* Custom Track Fill */
.mpd-slider-track-fill {
    position: absolute;
    top: 50%;
    left: 0;
    height: 8px;
    background: #5a67d8;
    transform: translateY(-50%);
    border-radius: 4px;
    pointer-events: none;
    z-index: 1;
    width: 0%;
    /* Will be set by JS */
}

.mpd-slider-wrapper::before {
    /* Background track */
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 8px;
    background: #eff0f6;
    transform: translateY(-50%);
    border-radius: 4px;
    z-index: 0;
}

/* Hearts Animation */
.spark-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.spark {
    position: absolute;
    width: 20px;
    height: 20px;
    font-size: 20px;
    /* Added for emoji */
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: spark-fly var(--duration, 1.5s) ease-out forwards;
    opacity: 0;
    pointer-events: none;
    transform-origin: center center;
}

@keyframes spark-fly {
    0% {
        transform: translate(-50%, -50%) scale(0.2) rotate(0deg);
        opacity: 0;
    }

    10% {
        transform: translate(-50%, -60px) scale(var(--scale, 1)) rotate(var(--rotation));
        opacity: 1;
    }

    100% {
        transform: translate(calc(-50% + var(--drift-x, 0px)), -300px) scale(0) rotate(calc(var(--rotation) + 90deg));
        opacity: 0;
    }
}

/* Amount Input */
.mpd-amount-display {
    display: flex;
    margin-bottom: 24px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #edf2f7;
    overflow: hidden;
    transition: all 0.3s ease;
}

.mpd-amount-display.mpd-focused {
    background: #fff;
    border-color: #5a67d8;
    box-shadow: 0 0 0 3px rgba(90, 103, 216, 0.1);
}

.currency {
    align-items: center;
    background: white;
    border-left: 1px solid #edf2f7;
    display: flex;
    flex: 1 1 auto;
    font-size: 12px;
    font-weight: 600;
    color: black;
    padding-left: 20px;
    padding-right: 20px;
    justify-content: center;
    margin-right: 8px;
    white-space: nowrap;
}

.mpd-amount-input {
    flex: 1 1 auto;
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
    background: transparent;
    border: none;
    text-align: right;
    padding-left: 20px;
    padding-right: 20px;
    outline: none;
    width: 100%;
}

.mpd-amount-input:read-only {
    cursor: default;
    color: #4a5568;
}

/* Proceed Button */
.mpd-btn {
    width: 100%;
    padding: 16px;
    background: #5a67d8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 4px 6px rgba(90, 103, 216, 0.2);
}

.mpd-btn:hover {
    background: #434190;
}

.mpd-footer {
    text-align: center;
    margin-top: 16px;
    color: #a0aec0;
    font-size: 12px;
}