/* Hide inactive donation amount groups */
.donation-form .donation-amount-group:not(.active) {
    display: none;
}

/* Donation type buttons */
.donation-form .donation-type-btn {
    border-radius: 8px;
    background-color: #fff;
    text-transform: capitalize;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid #c7cdd6;
    width: 100%;
    position: relative;
    transition: all 0.3s ease;
    min-height: 44px;
    z-index: 1;
}

.donation-form .donation-type-btn .heart-icon {
    position: relative;
    display: inline-block;
    width: 16px;
}

.donation-form .donation-type-btn .heart-icon .move-heart {
    position: absolute;
    left: 0;
    top: 0;
    transition: all 0.3s ease;
    z-index: 3;
}

/* Heart icon container */
.donation-form .donation-type-btn .fa-heart {
    position: relative;
    transform: translate(0, 0) scale(0.8);
    display: inline-block;
    color: #ff447c;
}

/* Animation */
.donation-form .donation-type-btn .move-heart {
    animation: flying-heart-move 2.5s forwards linear;
    opacity: 1;
}

@keyframes flying-heart-move {
    0% {
        translate: 0 0 0;
        rotate: 0deg;
        opacity: 1;
    }

    5% {
        translate: 0 0 0;
        scale: 1.7;
        rotate: 0deg;
    }

    60% {
        translate: 0 -65px 0;
        scale: 1.7;
        rotate: 25deg;
    }

    80% {
        translate: 0 -80px 0;
        scale: 1.7;
        rotate: 0deg;
        opacity: 1;
    }

    100% {
        translate: 0 -95px 0;
        scale: 2;
        rotate: 0deg;
        opacity: 0;
    }
}

.donation-form .donation-type-btn:hover,
.donation-form .donation-type-btn.active {
    color: var(--accent-color);
}

.donation-form.grid-layout .donation-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.donation-form.grid-layout .donation-buttons.buttons-1 .donation-btn {
    flex: 1 1 100%;
}

.donation-form.grid-layout .donation-buttons.buttons-2 .donation-btn {
    flex: 1 1 calc(50% - 5px);
}

.donation-form.grid-layout .donation-buttons.buttons-3 .donation-btn {
    flex: 1 1 calc(33.3333% - 7.5px);
}

.donation-form.grid-layout .donation-buttons.buttons-4 .donation-btn {
    flex: 1 1 calc(33.3333% - 7.5px);
}

.donation-form .donation-type-switch {
    --switch-gap: 8px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--switch-gap);
    margin-bottom: 16px;
}

.donation-form .donation-type-switch.buttons-3 button {
    flex: 1 1 calc((100% - (2 * var(--switch-gap))) / 3);
    max-width: calc((100% - (2 * var(--switch-gap))) / 3);
}

.donation-form .donation-type-switch.buttons-2 button {
    flex: 1 1 calc(50% - (var(--switch-gap) / 2));
    max-width: calc(50% - (var(--switch-gap) / 2));
}

.donation-form .donation-type-switch.buttons-1 button {
    flex: 1 1 100%;
    width: 100%;
}

.donation-form.list-layout .donation-buttons {
    display: flex;
    flex-direction: column;
}

.donation-form .donation-box-title {
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, #020202, var(--accent-color), #020202);
    background-size: 200% auto;
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textGradientFlow 3s linear infinite;
    justify-content: center;
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 15px;
    text-align: center;
}

.donation-form-wrapper button.form-submit-button {
    margin-top: 16px;
}

/* Gradient animation */
@keyframes textGradientFlow {
    0% {
        background-position: 150% center;
    }

    100% {
        background-position: 0% center;
    }
}


/* Optional: keep arrow aligned */
.donation-form .donation-box-title .arrow-up {
    width: 24px;
    height: 24px;
    position: relative;
    top: 2px;
    left: 4px;
    color: var(--accent-color);
    display: inline-block;
    animation: arrowTilt 3s linear infinite;
    transform-origin: center center;
}


@keyframes arrowTilt {
    0% {
        transform: rotate(0deg) scale(0.8) translate(-6px, -6px);
    }

    15% {
        transform: rotate(-20deg) scale(1) translate(6px, -9px);
    }

    50% {
        transform: rotate(0deg) scale(0.8) translate(-6px, -6px);
    }

    100% {
        transform: rotate(0deg) scale(0.8) translate(-6px, -6px);
    }
}


.donation-form .donation-buttons .donation-btn {
    background-color: white;
    padding: 0px;
    min-height: 44px;
    gap: 2px;
}

.donation-form .donation-buttons .donation-btn .daily-label {
    font-size: 0px;
    opacity: 0;
    transition: 0.3s;
    font-weight: 400;
    text-transform: capitalize;
}

.donation-form .donation-buttons .donation-btn:hover>.daily-label {
    opacity: 1;
    font-size: 12px;
}

.donation-form.list-layout .donation-buttons .donation-btn:before {
    content: "\f00c";
    font-family: "Font Awesome 7 Pro";
    font-size: 12px;
    color: var(--accent-color);
    font-weight: 600;
    position: absolute;
    top: 6px;
    right: 8px;
    z-index: 1;
    opacity: 0;
}

