/**
 * Soloz Theme - Enhanced Donation Forms CSS
 * Better styling and UX for donation forms
 */

/* Donation Form Wrapper */
.soloz-donation-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.donation-form-container {
    padding: 40px;
}

/* Form Header */
.donation-form-header {
    text-align: center;
    margin-bottom: 30px;
}

.donation-form-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.donation-form-description {
    font-size: 16px;
    color: #7f8c8d;
    margin: 0;
    line-height: 1.6;
}

/* Goal Progress */
.donation-goal-progress {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.donation-goal-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.goal-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.goal-raised, .goal-target {
    text-align: center;
}

.goal-raised .amount, .goal-target .amount {
    display: block;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.goal-raised .label, .goal-target .label {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.progress-fill {
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-percentage {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* Amount Selection */
.donation-amount-section {
    margin-bottom: 30px;
}

.amount-label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.amount-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.amount-option {
    position: relative;
    cursor: pointer;
}

.amount-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.amount-button {
    display: block;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    transition: all 0.3s ease;
    cursor: pointer;
}

.amount-option input[type="radio"]:checked + .amount-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.amount-option:hover .amount-button {
    border-color: #667eea;
    transform: translateY(-1px);
}

.custom-amount-input {
    margin-top: 15px;
}

.custom-amount-input input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.custom-amount-input input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Donor Information */
.donor-information {
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.required {
    color: #e74c3c;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Payment Method */
.payment-method-section {
    margin-bottom: 30px;
}

.payment-label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.payment-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.payment-option {
    position: relative;
    cursor: pointer;
}

.payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.payment-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    transition: all 0.3s ease;
    cursor: pointer;
}

.payment-option input[type="radio"]:checked + .payment-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.payment-option:hover .payment-button {
    border-color: #667eea;
    transform: translateY(-1px);
}

/* Submit Button */
.donation-submit-section {
    text-align: center;
}

.donation-submit-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.donation-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

.donation-submit-btn:active {
    transform: translateY(-1px);
}

.donation-security {
    margin-top: 15px;
    font-size: 14px;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.donation-security i {
    color: #27ae60;
}

/* Responsive Design */
@media (max-width: 768px) {
    .donation-form-container {
        padding: 25px;
    }
    
    .donation-form-title {
        font-size: 24px;
    }
    
    .amount-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .payment-options {
        grid-template-columns: 1fr;
    }
    
    .donation-submit-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .donation-form-container {
        padding: 20px;
    }
    
    .amount-options {
        grid-template-columns: 1fr;
    }
    
    .goal-info {
        flex-direction: column;
        gap: 15px;
    }
}

/* Animation for form elements */
.donation-form-content > * {
    animation: fadeInUp 0.6s ease forwards;
}

.donation-form-content > *:nth-child(1) { animation-delay: 0.1s; }
.donation-form-content > *:nth-child(2) { animation-delay: 0.2s; }
.donation-form-content > *:nth-child(3) { animation-delay: 0.3s; }
.donation-form-content > *:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state */
.donation-form-wrapper.loading .donation-submit-btn {
    opacity: 0.7;
    pointer-events: none;
}

.donation-form-wrapper.loading .donation-submit-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
