/**
 * WPBakery Animated Bars Stylesheet
 * 
 * High-performance, responsive animated bars with viewport triggering
 * and interactive micro-animations.
 */

.enym-animated-bars {
    --enym-bar-radius: 6px;
    --enym-bar-gap: 8px;
    --enym-bar-unfilled: #e2e8f0;
    --enym-bar-filled: #2563eb;
    --enym-bar-dim: 24px;
    --enym-bar-duration: 1000ms;
    --enym-bar-style: ease-in-out;
    --enym-total-bars: 5;

    display: block;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    margin: 1.5em 0;
}

.enym-animated-bars *,
.enym-animated-bars *::before,
.enym-animated-bars *::after {
    box-sizing: border-box;
}

/* ==========================================================================
   Header Section (Title & Description)
   ========================================================================== */
.enym-bars-header {
    margin-bottom: 14px;
}

.enym-bars-title {
    margin: 0 0 6px 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    letter-spacing: -0.015em;
    font-family: inherit;
}

.enym-bars-description {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.55;
    margin: 0;
    font-family: inherit;
}

.enym-bars-description p {
    margin: 0 0 0.75em 0;
}

.enym-bars-description p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Headline Section
   ========================================================================== */
.enym-bars-headline {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
    line-height: 1.2;
    color: #1e293b;
    font-family: inherit;
}

.enym-bars-headline-number {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: inherit;
    line-height: 1;
}

.enym-bars-headline-unit {
    font-size: 1.15rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: -0.01em;
}

/* ==========================================================================
   Bars Container & Tracks
   ========================================================================== */
.enym-bars-container {
    position: relative;
    width: 100%;
}

.enym-bar-item {
    position: relative;
    cursor: default;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.28s ease;
}

.enym-bar-track {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: var(--enym-bar-unfilled, #e2e8f0);
    border-radius: var(--enym-bar-radius, 6px);
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.enym-bar-fill {
    position: absolute;
    background-color: var(--enym-bar-filled, #2563eb);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(0, 0, 0, 0.06) 100%);
    border-radius: inherit;
    will-change: width, height;
}

/* ==========================================================================
   Orientation: Horizontal Bars
   ========================================================================== */
.enym-bars--horizontal .enym-bars-container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: var(--enym-bar-gap, 8px);
}

.enym-bars--horizontal .enym-bar-item {
    flex: 1 1 0;
    min-width: 0;
    height: var(--enym-bar-dim, 24px);
}

.enym-bars--horizontal .enym-bar-fill {
    left: 0;
    top: 0;
    bottom: 0;
    height: 100%;
    width: 0%;
    transition: width var(--enym-bar-duration, 1000ms) var(--enym-bar-style, ease-in-out) var(--bar-delay, 0ms);
}

.enym-bars--horizontal.is-animated .enym-bar-fill {
    width: var(--bar-fill, 0%);
}

/* ==========================================================================
   Orientation: Vertical Bars
   ========================================================================== */
.enym-bars--vertical .enym-bars-container {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--enym-bar-gap, 8px);
    height: var(--enym-bar-dim, 160px);
}

.enym-bars--vertical .enym-bar-item {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: flex-end;
}

.enym-bars--vertical .enym-bar-fill {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 0%;
    transition: height var(--enym-bar-duration, 1000ms) var(--enym-bar-style, ease-in-out) var(--bar-delay, 0ms);
}

.enym-bars--vertical.is-animated .enym-bar-fill {
    height: var(--bar-fill, 0%);
}

/* ==========================================================================
   Hover Micro-Interactions
   ========================================================================== */
.enym-bars-hover--translate-y .enym-bar-item:hover {
    transform: translateY(-4px);
}

.enym-bars-hover--scale .enym-bar-item:hover {
    transform: scale(1.04);
    z-index: 2;
}

.enym-bars-hover--glow .enym-bar-item:hover {
    box-shadow: 0 0 16px var(--enym-bar-filled, rgba(37, 99, 235, 0.45));
    border-radius: var(--enym-bar-radius, 6px);
    z-index: 2;
}

.enym-bars-hover--lift-glow .enym-bar-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px -2px rgba(0, 0, 0, 0.15), 0 0 12px var(--enym-bar-filled, rgba(37, 99, 235, 0.35));
    border-radius: var(--enym-bar-radius, 6px);
    z-index: 2;
}

.enym-bars-hover--brightness .enym-bar-item:hover {
    filter: brightness(1.2);
}

.enym-animated-bars:not(.enym-bars-hover--none) .enym-bar-item:hover {
    cursor: pointer;
}

/* ==========================================================================
   Legend Section
   ========================================================================== */
.enym-bars-legend {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.03em;
    font-family: inherit;
    line-height: 1.4;
}

.enym-bars-legend-left {
    text-align: left;
}

.enym-bars-legend-right {
    text-align: right;
}

/* ==========================================================================
   Responsive adjustments
   ========================================================================== */
@media (max-width: 640px) {
    .enym-bars-headline-number {
        font-size: 1.6rem;
    }
    .enym-bars-headline-unit {
        font-size: 1rem;
    }
    .enym-bars--vertical .enym-bars-container {
        height: max(120px, calc(var(--enym-bar-dim, 160px) * 0.8));
    }
}
