/**
 * WooCommerce Donation - Checkout Styles
 */

.woo-donation-wrapper {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 30px;
}

.woo-donation-label {
    font-size: 1.25em;
    font-weight: 600;
    margin: 0 0 10px;
    color: #333;
}

.woo-donation-description {
    color: #666;
    font-size: 0.95em;
    margin: 0 0 20px;
    line-height: 1.5;
}

/* Donation Options */
.woo-donation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.woo-donation-option {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.woo-donation-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.woo-donation-option .woo-donation-amount {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 1em;
}

.woo-donation-option:hover .woo-donation-amount {
    border-color: #0073aa;
    background: #f0f7fc;
}

.woo-donation-option input[type="radio"]:checked + .woo-donation-amount {
    border-color: #0073aa;
    background: #0073aa;
    color: #fff;
}

.woo-donation-option input[type="radio"]:focus + .woo-donation-amount {
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.3);
}

/* Custom Amount Input */
.woo-donation-custom-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    max-width: 200px;
}

.woo-donation-currency-symbol {
    background: #e9ecef;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 6px 0 0 6px;
    padding: 10px 12px;
    font-weight: 500;
    color: #666;
}

.woo-donation-custom-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 0 6px 6px 0;
    font-size: 1em;
    width: 100%;
    min-width: 0;
}

.woo-donation-custom-input:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

/* Action Buttons */
.woo-donation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.woo-donation-button {
    background: #0073aa !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 25px !important;
    font-size: 1em !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
}

.woo-donation-button:hover {
    background: #005a87 !important;
}

.woo-donation-button:disabled {
    background: #ccc !important;
    cursor: not-allowed !important;
}

.woo-donation-remove-button {
    background: transparent !important;
    color: #dc3545 !important;
    border: 1px solid #dc3545 !important;
    padding: 12px 25px !important;
    font-size: 1em !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.woo-donation-remove-button:hover {
    background: #dc3545 !important;
    color: #fff !important;
}

/* Messages */
.woo-donation-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 0.95em;
}

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

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

/* Current Donation Display */
.woo-donation-current {
    margin-top: 15px;
    padding: 10px 15px;
    background: #e8f4fd;
    border-radius: 6px;
    color: #0073aa;
    font-weight: 500;
}

/* Order Details */
.woo-donation-order-details {
    margin: 15px 0;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

/* Responsive Styles */
@media (max-width: 600px) {
    .woo-donation-wrapper {
        padding: 15px;
    }

    .woo-donation-options {
        flex-direction: column;
    }

    .woo-donation-option .woo-donation-amount {
        display: block;
        text-align: center;
        width: 100%;
    }

    .woo-donation-custom-wrapper {
        max-width: 100%;
    }

    .woo-donation-actions {
        flex-direction: column;
    }

    .woo-donation-button,
    .woo-donation-remove-button {
        width: 100% !important;
        text-align: center !important;
    }
}

/* Loading State */
.woo-donation-wrapper.loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.woo-donation-wrapper.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #ddd;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: woo-donation-spin 0.8s linear infinite;
}

@keyframes woo-donation-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}