.donation-form.list-layout .donation-buttons .donation-btn.active:before {
    opacity: 1;
}

.donation-form.grid-layout .donation-buttons .donation-btn {
    border-radius: 8px;
    border: 1px solid #c7cdd6;
    flex-direction: column;
}

.donation-form.list-layout .donation-buttons .donation-btn {
    border-top: 2px solid #c7cdd6;
    border-left: 2px solid #c7cdd6;
    border-right: 2px solid #c7cdd6;
    border-bottom: 2px solid #c7cdd6;
    margin-bottom: -2px;
    position: relative;
    gap: 2px;
    padding: 10px;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    z-index: 1;
}

.donation-form .donation-buttons .donation-btn .btn-label {
    text-align: left;
    font-weight: 400;
    text-transform: capitalize;
}

.donation-form.list-layout .donation-buttons .donation-btn:first-child {
    border-radius: 8px 8px 0 0;
}

.donation-form .donation-type-btn:before,
.donation-form .donation-buttons .donation-btn:after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    transition: 0.3s;
    border-radius: 8px;
    background-color: var(--accent-light-color);
    border: 2px solid var(--accent-color);
    z-index: -1;
    opacity: 0;
}

.donation-form .donation-type-btn.active:before,
.donation-form .donation-buttons .donation-btn.active:after {
    opacity: 1;
}

.donation-form .donation-buttons .donation-btn.active {
    color: var(--accent-color);
    z-index: 3;
}

.donation-form .form-submit-button {
    width: 100%;
}

.donation-amount-groups .donation-custom {
    position: relative;
    z-index: 1;
    border-radius: 8px;
    border: 1px solid #c7cdd6;
    display: flex;
    align-items: center;
    background-color: white;
    overflow: hidden;
}

.donation-amount-groups .donation-custom .custom-placeholder {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 4;
}

.donation-amount-groups .donation-custom .skydonate-currency-wrapper {
    position: relative;
    overflow: hidden;
    height: 50px;
    z-index: 2;
}

.donation-amount-groups .donation-custom .skydonate-currency-wrapper .currency-symbol {
    font-size: 24px;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 0px;
    min-width: 50px;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    border-radius: 6px 0 0 6px;
    line-height: 1em;
    background: white var(--sky-select-arrow) no-repeat scroll right -2px center / 20px 20px;
}

.donation-amount-groups .donation-custom .skydonate-currency-select {
    position: absolute;
    left: 0;
    top: 0;
    width: 100px;
    height: 100%;
    border: none;
    background: none;
    font-size: 16px;
    padding: 0px;
    z-index: -1;
    color: var(--accent-color);
}

.donation-amount-groups .donation-custom .custom-amount-input {
    border: none;
    text-align: left;
    height: 56px;
    line-height: 0em;
    padding: 0 8px 0 8px;
    font-size: 36px;
    font-weight: 400;
    color: var(--accent-color);
    width: calc(100% - 50px);
    position: relative;
    z-index: 2;
}

.donation-form.list-layout .donation-amount-groups .donation-custom {
    border-radius: 0 0 6px 6px;
    border-width: 2px;
}


.donation-amount-groups .donation-custom .custom-amount-input::placeholder {
    color: #ededed;
}


/* ===== Daily Date Period UI ===== */

/* Hide original dates group — JS moves inputs into editor */
.donation-daily-dates-group {
    display: none !important;
}

/* Prevent flash: hide daily UI elements until JS finishes repositioning */
.donation-form:not(.sky-daily-ready) .donation-box-title,
.donation-form:not(.sky-daily-ready) .sky-date-summary,
.donation-form:not(.sky-daily-ready) .sky-daily-note {
    display: none !important;
}

/* Collapsed summary banner — single line, scales on narrow screens */
.sky-date-summary {
    margin-top: 12px;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: #eef2fb;
    border-radius: 10px;
    text-align: center;
    font-size: clamp(11px, 3.4vw, 13px);
    color: #333;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sky-date-summary strong {
    font-weight: 700;
}

.sky-date-summary .sky-date-edit-link {
    color: #555;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    margin-left: 2px;
}

.sky-date-summary .sky-date-edit-link:hover {
    color: var(--accent-color, #3872DC);
}

/* Expanded editor panel */
.sky-date-editor {
    margin-top: 12px;
    margin-bottom: 15px;
    padding: 20px;
    background: #eef2fb;
    border-radius: 12px;
}

.sky-date-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.sky-date-editor-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}

button.sky-date-editor-close {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background: #fff;
    font-size: 18px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    box-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    font-family: inherit;
    transition: border-color 0.2s;
}

button.sky-date-editor-close:hover,
button.sky-date-editor-close:focus {
    border-color: #999;
    color: #333;
    background: #fff;
    box-shadow: none;
    outline: none;
}

/* Date fields inside the editor */
.sky-date-editor-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sky-date-editor-fields .donation-date-field {
    position: relative;
}

