/***** Enhanced Break-Even Calculator – CSS *****/

/* Container */
.ebec-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    font-family: Arial, sans-serif;
    background: #f9f9f9;
}

/* Inputs container */
.ebec-inputs {
    margin-bottom: 20px;
}

/* Field groups */
.ebec-field-group {
    margin-bottom: 15px;
    position: relative; /* helps contain absolutely positioned tooltips */
}

.ebec-field-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.ebec-field-group input {
    width: 100%;
    padding: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.ebec-adv-toggle {
    margin-top: 15px;
    font-size: 0.95rem;
}

/* Results section */
.ebec-results h3 {
    margin-top: 0;
}

/* Chart container responsive */
.ebec-chart-container {
    max-width: 100%;
}

#ebecChart {
    width: 100% !important; /* let it be responsive */
    height: auto !important;
}

/* ---------------------------------
   TOOLTIP STYLES (Nested Approach)
   --------------------------------- */
.tooltip-icon {
    font-weight: bold;
    color: #555;
    cursor: help; /* or pointer */
    margin-left: 5px; /* spacing before (?), optional */
    position: relative; 
}

/* The nested tooltip text is hidden by default */
.tooltip-text {
    visibility: hidden;
    opacity: 0;

    position: absolute;
    width: 220px;
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #333;

    /* Position above the icon; adjust as needed */
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);

    /* Transition for smooth fade-in/out */
    transition: opacity 0.2s ease;
    z-index: 9999;
}

/* Show tooltip text when hovering over .tooltip-icon */
.tooltip-icon:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}