/**
 * 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: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 18px;
    transition: all 0.3s ease;
}

.donate-message-box.is-error {
    background-color: #fef2f2;
    border: 1.5px solid #f87171;
    color: #991b1b;
}

.donate-message-box.is-success {
    background-color: #f0fdf4;
    border: 1.5px solid #22c55e;
    color: #15803d;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.15);
    animation: donateAlertSlideDown 0.3s ease-out;
}

.donate-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
}

.donate-alert-icon-check {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background-color: #22c55e;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.donate-alert-icon-error {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background-color: #ef4444;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.donate-alert-content {
    flex: 1;
}

@keyframes donateAlertSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 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;
    }
}

/* ==========================================================================
   Membership Form Styles
   ========================================================================== */
.donate-membership-container {
    max-width: 620px;
    margin: 30px auto;
}

.donate-membership-subtitle {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    margin-top: -14px;
    margin-bottom: 22px;
}

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

.donate-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.donate-form-row {
    display: flex;
    gap: 14px;
    width: 100%;
}

.donate-form-row .donate-col-6 {
    flex: 1 1 calc(50% - 7px);
    min-width: 0;
}

.donate-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    display: block;
}

.donate-label .required-star {
    color: #ef4444;
    font-weight: 700;
    margin-left: 2px;
}

.donate-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 36px;
}

.donate-textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px 14px;
    font-size: 14px;
    color: #374151;
    background-color: #ffffff;
    border: 1px solid #707070;
    border-radius: 6px;
    outline: none;
    transition: all 0.2s ease-in-out;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

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

.donate-membership-submit-btn {
    background-color: #00acc1;
    margin-top: 6px;
}

.donate-membership-submit-btn:hover {
    background-color: #0097a7;
    box-shadow: 0 6px 16px rgba(0, 172, 193, 0.3);
}

@media (max-width: 600px) {
    .donate-form-row {
        flex-direction: column;
        gap: 16px;
    }

    .donate-form-row .donate-col-6 {
        flex: 1 1 100%;
    }

    .donate-membership-container {
        padding: 22px 16px;
        margin: 15px auto;
    }
}
