/* Frontend styles for WP Stripe Donations */
.wpsd-notice {
    padding: 12px 14px;
    border-radius: 5px;
    max-width: 680px;
}

.wpsd-notice-success {
    background: #ebf3ff;
    color: #2d519f;
}

.wpsd-notice-error {
    background: #fdebec;
    color: #a61b1b;
}

.wpsd-notice-warning {
    background: #fff6e5;
    color: #9a6700;
}

.wpsd-notice-info {
    background: #eaf3ff;
    color: #1d4f91;
}

.wpsd-progress-card {
    border: 0;
    border-radius: 0;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    padding: 18px 18px 14px;
    margin-bottom: 14px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.wpsd-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.wpsd-progress-raised {
    display: flex;
    align-items: baseline;
    gap: 0;
    color: #0f172a;
    font-weight: 800;
}

.wpsd-progress-raised-current {
    font-size: clamp(32px, 7vw, 46px);
    line-height: 1;
    letter-spacing: -0.03em;
}

.wpsd-progress-raised-separator {
    font-size: clamp(24px, 5.5vw, 36px);
    line-height: 1;
    color: #cbd5e1;
    margin: 0 6px;
}

.wpsd-progress-raised-goal {
    font-size: clamp(24px, 5.5vw, 36px);
    line-height: 1;
    letter-spacing: -0.03em;
    color: #94a3b8;
}

.wpsd-progress-status {
    text-align: right;
    color: #0f172a;
    font-weight: 700;
    font-size: 14px;
}

.wpsd-progress-track {
    position: relative;
    height: 13px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.wpsd-progress-fill {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #2d519f 0%, #19BECD 100%);
    transform-origin: left center;
    transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.wpsd-progress-footer {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.wpsd-progress-donations {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
}

.wpsd-progress-donations .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 1;
}

.wpsd-progress-views {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
}

.wpsd-progress-views .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 1;
}

.wpsd-donation-form {
    padding: 30px;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
    display: grid;
    gap: 28px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.wpsd-donation-form.wpsd-donation-form--reveal:not(.is-revealed) {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    gap: 0;
}

.wpsd-reveal-wrap {
    margin-bottom: 6px;
}

.wpsd-progress-reveal-btn {
    width: 100%;
    border: 0;
    border-radius: 999px;
    min-height: 54px;
    padding: 14px 24px;
    background: linear-gradient(90deg, #2d519f 0%, #28a86c 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 14px 30px rgba(31, 122, 77, 0.28);
}

.wpsd-progress-reveal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(31, 122, 77, 0.34);
}

.wpsd-progress-reveal-btn.is-hidden {
    display: none;
}


.wpsd-design-classic .wpsd-body {
    display: grid;
    gap: 22px;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.35s ease, transform 0.35s ease;
}

.wpsd-design-classic .wpsd-body.is-collapsed {
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}

.wpsd-design-classic .wpsd-body.is-expanded {
    max-height: 3000px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.wpsd-design-classic .wpsd-amount-dependent {
    display: none;
}

.wpsd-design-classic .wpsd-amount-dependent.is-visible {
    display: grid;
    gap: 22px;
}

.wpsd-design-classic .wpsd-field {
    display: grid;
    gap: 8px;
}

.wpsd-design-classic .wpsd-label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    margin-bottom: 2px;
}

.wpsd-design-classic .wpsd-frequency-group {
    display: flex;
    gap: 6px;
    padding: 8px;
    border-radius: 50px;
    background: #f3f4f6;
    overflow-x: auto;
}

.wpsd-design-classic .wpsd-frequency-option {
    position: relative;
    display: flex;
    flex: 1;
    min-width: fit-content;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 13px;
    border-radius: 50px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.wpsd-design-classic .wpsd-frequency-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wpsd-design-classic .wpsd-frequency-option span {
    width: 100%;
    padding: 10px 14px;
    text-align: center;
    border-radius: 50px;
    color: #4b5563;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.wpsd-design-classic .wpsd-frequency-helper {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
    white-space: normal;
    opacity: 0.9;
}

.wpsd-design-classic .wpsd-frequency-option:hover {
    color: #111827;
}

.wpsd-design-classic .wpsd-frequency-option input:checked + span {
    color: #000;
    background: #fff;
	box-shadow: 0 0px 6px rgba(0, 0, 0, 0.1);
}

.wpsd-design-classic .wpsd-amount-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.wpsd-design-classic .wpsd-amount-option {
	appearance: none;
    border: 2px solid #f3f4f6;
    background: #fff;
    color: #374151;
    border-radius: 5px;
    padding: 12px 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wpsd-design-classic .wpsd-amount-option--package {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.wpsd-design-classic .wpsd-amount-card-price {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.2;
}

.wpsd-design-classic .wpsd-amount-card-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    align-items: center;
}

.wpsd-design-classic .wpsd-amount-card-title {
    font-size: 16px;
    line-height: 1.35;
    color: #111827;
}

.wpsd-design-classic .wpsd-amount-card-description {
    display: block;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
    color: #1f2937;
}

.wpsd-design-classic .wpsd-amount-option:hover {
    border-color: #2d519f;
}

.wpsd-design-classic .wpsd-amount-option.is-active {
    border-color: #2d519f;
    background: #ebf3ff;
    color: #2d519f;
    box-shadow: 0 0 0 1px #2d519f inset;
}

.wpsd-design-classic .wpsd-amount-input-wrap {
    position: relative;
}


.wpsd-design-classic input[name="amount"] {
    font-size: 16px;
    padding: 12px 14px;
    border-radius: 5px;
    border: 1px solid #f3f4f6;
    width: 100%;
    min-height: 48px;
}

.wpsd-design-classic .wpsd-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.wpsd-design-classic .wpsd-details-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

.wpsd-submit {
    padding: 14px 16px;
    border: none;
    background: #2d519f;
    color: #fff;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.2s ease;
}

.wpsd-design-classic .wpsd-submit:hover {
    background: #1d3663;
}

.wpsd-design-classic .wpsd-submit:disabled {
    background: #d1d5db;
    color: #6b7280;
    opacity: 1;
    cursor: not-allowed;
}

.wpsd-design-classic .wpsd-submit:disabled:hover {
    background: #d1d5db;
}

.wpsd-design-classic .wpsd-payment-summary {
    border: 1px solid #f3f4f6;
    background: #f9fafb;
    border-radius: 5px;
    padding: 12px;
}

.wpsd-design-classic .wpsd-payment-summary.is-empty {
    display: none;
}

.wpsd-design-classic .wpsd-payment-summary-line {
    color: #374151;
    font-size: 13px;
    line-height: 1.35;
}

.wpsd-design-classic .wpsd-summary-line-emphasis {
    font-weight: 700;
    color: #111827;
}

.wpsd-design-classic .wpsd-summary-line-small {
    font-size: 12px;
}

.wpsd-design-classic .wpsd-summary-line-total {
    font-weight: 700;
    color: #2d519f;
}

.wpsd-design-classic input[type="text"],
.wpsd-design-classic input[type="email"],
.wpsd-design-classic input[type="tel"],
.wpsd-design-classic select {
    font-size: 15px;
    padding: 12px 14px;
    border-radius: 5px;
    border: 1px solid #f3f4f6;
    width: 100%;
    max-width: none;
    min-height: 46px;
}

.wpsd-design-classic .wpsd-payment-element {
    padding: 12px;
    border: 1px solid #f3f4f6;
    border-radius: 5px;
    background: #fff;
}

.wpsd-design-classic .wpsd-card-errors {
    color: #a61b1b;
    margin-top: 6px;
}

.wpsd-design-classic .wpsd-validation-wrap {
    display: grid;
    gap: 4px;
}

.wpsd-design-classic label.error {
    color: #a61b1b;
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 10px;
    margin-top: 5px;
}

.wpsd-design-classic input.error,
.wpsd-design-classic select.error {
    border-color: #a61b1b;
}

.wpsd-design-classic .wpsd-checkbox {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 600;
    border: 1px solid #f3f4f6;
    border-radius: 5px;
    padding: 12px;
    cursor: pointer;
    background: #fff;
}

.wpsd-design-classic .wpsd-checkbox-content {
    flex: 1;
    min-width: 0;
}

.wpsd-design-classic .wpsd-checkbox-has-logo {
    min-height: 72px;
}

.wpsd-design-classic .wpsd-checkbox-logo {
    position: absolute;
    right: 12px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 64px;
    max-height: 30px;
    pointer-events: none;
}

.wpsd-design-classic .wpsd-checkbox-logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 64px;
    max-height: 30px;
    object-fit: contain;
}

.wpsd-dev-support[data-visible="0"] {
    display: none;
}

.wpsd-design-classic .wpsd-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 3px;
}

.wpsd-design-classic .wpsd-dev-support input[name="dev_support_amount"] {
    display: none;
    font-size: 15px;
    padding: 12px 14px;
    border-radius: 5px;
    border: 1px solid #f3f4f6;
    width: 100%;
    max-width: none;
}

.wpsd-design-classic .wpsd-dev-support .wpsd-dev-support-title {
    display: block;
}

.wpsd-design-classic .wpsd-dev-support .wpsd-dev-support-subrow {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.wpsd-design-classic .wpsd-dev-support .wpsd-dev-support-subrow .wpsd-note {
    flex: 1;
    min-width: 0;
}

.wpsd-design-classic .wpsd-dev-support .wpsd-dev-support-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    max-width: 64px;
    max-height: 30px;
    pointer-events: none;
}

.wpsd-design-classic .wpsd-dev-support .wpsd-dev-support-logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 64px;
    max-height: 30px;
    object-fit: contain;
}

.wpsd-design-classic .wpsd-note {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
}

.wpsd-design-classic .wpsd-gift-aid-amount {
    font-weight: 700;
    background-color: #2d519f;
    color: #fff;
    padding: 3px 8px;
    border-radius: 50px;
}

.wpsd-design-classic .wpsd-gift-aid {
    gap: 8px;
}

.wpsd-design-classic .wpsd-gift-aid .wpsd-gift-aid-checkbox-has-logo {
    padding-right: 12px;
    min-height: 0;
}

.wpsd-design-classic .wpsd-gift-aid .wpsd-gift-aid-title {
    display: block;
}

.wpsd-design-classic .wpsd-gift-aid .wpsd-gift-aid-subrow {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.wpsd-design-classic .wpsd-gift-aid .wpsd-gift-aid-subrow .wpsd-note {
    flex: 1;
    min-width: 0;
}

.wpsd-design-classic .wpsd-gift-aid .wpsd-gift-aid-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    max-width: 64px;
    max-height: 30px;
    pointer-events: none;
}

.wpsd-design-classic .wpsd-gift-aid .wpsd-gift-aid-logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 64px;
    max-height: 30px;
    object-fit: contain;
}

.wpsd-design-classic .wpsd-gift-aid-address {
    display: none;
    margin-top: 8px;
}

.wpsd-design-classic .wpsd-gift-aid-address .wpsd-label {
    display: block;
    font-size: 12px;
    margin-bottom: 0;
}

.wpsd-design-classic .wpsd-gift-aid-address input[type="text"] {
    max-width: none;
}

.wpsd-design-classic .wpsd-gift-aid-address .wpsd-gift-aid-address-note {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: #6b7280;
}

.wpsd-processing-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(17, 24, 39, 0.45);
}

