/**
 * Donation Form Styles
 */

/* Container and Layout */
.zd-donation-form-container {
    max-width: 600px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.zd-donation-form-container.zd-rtl {
    direction: rtl;
    text-align: right;
}

.zd-form-title {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 20px 0;
    text-align: center;
}

.zd-form-description {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
    text-align: center;
}

/* Form Sections */
.zd-form-section {
    margin-bottom: 25px;
}

.zd-section-label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.zd-required {
    color: #e74c3c;
}

/* Amount Selection */
.zd-suggested-amounts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.zd-amount-option {
    position: relative;
    cursor: pointer;
    margin: 0;
}

.zd-amount-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.zd-amount-label {
    display: block;
    padding: 15px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    font-size: 16px;
    color: #2c3e50;
    background: #ffffff;
    transition: all 0.3s ease;
}

.zd-amount-option input[type="radio"]:checked + .zd-amount-label {
    border-color: #3498db;
    background: #3498db;
    color: #ffffff;
}

.zd-amount-option:hover .zd-amount-label {
    border-color: #3498db;
    background: #ecf0f1;
}

.zd-amount-option input[type="radio"]:checked + .zd-amount-label:hover {
    background: #2980b9;
}

.zd-custom-amount-option .zd-amount-label {
    background: #f8f9fa;
    border-color: #dee2e6;
}

/* Custom Amount Input */
.zd-custom-amount-wrapper {
    position: relative;
    margin-top: 15px;
}

#zd-custom-amount {
    width: 100%;
    padding: 15px 80px 15px 15px;
    font-size: 16px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    background: #ffffff;
    transition: border-color 0.3s ease;
}

.zd-rtl #zd-custom-amount {
    padding: 15px 15px 15px 80px;
}

#zd-custom-amount:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.zd-currency-symbol {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    color: #666;
    pointer-events: none;
}

.zd-rtl .zd-currency-symbol {
    right: auto;
    left: 15px;
}

.zd-amount-limits {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
    text-align: center;
}

/* Form Inputs */
.zd-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.zd-form-group {
    flex: 1;
}

.zd-form-group-full {
    width: 100%;
}

.zd-form-group-half {
    flex: 0 0 calc(50% - 7.5px);
}

.zd-form-group label {
    display: block;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.zd-form-control {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    background: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.zd-form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.zd-form-control:invalid {
    border-color: #e74c3c;
}

textarea.zd-form-control {
    resize: vertical;
    min-height: 100px;
}

/* Character Counter */
.zd-character-count {
    display: block;
    text-align: right;
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

.zd-rtl .zd-character-count {
    text-align: left;
}

/* Privacy Section */
.zd-privacy-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
}

.zd-privacy-notice {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* Submit Button */
.zd-submit-section {
    text-align: center;
}

.zd-submit-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #ffffff;
    border: none;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    position: relative;
}

.zd-submit-btn:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

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

.zd-submit-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading State */
.zd-btn-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.zd-submit-btn.loading .zd-btn-text {
    display: none;
}

.zd-submit-btn.loading .zd-btn-loading {
    display: flex;
}

.zd-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages */
.zd-form-messages {
    margin-top: 20px;
}

.zd-message {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 500;
}

.zd-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.zd-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.zd-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .zd-donation-form-container {
        margin: 20px 15px;
        padding: 20px 15px;
    }
    
    .zd-form-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .zd-form-group-half {
        flex: none;
        width: 100%;
    }
    
    .zd-suggested-amounts {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .zd-amount-label {
        padding: 12px 8px;
        font-size: 14px;
    }
    
    .zd-submit-btn {
        width: 100%;
        padding: 15px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .zd-suggested-amounts {
        grid-template-columns: 1fr;
    }
    
    .zd-form-title {
        font-size: 24px;
    }
    
    .zd-form-description {
        font-size: 14px;
    }
}

/* Theme Variations */
.zd-theme-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #ffffff;
}

.zd-theme-modern .zd-form-title,
.zd-theme-modern .zd-section-label,
.zd-theme-modern .zd-form-group label {
    color: #ffffff;
}

.zd-theme-modern .zd-form-control {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.zd-theme-modern .zd-form-control:focus {
    background: #ffffff;
    border-color: #ffffff;
}

.zd-theme-minimal {
    border: none;
    box-shadow: none;
    background: transparent;
}

.zd-theme-minimal .zd-form-control {
    border: none;
    border-bottom: 2px solid #e1e5e9;
    border-radius: 0;
    background: transparent;
}

.zd-theme-minimal .zd-form-control:focus {
    border-bottom-color: #3498db;
    box-shadow: none;
}

/* Donation Stats Shortcode */
.zd-donation-stats {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.zd-stats-format-boxes .zd-donation-stats {
    flex-wrap: wrap;
}

.zd-stat-item {
    flex: 1;
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.zd-stats-format-boxes .zd-stat-item {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 200px;
}

.zd-stat-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.zd-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

.zd-stats-format-inline .zd-donation-stats {
    align-items: center;
}

.zd-stats-format-inline .zd-stat-item {
    padding: 10px 15px;
    background: none;
    border: none;
}

.zd-stats-format-inline .zd-stat-label::after {
    content: ": ";
}

.zd-stats-format-list .zd-donation-stats {
    flex-direction: column;
    gap: 10px;
}

/* Recent Donations */
.zd-recent-donations {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.zd-donation-item {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
}

.zd-donation-item:last-child {
    border-bottom: none;
}

.zd-donation-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 5px;
}

.zd-donor-name {
    font-weight: 600;
    color: #2c3e50;
}

.zd-donation-amount {
    background: #e8f4fd;
    color: #2980b9;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

.zd-donation-date {
    color: #666;
    font-size: 12px;
    margin-left: auto;
}

.zd-donation-message {
    color: #666;
    font-size: 14px;
    font-style: italic;
    margin-top: 5px;
}

/* Progress Bar */
.zd-donation-progress {
    margin: 20px 0;
}

.zd-progress-bar {
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
}

.zd-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transition: width 0.3s ease;
    border-radius: 15px;
}

.zd-progress-info {
    text-align: center;
}

.zd-progress-percentage {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.zd-progress-amounts {
    font-size: 16px;
    color: #666;
    margin-bottom: 5px;
}

.zd-current-amount {
    font-weight: 600;
    color: #2980b9;
}

.zd-goal-amount {
    font-weight: 600;
    color: #2c3e50;
}

.zd-goal-separator {
    margin: 0 8px;
}

.zd-progress-remaining {
    font-size: 14px;
    color: #666;
}