/**
 * WooCommerce Donations - Frontend Styles
 */

/* ==========================================================================
   Donation Form
   ========================================================================== */

.wcd-donation-cart {
    max-width: 100%;
}

.wcd-amounts-section {
    margin-bottom: 25px;
}

.wcd-amounts-label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

/* Amount Buttons */
.wcd-amounts-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media (max-width: 600px) {
    .wcd-amounts-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

.wcd-amount-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wcd-amount-btn:hover {
    background: #e8e8e8;
    border-color: #ccc;
}

.wcd-amount-btn.active {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}

/* Radio Buttons */
.wcd-amounts-radio {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wcd-radio-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wcd-radio-option:hover {
    background: #e8e8e8;
}

.wcd-radio-option input[type="radio"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
}

.wcd-radio-option input[type="radio"]:checked + .wcd-radio-label {
    font-weight: 600;
    color: #4CAF50;
}

/* Dropdown */
.wcd-amounts-dropdown {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

/* Custom Amount Input */
.wcd-custom-amount-section {
    margin-bottom: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.wcd-custom-label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.wcd-custom-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.wcd-currency-symbol {
    position: absolute;
    left: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #666;
}

.wcd-currency-symbol.wcd-currency-right,
.wcd-currency-symbol.wcd-currency-right_space {
    left: auto;
    right: 15px;
}

.wcd-custom-amount-input {
    width: 100%;
    padding: 15px 15px 15px 40px;
    font-size: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

.wcd-currency-right .wcd-custom-amount-input,
.wcd-currency-right_space .wcd-custom-amount-input {
    padding: 15px 40px 15px 15px;
}

.wcd-custom-amount-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.wcd-amount-limits-info {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

/* Donation Total */
.wcd-donation-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f8f8;
    border-radius: 8px;
    margin-bottom: 20px;
}

.wcd-total-label {
    font-weight: 600;
    color: #333;
}

.wcd-total-amount {
    font-size: 24px;
    font-weight: 700;
    color: #4CAF50;
}

/* Donate Button */
.wcd-donate-button {
    width: 100%;
    padding: 15px 30px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #4CAF50 !important;
    border: none !important;
    border-radius: 8px !important;
    color: #fff !important;
    cursor: pointer;
    transition: background 0.2s ease;
}

.wcd-donate-button:hover {
    background: #45a049 !important;
}

/* ==========================================================================
   Goal Progress Section
   ========================================================================== */

.wcd-goal-progress-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.wcd-progress-bar-wrapper {
    margin-bottom: 20px;
}

.wcd-progress-bar {
    position: relative;
    width: 100%;
    height: 25px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
}

.wcd-progress-fill {
    height: 100%;
    background: #4CAF50;
    border-radius: 15px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
}

.wcd-progress-percentage {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.wcd-progress-percentage-outside {
    display: inline-block;
    margin-top: 5px;
    font-size: 14px;
    font-weight: 600;
    color: #4CAF50;
}

.wcd-goal-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-around;
}

.wcd-stat {
    text-align: center;
}

.wcd-stat-amount {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.wcd-stat-label {
    display: block;
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wcd-goal-reached {
    margin-top: 15px;
    padding: 10px;
    background: #e8f5e9;
    border-radius: 8px;
    text-align: center;
    color: #2e7d32;
}

.wcd-goal-reached-icon {
    font-size: 24px;
    margin-right: 5px;
}

.wcd-goal-reached-text {
    font-weight: 600;
}

.wcd-campaign-ended {
    color: #f44336;
}

/* ==========================================================================
   Thank You Message
   ========================================================================== */

.wcd-thank-you-message {
    padding: 20px;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
}

.wcd-thank-you-message p {
    font-size: 18px;
    color: #2e7d32;
    margin: 0;
}

/* ==========================================================================
   My Account - Donations Tab
   ========================================================================== */

.wcd-my-donations {
    margin: 0;
}

.wcd-donations-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.wcd-summary-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-radius: 10px;
    color: #fff;
    text-align: center;
}

.wcd-summary-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.wcd-summary-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.wcd-summary-label {
    font-size: 14px;
    opacity: 0.9;
}

.wcd-no-donations {
    text-align: center;
    padding: 50px 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.wcd-no-donations p {
    margin-bottom: 20px;
    color: #666;
}

.wcd-donations-table {
    width: 100%;
    border-collapse: collapse;
}

.wcd-donations-table th {
    text-align: left;
    padding: 12px 15px;
    background: #f5f5f5;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
}

.wcd-donations-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.wcd-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.wcd-status-processing {
    background: #fff3e0;
    color: #e65100;
}

.wcd-status-completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.wcd-status-pending {
    background: #fce4ec;
    color: #c2185b;
}

.wcd-status-on-hold {
    background: #e3f2fd;
    color: #1565c0;
}

.wcd-col-actions .button {
    margin-right: 5px;
    margin-bottom: 5px;
}

.wcd-donations-pagination {
    margin-top: 20px;
}

.wcd-donations-pagination ul {
    display: flex;
    justify-content: center;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.wcd-donations-pagination li a,
.wcd-donations-pagination li span {
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
}

.wcd-donations-pagination li span.current {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}

/* ==========================================================================
   Cart & Checkout
   ========================================================================== */

.wcd-donation-item {
    display: flex;
    align-items: center;
}

.wcd-donation-item::before {
    content: '💝';
    margin-right: 8px;
}

/* ==========================================================================
   RTL Support
   ========================================================================== */

[dir="rtl"] .wcd-currency-symbol {
    left: auto;
    right: 15px;
}

[dir="rtl"] .wcd-custom-amount-input {
    padding: 15px 40px 15px 15px;
}

[dir="rtl"] .wcd-currency-symbol.wcd-currency-right,
[dir="rtl"] .wcd-currency-symbol.wcd-currency-right_space {
    right: auto;
    left: 15px;
}

[dir="rtl"] .wcd-currency-right .wcd-custom-amount-input,
[dir="rtl"] .wcd-currency-right_space .wcd-custom-amount-input {
    padding: 15px 15px 15px 40px;
}

[dir="rtl"] .wcd-col-actions .button {
    margin-right: 0;
    margin-left: 5px;
}

[dir="rtl"] .wcd-donation-item::before {
    margin-right: 0;
    margin-left: 8px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .wcd-goal-stats {
        gap: 15px;
    }
    
    .wcd-stat-amount {
        font-size: 20px;
    }
    
    .wcd-donations-table thead {
        display: none;
    }
    
    .wcd-donations-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 15px;
    }
    
    .wcd-donations-table td {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border: none;
    }
    
    .wcd-donations-table td::before {
        content: attr(data-title);
        font-weight: 600;
    }
}