.wpsd-processing-overlay.is-visible {
    display: flex;
}

.wpsd-processing-content {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    color: #111827;
    border-radius: 5px;
    padding: 14px 18px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

.wpsd-processing-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    border-top-color: #2d519f;
    animation: wpsd-spin 0.8s linear infinite;
}

@keyframes wpsd-spin {
    to {
        transform: rotate(360deg);
    }
}

.wpsd-onboarding-form .wpsd-onboarding-title {
    margin: 0;
    font-size: 26px;
    line-height: 1.2;
    color: #111827;
}

.wpsd-onboarding-form .wpsd-submit {
    width: 100%;
}

.wpsd-design-classic .wpsd-field.wpsd-onboarding-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
}

.wpsd-onboarding-form .wpsd-onboarding-actions .wpsd-submit {
    width: auto;
    min-width: 180px;
}

.wpsd-onboarding-form .wpsd-submit-connect {
    background-color: #115f3a;
    border-color: #115f3a;
    color: #ffffff;
}

.wpsd-onboarding-form .wpsd-submit-connect:hover {
    background-color: #0f5232;
    border-color: #0f5232;
}

.wpsd-onboarding-form .wpsd-submit-disconnect {
    background-color: #fff5f5;
    border: 1px solid #e11d48;
    color: #b91c1c;
}

.wpsd-onboarding-form .wpsd-submit-disconnect:hover {
    background-color: #ffe4e6;
    border-color: #be123c;
    color: #9f1239;
}

.wpsd-onboarding-disconnect-form {
    display: none;
}

@media (max-width: 640px) {
    .wpsd-donation-form {
        padding: 20px 16px;
        border-radius: 0;
    }

    .wpsd-design-classic .wpsd-title {
        font-size: 32px;
    }

    .wpsd-design-classic .wpsd-amount-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .wpsd-design-classic .wpsd-details-grid {
        grid-template-columns: 1fr;
    }

    .wpsd-onboarding-form .wpsd-onboarding-title {
        font-size: 22px;
    }

    .wpsd-design-classic .wpsd-field.wpsd-onboarding-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .wpsd-onboarding-form .wpsd-onboarding-actions .wpsd-submit {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 640px) {
    .wpsd-design-classic .wpsd-note{
        font-size: 11px;
    }

}
