

.input-group, .advanced-input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: center;
}

.input-field {
    flex: 1 1 calc(50% - 10px);
    display: flex;
    flex-direction: column;
    min-width: 200px;
    position: relative;
}

.input-field label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    display: flex;
    align-items: center;
}

.input-field input[type="number"] {
    padding: 12px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.input-field input[type="number"]:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

.tooltip {
    position: absolute;
    right: 5px;
    top: 30px; /* Adjust based on label/input positioning */
    background-color: #95a5a6;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    cursor: help;
    transition: background-color 0.2s;
}

.tooltip:hover {
    background-color: #7f8c8d;
}

.tooltip::after {
    content: attr(title);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
    z-index: 10;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}


button {
    background-color: #3498db;
    color: white;
    padding: 14px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    display: block;
    width: fit-content;
    margin: 30px auto 20px auto;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.3);
}

.results-section {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
    border: 1px solid #e9e9e9;
}

.result-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.result-display:last-child {
    border-bottom: none;
}

.result-display label {
    font-weight: 600;
    color: #444;
    flex: 1;
}

.result-display span {
    font-size: 1.1em;
    font-weight: 700;
    color: #2c3e50;
    flex: 1;
    text-align: right;
}

.chart-container {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px dashed #e0e0e0;
}

.indicator-bar-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 5px;
    height: 25px;
    overflow: hidden;
    margin-top: 15px;
    position: relative;
}

.indicator-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #2ecc71, #f1c40f, #e74c3c);
    border-radius: 5px;
    transition: width 0.5s ease-out;
    position: relative;
}

.indicator-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.9em;
    color: #777;
}

#limit-label {
    position: absolute;
    left: 0; /* Will be set dynamically by JS */
    transform: translateX(-50%);
    top: 5px;
    font-weight: bold;
    color: #34495e;
    text-align: center;
    white-space: nowrap;
}

#safety-message {
    text-align: center;
    margin-top: 15px;
    font-size: 1.1em;
    font-weight: 600;
    color: #34495e;
}

/* Infographic Section */
.infographic-section {
    margin-top: 40px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #e9e9e9;
    text-align: center;
}

.wind-diagram-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#wind-diagram {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

#wind-diagram line {
    transition: all 0.5s ease-out;
}

#wind-diagram text {
    user-select: none;
    pointer-events: none;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    font-size: 0.9em;
}

.legend > div {
    display: flex;
    align-items: center;
}

.color-box {
    width: 15px;
    height: 15px;
    border-radius: 3px;
    margin-right: 8px;
    border: 1px solid #eee;
}

.color-box.green { background-color: #4CAF50; }
.color-box.blue { background-color: #2196F3; }
.color-box.orange { background-color: #FFC107; }
.color-box.red { background-color: #F44336; }


/* Responsive adjustments */
@media (max-width: 600px) {
    .crosswind-calculator {
        padding: 15px;
        margin: 20px auto;
        border-radius: 8px;
    }

    h2 {
        font-size: 1.5em;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }

    h3 {
        font-size: 1.2em;
        margin-top: 25px;
    }

    .input-field {
        flex: 1 1 100%;
        min-width: unset;
    }

    button {
        padding: 12px 20px;
        font-size: 1em;
        margin-top: 25px;
    }

    .result-display {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px 0;
    }

    .result-display span {
        text-align: left;
        margin-top: 5px;
        font-size: 1em;
    }

    .legend {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    #wind-diagram {
        width: 180px;
        height: 180px;
    }
}