/**
 * Donate Plugin - Frontend Styles
 * Exact match to custom layout design
 */

@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&display=swap');

.donate-card-container {
    max-width: 440px;
    margin: 30px auto;
    padding: 30px 24px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    font-family: 'Hind Siliguri', 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
}

.donate-card-container * {
    box-sizing: border-box;
    font-family: inherit;
}

.donate-title {
    text-align: center;
    color: #1f2937;
    font-size: 22px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 22px;
}

.donate-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Input Fields */
.donate-input-group {
    width: 100%;
}

.donate-input {
    width: 100%;
    height: 48px;
    padding: 10px 16px;
    font-size: 15px;
    color: #374151;
    background-color: #ffffff;
    border: 1px solid #707070;
    border-radius: 6px;
    outline: none;
    transition: all 0.2s ease-in-out;
}

.donate-input::placeholder {
    color: #4b5563;
    opacity: 0.9;
    font-size: 15px;
}

.donate-input:focus {
    border-color: #00acc1;
    box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.15);
}

/* Presets Grid */
.donate-presets-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}

.donate-presets-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.donate-presets-row .donate-preset-btn {
    flex: 1;
    min-width: 0;
}

/* Preset Buttons */
.donate-preset-btn {
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #d2f7fa;
    color: #00695c;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    padding: 0 10px;
    white-space: nowrap;
}

.donate-preset-btn:hover {
    background-color: #bbf0f4;
    transform: translateY(-1px);
}

.donate-preset-btn.is-active {
    background-color: #00acc1 !important;
    color: #ffffff !important;
    border-color: #00acc1 !important;
    box-shadow: 0 4px 10px rgba(0, 172, 193, 0.35);
}

/* Custom Row with "Or" and Custom Input */
.donate-custom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.donate-custom-row .donate-preset-btn {
    flex: 1;
}

.donate-or-text {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    padding: 0 4px;
}

.donate-custom-input-wrap {
    flex: 1;
}

.donate-custom-input {
    width: 100%;
    height: 46px;
    padding: 8px 12px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    background: #ffffff;
    border: 1px solid #707070;
    border-radius: 6px;
    outline: none;
    transition: all 0.2s ease;
}

.donate-custom-input:focus {
    border-color: #00acc1;
    box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.15);
}

/* Remove spin buttons from number input */
.donate-custom-input::-webkit-outer-spin-button,
.donate-custom-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.donate-custom-input[type=number] {
    -moz-appearance: textfield;
}

/* Submit Button */
.donate-submit-wrap {
    margin-top: 8px;
    display: flex;
    justify-content: center;
}

.donate-submit-btn {
    width: 100%;
    max-width: 220px;
    height: 48px;
    background: #f36c21;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(243, 108, 33, 0.35);
    transition: all 0.2s ease-in-out;
}

.donate-submit-btn:hover {
    background: #e05b11;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(243, 108, 33, 0.45);
}

.donate-submit-btn:active {
    transform: translateY(0);
}

.donate-submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Messages / Alerts */
.donate-message-box {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}

.donate-message-box.is-error {
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
}

.donate-message-box.is-success {
    background-color: #dcfce7;
    border: 1px solid #86efac;
    color: #15803d;
}

/* Loading Spinner */
.donate-spinner-svg {
    animation: donate-rotate 2s linear infinite;
    width: 22px;
    height: 22px;
}

.donate-spinner-svg .path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: donate-dash 1.5s ease-in-out infinite;
}

@keyframes donate-rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes donate-dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .donate-card-container {
        padding: 22px 16px;
        margin: 15px auto;
    }
    
    .donate-preset-btn {
        font-size: 14px;
        height: 42px;
    }

    .donate-custom-input {
        font-size: 14px;
        height: 42px;
    }
}
