/* ============================================================
   Strompreisampel - Custom Styles
   Convention: BEM-like prefix "em-" for all custom classes.
   Use Bootstrap utilities first; add custom rules only where
   Bootstrap falls short (sizing, transitions, typography scale).
   ============================================================ */

/* ------------------------------------------------------------
   Hero Section
   ------------------------------------------------------------ */
.em-hero {
    min-height: 40vh;
    display: flex;
    align-items: center;
    /* Smooth color transition when price category changes */
    transition: background-color 0.4s ease;
}

.em-hero__emoji {
    /* clamp() ensures the emoji scales gracefully on all screen sizes */
    font-size: clamp(4rem, 15vw, 8rem);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.em-hero__price {
    font-size: clamp(2.5rem, 10vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
}

.em-hero__unit {
    font-size: 0.45em;   /* relative to .em-hero__price */
    font-weight: 400;
    opacity: 0.85;
}

.em-hero__price-hint {
    margin-top: 0.1rem;
}

.em-hero__label {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    margin-top: 0.5rem;
    opacity: 0.9;
}

/* End-customer price block below the wholesale price */
.em-hero__endkunde {
    display: inline-block;
    background: rgba(0, 0, 0, 0.12);
    border-radius: 0.5rem;
    padding: 0.4rem 1rem;
}

.em-hero__endkunde-price {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: 600;
}

.em-hero__endkunde-label {
    margin-top: 0.1rem;
}

/* ------------------------------------------------------------
   Disclaimer (end-customer price footnote)
   ------------------------------------------------------------ */
.em-disclaimer {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* ------------------------------------------------------------
   Negative-price special badge (hero section)
   ------------------------------------------------------------ */
.em-hero__negative-badge {
    display: inline-block;
    letter-spacing: 0.04em;
    animation: em-pulse 1.8s ease-in-out infinite;
}

@keyframes em-pulse {
    0%, 100% { opacity: 1;    transform: scale(1);    }
    50%       { opacity: 0.8; transform: scale(1.04); }
}

/* ------------------------------------------------------------
   Slot List Items (best / worst quarter-hours)
   ------------------------------------------------------------ */
.em-slot__time {
    font-size: 1rem;
    font-weight: 500;
}

.em-slot__badge {
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Future slots get a subtle highlight so they stand out */
.em-slot--future {
    background-color: #f8f9fa;
}

.em-slot__future-arrow {
    font-style: normal;
    margin-right: 0.15rem;
    opacity: 0.6;
}

.em-slot__future-badge {
    font-size: 0.65rem;
    vertical-align: middle;
    opacity: 0.85;
}

/* ------------------------------------------------------------
   Stat Cards (daily summary)
   ------------------------------------------------------------ */
.em-stat-card {
    border-radius: 0.75rem;
}

.em-stat__label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6c757d;      /* Bootstrap $gray-600 */
    margin-bottom: 0.25rem;
}

.em-stat__value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
}

.em-stat__unit {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.15rem;
}

/* ------------------------------------------------------------
   Price Chart
   ------------------------------------------------------------ */

/* Fixed height required for Chart.js with maintainAspectRatio: false */
.em-chart-container {
    position: relative;
    height: 280px;
}

/* ------------------------------------------------------------
   Chart Legend
   ------------------------------------------------------------ */
.em-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 3px;
    vertical-align: middle;
}

/* Special dot for the "current slot" legend entry */
.em-legend-dot--current {
    background: transparent;
    border: 2px solid #212529;
    width: 10px;
    height: 10px;
}
