﻿* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    
    line-height: 1.6;
    
}

h1 {
    color: #2a5c91 !important;
    text-align: center;
    margin-bottom: 30px;
}

.calculator-container {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.2);
    margin: 70px auto;
    position: relative;
    max-width: 800px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

/* Select container - critical changes */
.select-container {
    position: relative;
    width: 100%;
}

/* Choices.js overrides */
.choices {
    position: relative;
    margin-bottom: 0;
    width: 100%;
    z-index: auto;
}

.choices__inner {
    min-height: 44px;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    background-color: #fff;
}

.choices__list--dropdown {
    z-index: 9999 !important; /* Ensure dropdown appears above everything */
    position: absolute !important;
    width: 100% !important;
    left: 0 !important;
    margin-top: 1px;
}

.choices[data-type*="select-one"]:after {
    border-color: #333 transparent transparent;
    right: 15px;
    margin-top: -2.5px;
}

.choices[data-type*="select-one"].is-open:after {
    border-color: transparent transparent #333;
    margin-top: -7.5px;
}

/* Error states */
.error-message {
    color: #ff7b00;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.error-input .choices__inner {
    border-color: #ff7b00 !important;
}

/* Button styles */
.btn-calc {
    background-color: #2a5c91 !important;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    display: block;
    width: 100%;
    margin-top: 20px;
    transition: background-color 0.3s;
}

    .btn-calc:hover {
        opacity: 0.9;
    }

/* Results section */
.result-section {
    margin-top: 30px;
    padding: 20px;
    border-radius: 5px;
    display: none;
}

.result-title {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 18px;
}

.result-description {
    margin-bottom: 15px;
}

.result-green {
    background-color: #e8f5e9;
    border-left: 5px solid #4caf50;
}

.result-orange {
    background-color: #fff3e0;
    border-left: 5px solid #ff9800;
}

.result-red {
    background-color: #ffebee;
    border-left: 5px solid #f44336;
}

/* Sources section */
.sources {
    font-size: 14px;
    color: #666;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

    .sources h3 {
        margin-bottom: 10px;
        color: #444;
    }

/* Mobile responsiveness */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .calculator-container {
        padding: 15px;
        width: 90%;
        margin-top: 100px;
    }

    .choices__inner {
        padding: 6px 12px;
    }
}
