/**
 * WC Finance Calculator Styles
 * Modern, clean design with teal color scheme
 */

/* CSS Variables */
:root {
    --wcfc-primary: #3ABAB4;
    --wcfc-primary-light: #E8F8F7;
    --wcfc-primary-dark: #2A9D97;
    --wcfc-text-dark: #333333;
    --wcfc-text-light: #666666;
    --wcfc-text-muted: #999999;
    --wcfc-border: #E5E5E5;
    --wcfc-background: #FFFFFF;
    --wcfc-background-alt: #F9FAFB;
    --wcfc-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --wcfc-radius: 12px;
    --wcfc-radius-sm: 8px;
}

/* Calculator Container */
.wcfc-calculator {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    max-width: 1000px;
    margin: 30px auto;
    padding: 40px;
    background: var(--wcfc-background);
    border-radius: var(--wcfc-radius);
    box-shadow: var(--wcfc-shadow);
}

/* Calculator Title */
.wcfc-calculator-title {
    text-align: center;
    font-size: 24px !important;
    font-weight: 700;
    color: var(--wcfc-text-dark);
    margin-bottom: 40px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Main Layout Grid */
.wcfc-calculator-body {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

/* Form Section */
.wcfc-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Form Group */
.wcfc-form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Labels */
.wcfc-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--wcfc-text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Value Display Badge */
.wcfc-value-display {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--wcfc-primary-light);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    color: var(--wcfc-primary);
}

.wcfc-currency-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--wcfc-primary);
    background: var(--wcfc-primary-light);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Range Slider Styling */
.wcfc-slider-wrapper {
    position: relative;
    width: 100%;
    height: 24px;
    display: flex;
    align-items: center;
}

.wcfc-range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: var(--wcfc-border);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    position: relative;
    border: none !important;
    padding: 0 !important;
}

.wcfc-range-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, var(--wcfc-primary) 0%, var(--wcfc-primary) var(--value-percent, 50%), var(--wcfc-border) var(--value-percent, 50%), var(--wcfc-border) 100%);
    border-radius: 4px;
}

.wcfc-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: var(--wcfc-background);
    border: 3px solid var(--wcfc-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(58, 186, 180, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    margin-top: -7px;
}

.wcfc-range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(58, 186, 180, 0.4);
}

.wcfc-range-slider::-moz-range-track {
    width: 100%;
    height: 8px;
    background: var(--wcfc-border);
    border-radius: 4px;
}

.wcfc-range-slider::-moz-range-progress {
    height: 8px;
    background: var(--wcfc-primary);
    border-radius: 4px 0 0 4px;
}

.wcfc-range-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: var(--wcfc-background);
    border: 3px solid var(--wcfc-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(58, 186, 180, 0.3);
}

/* Select Dropdown */
.wcfc-select {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--wcfc-primary);
    background: var(--wcfc-background);
    border: 2px solid var(--wcfc-border);
    border-radius: var(--wcfc-radius-sm);
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%233ABAB4' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.wcfc-select:hover,
.wcfc-select:focus {
    border-color: var(--wcfc-primary);
}

/* Text Input */
.wcfc-input {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--wcfc-text-dark);
    background: var(--wcfc-background);
    border: 2px solid var(--wcfc-border);
    border-radius: var(--wcfc-radius-sm);
    outline: none;
    transition: border-color 0.2s ease;
}

.wcfc-input:hover,
.wcfc-input:focus {
    border-color: var(--wcfc-primary);
}

/* Chart Section */
.wcfc-chart-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Chart Legend */
.wcfc-chart-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    font-size: 12px;
    color: var(--wcfc-text-light);
}

.wcfc-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wcfc-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.wcfc-legend-color.invested {
    background: var(--wcfc-primary-light);
    border: 2px solid var(--wcfc-border);
}

.wcfc-legend-color.profit {
    background: var(--wcfc-primary);
}

/* Chart Container */
.wcfc-chart-container {
    width: 200px;
    height: 200px;
    position: relative;
}

/* Results Section */
.wcfc-results {
    margin-top: 40px;
    padding: 30px;
    background: var(--wcfc-background);
    border: 1px solid var(--wcfc-border);
    border-radius: var(--wcfc-radius);
}

.wcfc-results-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: var(--wcfc-text-dark) !important;
    margin-bottom: 24px !important;
}

.wcfc-results-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wcfc-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--wcfc-border);
}

.wcfc-result-row:last-child {
    border-bottom: none;
}

.wcfc-result-label {
    font-size: 14px;
    color: var(--wcfc-text-light);
}

.wcfc-result-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--wcfc-text-dark);
}

/* Projection Table */
.wcfc-projection {
    margin-top: 40px;
}

.wcfc-projection-title {
    background: var(--wcfc-primary);
    color: var(--wcfc-background);
    text-align: center;
    padding: 16px;
    font-size: 18px;
    font-weight: 600;
    border-radius: var(--wcfc-radius) var(--wcfc-radius) 0 0;
}

.wcfc-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--wcfc-background);
    /* border: 1px solid var(--wcfc-border); */
    border-top: none;
    border-radius: 0 0 var(--wcfc-radius) var(--wcfc-radius);
    overflow: hidden;
}

.wcfc-table thead {
    background: var(--wcfc-primary);
}

.wcfc-table th {
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--wcfc-background);
    text-align: center;
    text-transform: capitalize;
}

.wcfc-table tbody tr {
    transition: background 0.2s ease;
}

.wcfc-table tbody tr:hover {
    background: var(--wcfc-primary-light);
}

.wcfc-table tbody tr.wcfc-highlight {
    background: var(--wcfc-primary-light);
}

.wcfc-table tbody tr.wcfc-highlight td {
    color: var(--wcfc-primary);
    font-weight: 600;
}

.wcfc-table td {
    padding: 14px 20px;
    font-size: 14px;
    color: var(--wcfc-text-dark);
    text-align: center;
    border-bottom: 1px solid var(--wcfc-border);
}

.wcfc-table tbody tr:last-child td {
    border-bottom: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wcfc-calculator {
        padding: 24px;
        margin: 16px;
    }

    .wcfc-calculator-body {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .wcfc-chart-section {
        order: -1;
    }

    .wcfc-chart-container {
        width: 160px;
        height: 160px;
    }

    .wcfc-calculator-title {
        font-size: 20px !important;
    }

    .wcfc-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .wcfc-table th,
    .wcfc-table td {
        padding: 10px 12px;
        font-size: 12px;
    }
}

/* Animation */
@keyframes wcfc-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wcfc-calculator {
    animation: wcfc-fade-in 0.3s ease-out;
}

/* Utility Classes */
.wcfc-hidden {
    display: none !important;
}