/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;500;600;700&family=Lato:wght@300;400;500;600;700&display=swap');

/* Ensure fonts load properly */
.yield-calculator-container * {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.yield-calculator-header h2 {
    font-family: 'Lora', Georgia, serif !important;
}

/* Yield Calculator Styles - Exact Match to Mortgage Calculator */
.yield-calculator-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: 'Inter', sans-serif;
    color: #333333;
    border: 1px solid #e5e7eb;
}

.yield-calculator-header {
    text-align: left;
    margin-bottom: 40px;
}

.yield-calculator-header h2 {
    color: var(--primary-color, #1e3a8a);
    font-size: 32px;
    margin: 0 0 15px 0;
    font-family: 'Lora', serif;
    letter-spacing: 1px;
}

.yield-description {
    color: #6b7280;
    font-size: 16px;
    margin: 0;
    line-height: 1.5;
    font-family: 'Inter', sans-serif;
}

.yield-calculator-form {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    color: var(--primary-color, #1e3a8a);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}

.input-description {
    color: #9ca3af;
    font-size: 12px;
    margin: 0 0 15px 0;
    line-height: 1.3;
    font-family: 'Inter', sans-serif;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0!important;
    background-color: #fff!important;
}

.input-wrapper input[type="number"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background-color: #ffffff;
    color: var(--primary-color, #1e3a8a);
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    text-align: left;
}

.input-wrapper input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color, #1e3a8a);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px var(--primary-color-rgba, rgba(30, 58, 138, 0.1));
}

.input-wrapper input[type="number"]::placeholder {
    color: #9ca3af;
    opacity: 0.8;
}

.currency-label {
    display: none;
}

.percentage-display {
    position: absolute;
    right: 15px;
    color: var(--primary-color, #1e3a8a);
    font-weight: 600;
    font-size: 16px;
    z-index: 2;
    pointer-events: none;
    font-family: 'Inter', sans-serif;
}

/* Slider Styles - Exact Match */
.slider-container {
    position: relative;
    margin-top: 10px;
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, var(--primary-color, #1e3a8a) 0%, var(--primary-color, #1e3a8a) var(--slider-progress, 0%), #e5e7eb var(--slider-progress, 0%), #e5e7eb 100%);
    outline: none;
    transition: background 0.3s ease;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--primary-color, #1e3a8a);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px var(--primary-color-rgba, rgba(30, 58, 138, 0.3));
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--primary-color, #1e3a8a);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px var(--primary-color-rgba, rgba(30, 58, 138, 0.3));
}

.slider::-webkit-slider-track {
    background: #e5e7eb;
    height: 8px;
    border-radius: 4px;
}

.slider::-moz-range-track {
    background: #e5e7eb;
    height: 8px;
    border-radius: 4px;
    border: none;
}

/* Active slider track */
.slider:focus::-webkit-slider-track {
    background: linear-gradient(to right, var(--primary-color, #1e3a8a) 0%, var(--primary-color, #1e3a8a) var(--slider-progress, 0%), #e5e7eb var(--slider-progress, 0%), #e5e7eb 100%);
}

.slider:focus::-moz-range-track {
    background: linear-gradient(to right, var(--primary-color, #1e3a8a) 0%, var(--primary-color, #1e3a8a) var(--slider-progress, 0%), #e5e7eb var(--slider-progress, 0%), #e5e7eb 100%);
}

/* Range labels */
.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

/* Results Section - Exact Match */
.results-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.result-item {
    text-align: center;
    padding: 20px 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.result-item label {
    display: block;
    color: #6b7280;
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}

.result-value {
    color: #f59e0b;
    font-size: 24px;
    font-weight: 700;
    text-shadow: none;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
}

/* Responsive Design */
@media (max-width: 768px) {
    .yield-calculator-container {
        margin: 10px;
        padding: 25px;
    }
    
    .yield-calculator-header h2 {
        font-size: 24px;
    }
    
    .results-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .result-item {
        padding: 20px 15px;
    }
    
    .result-value {
        font-size: 20px;
    }
    
    .yield-calculator-form {
        gap: 25px;
    }
}

/* Animation for results */
.result-value {
    transition: all 0.3s ease;
}

.result-value.updated {
    transform: scale(1.05);
    color: #059669;
}

/* Custom scrollbar for webkit browsers */
.input-wrapper input::-webkit-outer-spin-button,
.input-wrapper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-wrapper input[type=number] {
    -moz-appearance: textfield;
}

/* Focus states and accessibility */
.input-wrapper input:focus-visible {
    outline: 2px solid #1e3a8a;
    outline-offset: 2px;
}

/* Loading state */
.yield-calculator-container.loading .result-value {
    opacity: 0.6;
}

/* Error states */
.input-wrapper input.error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.input-wrapper input.error:focus {
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1);
}

/* Yield level colors */
.result-value.low-yield { 
    color: #ef4444 !important; 
}

.result-value.medium-yield { 
    color: #f59e0b !important; 
}

.result-value.high-yield { 
    color: #059669 !important; 
}