.sky-date-editor-fields .donation-date-field label {
    position: absolute;
    left: 14px;
    top: -8px;
    z-index: 2;
    display: block;
    margin: 0;
    padding: 0 5px;
    background: #fff;
    color: #666;
    font-weight: 500;
    font-size: 12px;
    line-height: 1.4;
    border-radius: 3px;
    pointer-events: none;
}

.sky-date-editor-fields .donation-date-field label.sky-date-label-hidden {
    display: none;
}

.sky-date-editor-fields .donation-date-field label.sky-date-label-inline {
    position: absolute;
    left: 14px;
    top: 6px;
    z-index: 2;
    display: block;
    margin: 0;
    padding: 0;
    background: none;
    color: #888;
    font-weight: 500;
    font-size: 10px;
    line-height: 1;
    pointer-events: none;
}

.sky-date-editor-fields .donation-date-field label.sky-date-label-inline+input {
    padding-top: 22px;
    padding-bottom: 10px;
    font-size: 14px;
}

.sky-date-editor-fields .donation-date-field input {
    width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    padding: 16px 44px 16px 16px;
    min-height: 52px;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    background: #fff no-repeat url("../../img/calend-d.svg") right 14px center / 18px auto;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    outline: none;
}

.sky-date-editor-fields .donation-date-field input:focus {
    border-color: var(--accent-color, #3872DC);
    box-shadow: 0 0 0 3px rgba(56, 114, 220, 0.1);
}

.sky-date-editor-fields .donation-date-field input::placeholder {
    color: #000000;
    font-weight: 400;
    font-size: 14px;
}

/* Daily total note */
.sky-daily-note {
    margin-top: 14px;
    margin-bottom: 4px;
    padding: 12px 16px;
    background: #f0f7ff;
    border-left: 3px solid var(--accent-color, #3872DC);
    border-radius: 6px;
    font-size: 13px;
    color: #333;
    line-height: 1.5;
}

/* Mobile: ensure fields stay stacked */
@media screen and (max-width: 480px) {
    .sky-date-summary {
        padding: 8px 12px;
    }

    .sky-date-editor {
        padding: 16px;
    }

    .sky-date-editor-fields .donation-date-field input {
        padding: 14px 40px 14px 14px;
        min-height: 48px;
        font-size: 14px;
    }
}

/* Responsive Styles for Amount Fields */
@media screen and (max-width: 768px) {
    /* 3-column becomes 2-column on tablets */
    /* .donation-form.grid-layout .donation-buttons.buttons-3 .donation-btn {
        flex: 1 1 calc(50% - 4px);
    } */

    /* 4-column becomes 2-column on tablets */
    /* .donation-form.grid-layout .donation-buttons.buttons-4 .donation-btn {
        flex: 1 1 calc(50% - 4px);
    } */

    /* Custom amount input adjustments */
    .donation-amount-groups .donation-custom .custom-amount-input {
        font-size: 28px;
        height: 50px;
    }

    .donation-amount-groups .donation-custom .skydonate-currency-wrapper {
        height: 44px;
    }

    .donation-amount-groups .donation-custom .skydonate-currency-wrapper .currency-symbol {
        font-size: 20px;
        min-width: 44px;
    }
}

@media screen and (max-width: 480px) {
    /* All buttons become 2-column on mobile */
    /* .donation-form.grid-layout .donation-buttons.buttons-3 .donation-btn, */
    /* .donation-form.grid-layout .donation-buttons.buttons-4 .donation-btn {
        flex: 1 1 calc(50% - 4px);
    } */

    /* Type switch buttons stack on very small screens */
    /* .donation-form .donation-type-switch.buttons-3 button {
        flex: 1 1 100%;
        max-width: 100%;
    } */

    /* Custom amount input further adjustments */
    .donation-amount-groups .donation-custom .custom-amount-input {
        font-size: 24px;
        height: 48px;
        padding: 0 6px;
    }

    .donation-amount-groups .donation-custom .skydonate-currency-wrapper {
        height: 40px;
    }

    .donation-amount-groups .donation-custom .skydonate-currency-wrapper .currency-symbol {
        font-size: 18px;
        min-width: 40px;
    }

    .donation-amount-groups .donation-custom .custom-placeholder {
        font-size: 12px;
        right: 10px;
    }

    /* Donation buttons font size */
    .donation-form .donation-buttons .donation-btn {
        min-height: 40px;
        font-size: 14px;
    }

}

/* Donation Type Select Field */
.donation-type-select-group {
    margin-top: 16px;
    border: 1px solid #c7cdd6;
    border-radius: 8px;
    position: relative;
}

.donation-type-select-group label {
    position: absolute;
    top: -11px;
    left: 10px;
    background-color: white;
    padding: 0 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-color);
}

.donation-type-select-group select.donation-category-type-select {
    width: 100%;
    border: none;
    padding: 16px;
    height: auto;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: white var(--sky-select-arrow) no-repeat scroll right 10px center / 16px 16px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.donation-type-select-group select.donation-category-type-select:focus {
    outline: none;
    border-color: var(--accent-color);
}