/**
 * WooCommerce Donation Tax Deduction System - CSS Styles
 * 
 * All CSS styles for the tax deduction display and calculator
 * 
 * @package WC_Donation_Tax_Deduction
 * @version 1.0.0
 */

/* ==========================================================================
   Main Tax Deduction Display Styles
   ========================================================================== */

.wc-tax-deduction-area {
    margin-top: 8px;
    margin-bottom: 10px;
}

.wc-tax-deduction,
.wc-tax-deduction-encouragement {
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.9em;
    text-align: center;
    transition: all 0.3s ease;
    margin: 5px 0;
}

.wc-tax-deduction-encouragement {
    background-color: #e7f3ff;
    border: 1px solid #b3d9ff;
    color: #0056b3;
}

.wc-tax-deduction {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.wc-tax-deduction-message-text {
    font-weight: 500;
    line-height: 1.4;
    display: inline-block;
}

/* ==========================================================================
   Tax Calculator Shortcode Styles
   ========================================================================== */

.wc-tax-calculator-shortcode {
    max-width: 500px;
    margin: 20px auto;
    padding: 25px;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.calculator-title {
    margin-top: 0;
    color: #2c3e50;
    text-align: center;
    font-size: 1.5em;
}

.calculator-explanation {
    color: #6c757d;
    font-style: italic;
    margin-bottom: 20px;
    text-align: center;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.input-wrapper {
    position: relative;
}

.tax-calc-amount {
    width: 100%;
    padding: 12px 50px 12px 15px;
    border: 2px solid #ced4da;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.tax-calc-amount:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.currency-symbol {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-weight: 600;
}

.calculator-results {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
}

.result-row:last-child {
    margin-bottom: 0;
    padding-top: 15px;
    border-top: 2px solid #28a745;
}

.result-row.actual {
    background-color: #d4edda;
    padding: 12px;
    border-radius: 6px;
    color: #155724;
}

/* ==========================================================================
   Tax Calculator Widget Styles
   ========================================================================== */

.tax-calculator-widget {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.widget-explanation {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 15px;
}

.widget-calculator-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #495057;
}

.widget-tax-amount {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}

.widget-tax-amount:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.widget-result {
    padding: 15px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #28a745;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.widget-result-actual {
    font-size: 16px;
    color: #28a745;
    margin-bottom: 8px;
}

.widget-result-savings {
    font-size: 13px;
    color: #6c757d;
}

/* ==========================================================================
   Responsive Design for Calculator Components
   ========================================================================== */

@media (max-width: 768px) {
    .wc-tax-calculator-shortcode {
        margin: 10px;
        padding: 15px;
    }
    
    .calculator-title {
        font-size: 1.3em;
    }
    
    .result-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .result-row .label {
        font-weight: 600;
    }
}

/* ==========================================================================
   Animation Effects
   ========================================================================== */

.wc-tax-deduction-area .wc-tax-deduction,
.wc-tax-deduction-area .wc-tax-deduction-encouragement {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease-in-out;
}

.wc-tax-deduction-area .wc-tax-deduction[style*="display: none"],
.wc-tax-deduction-area .wc-tax-deduction-encouragement[style*="display: none"] {
    opacity: 0;
    transform: translateY(-10px);
}

/* ==========================================================================
   Integration with existing donation forms
   ========================================================================== */

.wc-donation-frontend-form .wc-tax-deduction-area {
    border-top: 1px solid #e0e0e0;
    padding-top: 10px;
    margin-top: 15px;
}

.widget_wc-donation-widget .wc-tax-deduction-area {
    margin-top: 10px;
}

/* ==========================================================================
   Accessibility improvements
   ========================================================================== */

.wc-tax-deduction:focus,
.wc-tax-deduction-encouragement:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* ==========================================================================
   Backward compatibility with existing SUPSC classes
   ========================================================================== */

.supsc-tax-deduction-area {
    margin-top: 8px;
    margin-bottom: 10px;
}

.supsc-tax-deduction,
.supsc-encouragement {
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.9em;
    text-align: center;
    transition: all 0.3s ease;
    margin: 5px 0;
}

.supsc-encouragement {
    background-color: #e7f3ff;
    border: 1px solid #b3d9ff;
    color: #0056b3;
}

.supsc-tax-deduction {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.supsc-message-text {
    font-weight: 500;
    line-height: 1.4;
    display: inline-block;
}
