/* Analytics High-Fidelity Styles (Charts & Specifics) */

body {
    font-family: 'Poppins', sans-serif;
}

/* Custom Input Icons (Not covered by BS utils) */
input.form-control::placeholder {
    color: #9CA3AF;
}

/* Fixed CSS Bar Chart */
.css-bar-chart {
    display: flex;
    padding-left: 50px;
    position: relative;
    height: 220px;
    justify-content: space-between;
    margin-bottom: 10px;
    margin-top: 20px;
}

.y-axis {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 20px; /* Leave space for X-axis labels */
    width: 45px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 10px;
    color: #6B7280;
    align-items: flex-end;
    padding-right: 10px;
}

.grid-lines {
    position: absolute;
    left: 50px;
    right: 0;
    top: 6px;
    bottom: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
    z-index: 1;
}
.grid-line {
    width: 100%;
    height: 1px;
    background: #F3F4F6;
}

.x-axis-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    height: 100%;
    justify-content: flex-end; /* Push bars to bottom */
    z-index: 2;
    padding-bottom: 24px; /* Space for labels below the bar */
}

/* Inner wrapper for the actual bar to set height relative to the grid area */
.bar-track {
    height: calc(100% - 24px); /* Full height minus label area */
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.bar-column {
    width: 12px;
    background: #3B82F6;
    border-radius: 999px;
    min-height: 4px; /* Ensure 0 isn't completely hidden if wanted, but fine */
}

.x-label {
    position: absolute;
    bottom: 0;
    font-size: 11px;
    font-weight: 500;
    color: #4B5563;
}

/* Custom Tooltip Styling exactly like Figma */
.chart-tooltip {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #D10000;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
    color: #111;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(255,22,31,0.15);
}
.chart-tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0;
    border-style: solid;
    border-color: #D10000 transparent transparent transparent;
}
.chart-tooltip::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 4px 4px 0;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
    z-index: 1;
}

/* Ratings Bubble Chart */
.ratings-legend {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #111;
}

.legend-swatch {
    width: 32px;
    height: 6px;
    border-radius: 4px;
}
.legend-swatch.swatch-complaints { background: #60A5FA; }
.legend-swatch.swatch-ratings { background: #EC4899; }
.legend-value-red { color: #D10000; font-weight: 800; }
.legend-value-green { color: #10B981; font-weight: 800; }

.bubble-chart-area {
    position: relative;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: multiply;
}
/* Replicating Figma exact arrangement */
.bubble-1 { width: 50px; height: 50px; background: #60A5FA; top: 10px; left: 10%; } /* Light blue left */
.bubble-2 { width: 20px; height: 20px; background: #EC4899; top: 50px; left: 25%; } /* Pink small */
.bubble-3 { width: 14px; height: 14px; background: #3B82F6; top: -10px; left: 45%; } /* Tiny blue top */
.bubble-4 { width: 70px; height: 70px; background: #EC4899; top: 20px; left: 55%; } /* Large pink right */
.bubble-5 { width: 35px; height: 35px; background: #2563EB; top: 80px; left: 75%; } /* Dark blue bottom right */
.bubble-6 { width: 4px; height: 4px; background: #EC4899; top: 110px; left: 15%; } /* Stray pink dot */

/* Passenger Insights Special Classes */
.chart-line-blue {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: dash 2s linear forwards;
}

.chart-line-green {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: dash 2.5s ease-out forwards;
}

@keyframes dash {
    to {
        stroke-dashoffset: 0;
    }
}

.chart-tooltip-pink {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 500;
    white-space: nowrap;
    position: relative;
    box-shadow: 0 4px 12px rgba(255,22,31,0.05);
}
.chart-tooltip-pink::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0;
    border-style: solid;
    border-color: #FECACA transparent transparent transparent;
}
.chart-tooltip-pink::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0;
    border-style: solid;
    border-color: #FEF2F2 transparent transparent transparent;
    z-index: 1;
}

/* Red Navigation Pill (Fixing Bootstrap class conflicts) */
.analytics-nav-pill {
    background: #D10000;
    border-radius: 50px;
    display: flex;
    align-items: center;
    padding: 6px;
    margin-bottom: 30px;
    width: 100%;
}

.analytics-nav-item {
    background: transparent;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}

.analytics-nav-item.active-pill {
    background: #fff;
    color: #D10000 !important;
}
