/* Reset — prevent WordPress theme interference */
.ep-wrap,
.ep-wrap *,
.ep-wrap *::before,
.ep-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
    line-height: normal;
    text-decoration: none;
    list-style: none;
    outline: none;
}
.ep-wrap {
    font-family: "Poppins", Arial, sans-serif;
    color: #111827;
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    word-break: normal;
    overflow-wrap: break-word;
    /* Tier colors: summary cards, table tiers, chart markers & legend (single source) */
    --ep-color-cheap: #16a34a;
    --ep-color-mod: #f59e0b;
    --ep-color-exp: #ef4444;
    /* Match default block / paragraph width (e.g. Kadence --global-calc-content-width) */
    width: 100%;
    /* Never wider than parent; cap to theme content width when larger (fixes fluid layout < content width) */
    max-width: min(100%, var(--wp--style--global--content-size, var(--global-calc-content-width, 100%)));
    margin-left: auto;
    margin-right: auto;
    position: relative;
    padding: 0;
}

/* Below theme content width (Kadence default 1290px): container is viewport-wide; mirror edge inset so we align with body text */

.ep-wrap .container { max-width: 1580px; margin: 0 auto; background: #fefefe; padding: 24px; border-radius: 14px; box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08); }
.ep-wrap h2, .ep-wrap h3 { text-align: left; color: #111827; margin-top: 0; margin-bottom: 0; font-family: "Poppins", sans-serif; font-weight: 600; line-height: 1.3; }
.ep-wrap h2 { font-size: 1.5rem; }

/* Day tabs + VAT filter (one row; wraps on narrow viewports) */
.ep-wrap .ep-spot-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    margin: 0 0 18px;
    box-sizing: border-box;
}
.ep-wrap .spot-tabs {
    display: flex; flex-wrap: nowrap; gap: 8px; margin: 0;
    box-sizing: border-box; --spot-tab-fixed-w: 9rem;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.ep-wrap .spot-tabs button {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 var(--spot-tab-fixed-w); width: var(--spot-tab-fixed-w);
    min-width: var(--spot-tab-fixed-w); max-width: var(--spot-tab-fixed-w);
    text-align: center; font-family: "Poppins", sans-serif; font-size: 14px; font-weight: 600;
    letter-spacing: 0.2px; line-height: 1.35; min-height: 2.75rem; padding: 12px 10px;
    border-radius: 12px; box-sizing: border-box; white-space: nowrap;
    border: 1px solid rgba(0, 0, 0, 0.10); background: #ffffff; color: #111827; cursor: pointer;
    box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset, 0 -1px 0 rgba(17,24,39,0.03) inset, 0 8px 18px rgba(17,24,39,0.08);
    transition: box-shadow 240ms ease, background 240ms ease, color 240ms ease, border-color 240ms ease;
}
.ep-wrap .spot-tabs button:hover {
    box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset, 0 -1px 0 rgba(17,24,39,0.03) inset, 0 12px 28px rgba(17,24,39,0.12);
}
.ep-wrap .spot-tabs button[aria-selected="true"] {
    border: 0; color: #ffffff; background: linear-gradient(135deg, #007FFF 0%, #000CFF 100%);
    box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 -1px 0 rgba(0,0,0,0.12) inset, 0 12px 26px rgba(0,127,255,0.28);
}
.ep-wrap .spot-tabs button[aria-selected="true"]:hover {
    box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 -1px 0 rgba(0,0,0,0.12) inset, 0 16px 34px rgba(0,127,255,0.32);
}
.ep-wrap .spot-tabs button:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.ep-wrap .spot-tabs button[aria-selected="true"]:focus-visible { outline-color: rgba(255,255,255,0.95); }
.ep-wrap .spot-tabpanel { outline: none; }
.ep-wrap .ep-spot-vat-filter {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px 14px;
    margin: 0;
    flex: 0 0 auto;
    font-family: "Poppins", sans-serif;
    font-size: 0.9375rem;
    color: #334155;
}
.ep-wrap .ep-spot-vat-filter__label {
    font-weight: 600;
    color: #111827;
}
.ep-wrap .ep-spot-vat-filter__select {
    min-width: 11.5rem;
    max-width: 100%;
    padding: 10px 36px 10px 12px;
    font: inherit;
    font-weight: 500;
    color: #111827;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.ep-wrap .ep-spot-vat-filter__select:hover {
    border-color: rgba(37, 99, 235, 0.35);
}
.ep-wrap .ep-spot-vat-filter__select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Summary Grid — 40px space below before the chart (margin-bottom avoids fighting :first-of-type on the chart) */
.ep-wrap .summary-grid { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 14px !important; margin: 10px 0 50px !important; }
.ep-wrap .summary-grid--three { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.ep-wrap .summary-grid + section.price-chart-card { margin-top: 0 !important; }

/* Summary Cards */
.ep-wrap .summary-card {
    position: relative; border-radius: 12px; padding: 18px !important; text-align: left;
    border: 1px solid rgba(0,0,0,0.10); background: #ffffff;
    box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset, 0 -1px 0 rgba(17,24,39,0.03) inset, 0 12px 24px rgba(17,24,39,0.10);
    overflow: visible; min-height: 120px !important; box-sizing: border-box !important;
    max-width: none !important; width: auto !important;
    transition: box-shadow 240ms ease, background 240ms ease, color 240ms ease, border-color 240ms ease;
}
.ep-wrap .summary-card::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit;
    background: transparent; pointer-events: none; opacity: 0;
}
.ep-wrap .summary-card--gradient {
    border: 0; color: #ffffff; background: linear-gradient(135deg, #007FFF 0%, #000CFF 100%);
    box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 -1px 0 rgba(0,0,0,0.12) inset, 0 14px 30px rgba(0,127,255,0.25);
}
.ep-wrap .summary-card--gradient::before {
    background: linear-gradient(180deg, rgba(255,255,255,0.28), rgba(255,255,255,0) 45%); opacity: 0.85;
}
.ep-wrap .summary-card__top {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap;
    gap: 8px; width: 100%; box-sizing: border-box; margin: 0; padding: 0;
}
.ep-wrap .summary-card__title { font-family: "Poppins", sans-serif; font-size: 20px; font-weight: 600; letter-spacing: 0.2px; margin: 0; padding: 0; flex: 1 1 auto; min-width: 0; word-break: break-word; overflow-wrap: break-word; }
.ep-wrap .summary-card__value { margin: 8px 0 0; padding: 0; font-size: 24px; font-weight: 800; line-height: 1.1; width: 100%; }
.ep-wrap .summary-card__sub { margin: 8px 0 0; padding: 0; font-size: 16px; font-weight: 400; opacity: 0.9; width: 100%; }
.ep-wrap .summary-card .summary-card__value { margin-top: 8px; font-size: 18px; font-weight: 800; letter-spacing: -0.1px; }
.ep-wrap .summary-price-line { display: flex; align-items: baseline; justify-content: flex-start; gap: 6px; flex-wrap: wrap; text-align: left; margin: 0; padding: 0; width: 100%; box-sizing: border-box; }
.ep-wrap .summary-datetime { text-align: left; font-size: 11px; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; opacity: 1; }
.ep-wrap .summary-card:not(.summary-card--gradient) .summary-datetime { color: #111827; }
.ep-wrap .summary-card--gradient .summary-datetime { color: #ffffff; }
.ep-wrap .summary-grid:hover .summary-card:not(:hover) .summary-datetime { color: #111827; }
.ep-wrap .summary-grid:hover .summary-card:hover .summary-datetime { color: #ffffff; }
.ep-wrap .summary-price-line__num { font-size: 22px; font-weight: 600; line-height: 1.05; }
.ep-wrap .summary-price-line__unit { font-size: 13px; font-weight: 400; letter-spacing: 0; opacity: 0.95; }

.ep-wrap .summary-card__title--yellow { color: var(--ep-color-mod); }
.ep-wrap .summary-card__title--green { color: var(--ep-color-cheap); }
.ep-wrap .summary-card__title--red { color: var(--ep-color-exp); }

/* Make summary icons inherit the title color */
.ep-wrap .summary-card__top .summary-card__title--yellow ~ .icon--img { color: var(--ep-color-mod); }
.ep-wrap .summary-card__top .summary-card__title--green ~ .icon--img { color: var(--ep-color-cheap); }
.ep-wrap .summary-card__top .summary-card__title--red ~ .icon--img { color: var(--ep-color-exp); }
.ep-wrap .summary-card__top .icon--img svg { fill: currentColor; }
.ep-wrap .summary-card__top .icon--img svg [fill] { fill: currentColor; }
.ep-wrap .summary-card__top .icon--img svg [stroke] { stroke: currentColor; }

.ep-wrap .summary-card:hover {
    box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset, 0 -1px 0 rgba(17,24,39,0.03) inset, 0 18px 40px rgba(17,24,39,0.14);
}
.ep-wrap .summary-grid:hover .summary-card { background: #ffffff; color: #111827; border: 1px solid rgba(17,24,39,0.10); }
.ep-wrap .summary-grid:hover .summary-card--gradient {
    background: #ffffff; color: #111827; border: 1px solid rgba(17,24,39,0.10);
    box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset, 0 -1px 0 rgba(17,24,39,0.03) inset, 0 12px 24px rgba(17,24,39,0.10);
}
.ep-wrap .summary-grid:hover .summary-card--gradient::before { background: linear-gradient(180deg, rgba(255,255,255,0.75), rgba(255,255,255,0) 42%); opacity: 0.75; }
.ep-wrap .summary-grid:hover .summary-card:hover {
    background: linear-gradient(135deg, #007FFF 0%, #000CFF 100%); color: #ffffff; border-color: transparent;
    box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 -1px 0 rgba(0,0,0,0.12) inset, 0 18px 40px rgba(0,127,255,0.28);
}
.ep-wrap .summary-grid:hover .summary-card:hover::before { background: linear-gradient(180deg, rgba(255,255,255,0.28), rgba(255,255,255,0) 45%); opacity: 0.85; }
.ep-wrap .summary-grid:hover .summary-card:hover .summary-card__title { color: #ffffff; }
.ep-wrap .summary-grid:hover .summary-card:hover .icon--img img { filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35)); }
.ep-wrap .summary-grid:hover .summary-card:hover .icon--img svg { filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35)); }

/* Icons */
.ep-wrap .icon { width: 32px; height: 30px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; }
.ep-wrap .icon.icon--bolt { width: 32px; height: 32px; flex: 0 0 32px; justify-content: center; margin-left: 0; }
.ep-wrap .icon--bolt { font-size: 24px; line-height: 1; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15)); }
.ep-wrap .icon--img { width: 26px; height: 26px; flex: 0 0 32px; margin-left: 0; justify-content: center; }
.ep-wrap .icon--img img, .ep-wrap .icon--img svg { width: 32px; height: 32px; object-fit: contain; display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.08)); }

/* Spot Table */
.ep-wrap .spot-table { font-family: "Poppins", sans-serif; background: #F5F5F5; border-radius: 16px; padding: 22px 18px 26px; margin-top: 60px; box-sizing: border-box; --spot-metrics-gap: 22px; }
.ep-wrap .spot-table__title { font-family: "Poppins", sans-serif; font-size: 20px; font-weight: 600; letter-spacing: 0.2px; line-height: 1.25; margin: 0 0 8px; color: #111827; }
.ep-wrap .spot-table__head { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: flex-end; justify-content: space-between; gap: 0; width: 100%; box-sizing: border-box; min-width: 520px; padding: 0 18px 12px 18px; font-family: "Poppins", sans-serif; font-size: 20px; font-weight: 600; color: #111827; letter-spacing: 0.2px; }
.ep-wrap .spot-table__head-metrics { display: contents; }
.ep-wrap .spot-table__head-rate-group { display: flex; justify-content: flex-start; align-items: center; line-height: 1.2; min-width: 0; flex: 0 0 auto; }
.ep-wrap .spot-table__head-mid-spacer { flex: 0 0 26px; min-height: 0.75rem; align-self: stretch; }
.ep-wrap .spot-table__head-intensity-label { flex: 0 0 auto; text-align: right; min-width: 0; }
.ep-wrap .spot-table__head > span:first-of-type { flex: 0 0 auto; }
.ep-wrap .spot-table__head > span:nth-of-type(2) { flex: 0 1 auto; min-width: 0; }
.ep-wrap .spot-table__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -6px; padding: 0 6px; }
.ep-wrap .spot-table__rows { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; }
.ep-wrap .spot-table__rows--loading { font-size: 16px; font-weight: 400; opacity: 0.9; color: #374151; padding: 12px 18px; }

/* Spot Rows */
.ep-wrap .spot-row { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 0; width: 100%; box-sizing: border-box; min-width: 520px; padding: 16px 18px; background: #FFFFFF; border-radius: 16px; border: 1px solid rgba(17,24,39,0.06); box-shadow: 0 2px 14px rgba(17,24,39,0.05); transition: box-shadow 0.22s ease, border-color 0.22s ease, transform 0.18s ease; }
.ep-wrap .spot-row:hover { box-shadow: 0 6px 28px rgba(0,12,255,0.14); border-color: rgba(0,12,255,0.16); }
/* Current interval row — same gradient + shadow as .summary-card--gradient (Price Now card) */
.ep-wrap .spot-row--now {
    border: 0;
    background: linear-gradient(135deg, #007FFF 0%, #000CFF 100%);
    box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 -1px 0 rgba(0,0,0,0.12) inset, 0 14px 30px rgba(0,127,255,0.25);
}
.ep-wrap .spot-row--now:hover {
    box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 -1px 0 rgba(0,0,0,0.12) inset, 0 18px 40px rgba(0,127,255,0.28);
}
.ep-wrap .spot-row--now .spot-row__time-main { color: #ffffff; text-shadow: 0 1px 3px rgba(0,0,0,0.35); }
.ep-wrap .spot-row--now .spot-row__time-sub { color: rgba(255,255,255,0.88); text-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.ep-wrap .spot-row--now .spot-row__level-hint { color: rgba(255,255,255,0.92); text-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.ep-wrap .spot-row--now .spot-row__price-unit { color: rgba(255,255,255,0.88); text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
/* Tier utility classes stay white on the primary gradient */
.ep-wrap .spot-row--now .spot-row__price-num,
.ep-wrap .spot-row--now .spot-row__price-num.cheap-text,
.ep-wrap .spot-row--now .spot-row__price-num.mod-text,
.ep-wrap .spot-row--now .spot-row__price-num.exp-text { color: #ffffff; }
.ep-wrap .spot-row--now .spot-row__level--cheap .spot-row__level-name,
.ep-wrap .spot-row--now .spot-row__level--mod .spot-row__level-name,
.ep-wrap .spot-row--now .spot-row__level--exp .spot-row__level-name { color: #ffffff; text-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.ep-wrap .spot-row--now .spot-row__badge { background: rgba(255,255,255,0.22); box-shadow: 0 1px 0 rgba(255,255,255,0.35) inset; color: #ffffff; }
.ep-wrap .spot-row--now .spot-row__bar-track { background: rgba(255,255,255,0.22); }
.ep-wrap .spot-row--now .spot-row__bar-fill--cheap,
.ep-wrap .spot-row--now .spot-row__bar-fill--mod,
.ep-wrap .spot-row--now .spot-row__bar-fill--exp,
.ep-wrap .spot-row--now .spot-row__bar-fill--none { background: rgba(255,255,255,0.4); }
.ep-wrap .spot-row__time { flex: 0 0 auto; }
.ep-wrap .spot-row__time-main { display: block; font-size: 17px; font-weight: 600; color: #111827; line-height: 1.2; }
.ep-wrap .spot-row__time-sub { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; color: #111827; }
.ep-wrap .spot-row__level { display: flex; align-items: center; gap: 12px; flex: 0 1 auto; min-width: 0; }
.ep-wrap .spot-row__metrics-spacer { flex: 0 0 26px; flex-shrink: 0; width: 26px; height: 26px; visibility: hidden; pointer-events: none; }
.ep-wrap .spot-row__badge { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; letter-spacing: 0.02em; }
.ep-wrap .spot-row__badge--cheap { background: linear-gradient(145deg, #22c55e, var(--ep-color-cheap)); }
.ep-wrap .spot-row__badge--mod { background: linear-gradient(145deg, #fbbf24, var(--ep-color-mod)); }
.ep-wrap .spot-row__badge--exp { background: linear-gradient(145deg, #f87171, var(--ep-color-exp)); }
.ep-wrap .spot-row__badge--none { background: #d1d5db; color: #6b7280; font-weight: 600; }
.ep-wrap .spot-row__level-text { min-width: 0; }
.ep-wrap .spot-row__level--cheap .spot-row__level-name { color: var(--ep-color-cheap); }
.ep-wrap .spot-row__level--mod .spot-row__level-name { color: var(--ep-color-mod); }
.ep-wrap .spot-row__level--exp .spot-row__level-name { color: var(--ep-color-exp); }
.ep-wrap .spot-row__level-name { display: block; font-size: 15px; font-weight: 500; color: #374151; line-height: 1.25; }
.ep-wrap .spot-row__level-hint { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: #111827; }
.ep-wrap .spot-row__metrics { display: contents; }
.ep-wrap .spot-row__price-block { flex: 0 0 auto; width: max-content; max-width: 100%; display: flex; flex-direction: column; align-items: flex-start; }
.ep-wrap .spot-row__price-num { display: block; font-size: 22px; font-weight: 700; color: #111827; line-height: 1.15; letter-spacing: -0.02em; }
.ep-wrap .spot-row__price-unit { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: #111827; }
.ep-wrap .spot-row__intensity { flex: 0 0 120px; width: 120px; min-width: 120px; max-width: 120px; }
.ep-wrap .spot-row__bar-track { height: 8px; width: 100%; max-width: 120px; background: #f3f4f6; border-radius: 99px; overflow: hidden; }
.ep-wrap .spot-row__bar-fill { height: 100%; min-width: 4px; border-radius: 99px; transition: width 0.45s ease, background 0.25s ease; box-sizing: border-box; }
.ep-wrap .spot-row__bar-fill--cheap { background: linear-gradient(90deg, #22c55e 0%, var(--ep-color-cheap) 100%); }
.ep-wrap .spot-row__bar-fill--mod { background: linear-gradient(90deg, #fbbf24 0%, var(--ep-color-mod) 100%); }
.ep-wrap .spot-row__bar-fill--exp { background: linear-gradient(90deg, #f87171 0%, var(--ep-color-exp) 100%); }
.ep-wrap .spot-row__bar-fill--none { background: #d1d5db; }

/* Text Colors */
.ep-wrap .cheap-text { color: var(--ep-color-cheap); }
.ep-wrap .mod-text { color: var(--ep-color-mod); }
.ep-wrap .exp-text { color: var(--ep-color-exp); }

/* Price Chart Card */
.ep-wrap .price-chart-card__legend--no-now .price-chart-legend__now { display: none; }
.ep-wrap .price-chart-card {
    --chart-vb-w: 2280; --chart-pad-l: 88; --chart-pad-r: 44; --chart-y-axis-label-x: 68; --chart-y-axis-label-max-w: 56;
    font-family: "Poppins", sans-serif; background: #f3f4f6; border-radius: 16px; padding: 18px; margin-top: 18px; box-sizing: border-box; border: 1px solid rgba(17,24,39,0.06);
}
.ep-wrap .price-chart-card__header { display: flex; flex-wrap: wrap; flex-direction: row; align-items: center; justify-content: space-between; gap: 14px 16px; width: 100%; box-sizing: border-box; margin-bottom: 16px; }
.ep-wrap .price-chart-card__title { margin: 0; padding: 0; font-family: "Poppins", sans-serif; font-size: 20px; font-weight: 600; color: #111827; letter-spacing: 0.2px; line-height: 1.2; flex: 0 1 auto; min-width: 0; text-align: left; }
.ep-wrap .price-chart-card__legend { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 18px 24px; flex: 0 0 auto; padding: 0; padding-right: calc(100% * var(--chart-pad-r) / var(--chart-vb-w)); font-family: "Poppins", sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 0.2px; line-height: 1.2; color: #4b5563; }
.ep-wrap .price-chart-card__legend span { display: inline-flex; align-items: center; gap: 10px; }
.ep-wrap .price-chart-card__legend i { width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid #2563eb; background: #fff; box-sizing: border-box; flex-shrink: 0; }
.ep-wrap .price-chart-card__legend .price-chart-legend__high i { border-color: var(--ep-color-exp); }
.ep-wrap .price-chart-card__legend .price-chart-legend__low i { border-color: var(--ep-color-cheap); }
.ep-wrap .price-chart-card__legend .price-chart-legend__now i { border-color: #2563eb; }

/* Chart SVG area */
.ep-wrap .price-chart__wrap { position: relative; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ep-wrap .price-chart__tooltip { position: absolute; z-index: 8; left: 0; top: 0; padding: 10px 14px; border-radius: 10px; background: rgba(255,255,255,0.94); border: 1px solid rgba(148,163,184,0.55); box-shadow: 0 8px 24px rgba(15,23,42,0.12); font-family: "Poppins", sans-serif; font-size: 15px; font-weight: 600; color: #1e293b; line-height: 1.35; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 0.06s ease; max-width: min(220px, calc(100vw - 48px)); }
.ep-wrap .price-chart__tooltip.is-on { opacity: 1; visibility: visible; }
.ep-wrap .price-chart__tooltip__time { display: block; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.ep-wrap .price-chart__tooltip__price { display: block; margin-top: 4px; font-size: 14px; font-weight: 500; color: #475569; font-variant-numeric: tabular-nums; }
.ep-wrap .price-chart__hover-dot { pointer-events: none; }
.ep-wrap .price-chart__svg { display: block; width: 100%; min-width: 100%; height: auto; max-height: none; }
.ep-wrap .price-chart__grid line { stroke: #e5e7eb; stroke-width: 1; }
.ep-wrap .price-chart__grid--minor line { stroke: #eef2f7; stroke-width: 1; }
.ep-wrap .price-chart__now-line { stroke: #94a3b8; stroke-width: 1.25; stroke-dasharray: 4 3; }
.ep-wrap .price-chart__line--past { fill: none; stroke: #2563eb; stroke-width: 7; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 3; }
.ep-wrap .price-chart__line--future { fill: none; stroke: #2563eb; stroke-width: 7; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 3; stroke-dasharray: 6 5; opacity: 0.45; }
.ep-wrap .price-chart__axis-y text { fill: #6b7280; font-size: 32px; font-family: "Poppins", sans-serif; font-weight: 500; font-variant-numeric: tabular-nums; }
.ep-wrap .price-chart__axis-x text { fill: #6b7280; font-size: 32px; font-family: "Poppins", sans-serif; font-weight: 500; }
.ep-wrap .price-chart__now-pill rect { fill: none; stroke: rgba(100,116,139,0.28); stroke-width: 1; }
.ep-wrap .price-chart__now-pill text { fill: #0f172a; font-family: "Poppins", sans-serif; font-size: 34px; font-weight: 700; paint-order: stroke fill; stroke: rgba(255,255,255,0.98); stroke-width: 8px; stroke-linejoin: round; }
.ep-wrap .price-chart__now-pill .price-chart__now-pill__sub { font-size: 32px; font-weight: 700; fill: #1e293b; paint-order: stroke fill; stroke: rgba(255,255,255,0.96); stroke-width: 7px; stroke-linejoin: round; }
.ep-wrap .price-chart__marker text { font-family: "Poppins", sans-serif; font-size: 28px; font-weight: 600; fill: #374151; }
.ep-wrap .price-chart__marker__price { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ep-wrap .price-chart__marker--high .price-chart__marker__price { fill: var(--ep-color-exp); font-size: 38px; font-weight: 800; }
.ep-wrap .price-chart__marker--low .price-chart__marker__price { fill: var(--ep-color-cheap); font-size: 38px; font-weight: 800; }
.ep-wrap .price-chart__marker--flat .price-chart__marker__price { fill: #475569; }
.ep-wrap .price-chart__marker--now text { fill: #1d4ed8; }
.ep-wrap .price-chart__marker--now circle { stroke-width: 3.25px; }
.ep-wrap .price-chart-card__empty { font-size: 14px; color: #6b7280; padding: 24px 8px; text-align: center; }
.ep-wrap .price-chart-card { overflow: visible; }

/* Desktop adjustments */
@media (min-width: 901px) {
    .ep-wrap .spot-row__metrics-spacer, .ep-wrap .spot-table__head-mid-spacer { display: none; }
    .ep-wrap .spot-table__head-rate-group span { display: inline-block; transform: translateX(2rem); }
    .ep-wrap .spot-table__head-intensity-label { display: inline-block; transform: translateX(-2rem); }
    .ep-wrap .spot-row__level--cheap { transform: translateX(0); }
    .ep-wrap .spot-row__level--mod { transform: translateX(12px); }
    .ep-wrap .spot-row__level--exp { transform: translateX(-13px); }

    span.spot-row__price-num.cheap-text {
        transform: translateX(10px);
    }
    span.spot-row__price-num.cheap-text + span.spot-row__price-unit {
        transform: translateX(10px);
    }
    span.spot-row__price-num.exp-text {
        transform: translateX(20px);
    }
    span.spot-row__price-num.exp-text + span.spot-row__price-unit {
        transform: translateX(20px);
    }
}

/* Mobile */
@media (max-width: 900px) {
    .ep-wrap .container { padding: 16px 15px; border-radius: 12px; }
    .ep-wrap .ep-spot-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin: 0 0 14px !important;
    }
    .ep-wrap .spot-tabs { display: flex !important; flex-wrap: nowrap !important; gap: 6px !important; margin: 0 !important; width: 100% !important; overflow-x: hidden !important; }
    .ep-wrap .ep-spot-vat-filter { width: 100%; justify-content: space-between; }
    .ep-wrap .spot-tabs button { flex: 1 1 0 !important; width: auto !important; min-width: 0 !important; border-radius: 8px; min-height: 2.625rem; padding: 11px 6px !important; font-size: 13px; line-height: 1.35; }
    .ep-wrap .summary-grid,
    .ep-wrap .summary-grid--three { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; margin: 8px 0 50px !important; }
    .ep-wrap .summary-card { box-sizing: border-box !important; min-height: 108px !important; height: auto !important; padding: 12px !important; border-radius: 8px; overflow: visible; width: auto !important; max-width: none !important; }
    .ep-wrap .summary-card__title { font-size: 14px; line-height: 1.2; }
    .ep-wrap .summary-card .summary-card__value, .ep-wrap .summary-price-line__num, .ep-wrap .summary-card__value { margin-top: 6px; font-size: 16px; font-weight: 500; line-height: 1.15; }
    .ep-wrap .summary-card--gradient .summary-price-line__num, .ep-wrap .summary-card--gradient .summary-card__value { font-weight: 600; }
    .ep-wrap .summary-datetime, .ep-wrap .summary-card__sub.summary-datetime { margin-top: 4px; font-size: 12px; font-weight: 400; }
    .ep-wrap .icon { width: 32px; height: 32px; flex: 0 0 32px; }
    .ep-wrap .icon--img { width: 32px; height: 32px; flex: 0 0 32px; }
    .ep-wrap .icon--img img, .ep-wrap .icon--img svg { width: 32px; height: 32px; max-width: 32px; max-height: 32px; }
    .ep-wrap .spot-table { padding: 16px 10px 20px; --spot-metrics-gap: 10px; }
    .ep-wrap .spot-table__title { font-size: 18px; }
    .ep-wrap .spot-table__head-intensity-label, .ep-wrap .spot-row__intensity, .ep-wrap .spot-table__head > span:nth-child(2), .ep-wrap .spot-row__level, .ep-wrap .spot-row__metrics-spacer { display: none; }
    .ep-wrap .spot-table__head-mid-spacer { display: none; }
    .ep-wrap .spot-table__head-metrics { display: flex; align-items: center; justify-content: flex-end; gap: 0; min-width: 0; line-height: 1.2; }
    .ep-wrap .spot-table__head-rate-group { justify-content: flex-end; }
    .ep-wrap .spot-row__metrics { display: flex; align-items: center; justify-content: flex-end; gap: 0; min-width: 0; }
    .ep-wrap .spot-table__head { display: grid; grid-template-columns: minmax(52px, auto) minmax(0, 1fr); gap: 8px 12px; align-items: end; min-width: 0; padding: 0 10px 10px 10px; font-size: 15px; font-weight: 600; letter-spacing: 0.2px; line-height: 1.2; }
    .ep-wrap .spot-row { display: grid; grid-template-columns: minmax(52px, auto) minmax(0, 1fr); gap: 8px 12px; align-items: center; min-width: 0; padding: 12px 10px; }
    .ep-wrap .spot-row--now { padding: 12px 10px; }
    .ep-wrap .spot-table__scroll { overflow-x: visible; margin: 0; padding: 0; }
    .ep-wrap .spot-table__rows--loading { padding: 12px 10px; }
    .ep-wrap .spot-row__time-main { font-size: 15px; }
    .ep-wrap .spot-row__price-num { font-size: 18px; }
    .ep-wrap h2 { font-size: 1.15rem; line-height: 1.3; }
    .ep-wrap .price-chart-card { padding: 12px 12px 12px; margin-top: 12px; overflow: visible; }
    .ep-wrap .price-chart-card__header { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 12px; }
    .ep-wrap .price-chart-card__title { font-size: 15px; width: 100%; }
    .ep-wrap .price-chart-card__legend { justify-content: flex-start; padding-right: 0; font-size: 15px; gap: 14px 22px; width: 100%; }
    .ep-wrap .price-chart-card__legend i { width: 10px; height: 10px; border-width: 2.5px; }
    .ep-wrap .price-chart__wrap { overflow-x: visible; overflow: visible; width: 100%; }
    .ep-wrap .price-chart__svg { overflow: visible; }
    .ep-wrap .price-chart__tooltip { font-size: 24px; padding: 16px 20px; max-width: min(320px, calc(100vw - 28px)); }
    .ep-wrap .price-chart__tooltip__price { font-size: 21px; margin-top: 8px; }
    .ep-wrap .price-chart__axis-y text, .ep-wrap .price-chart__axis-x text { font-size: 90px; font-weight: 700; }
    .ep-wrap .price-chart__marker text { font-size: 48px; }
    .ep-wrap .price-chart__marker__price { font-size: 60px; font-weight: 800; }
    .ep-wrap .price-chart__marker--high .price-chart__marker__price { font-size: 80px; font-weight: 900; }
    .ep-wrap .price-chart__marker--high circle { stroke-width: 7.5px; }
    .ep-wrap .price-chart__marker--low .price-chart__marker__price { font-size: 80px; font-weight: 900; }
    .ep-wrap .price-chart__marker--low circle { stroke-width: 7.5px; }
    .ep-wrap .price-chart__marker--now circle { stroke-width: 7.5px; }
    .ep-wrap .price-chart__now-pill text { font-size: 82px; stroke-width: 20px; }
    .ep-wrap .price-chart__now-pill .price-chart__now-pill__sub { font-size: 76px; stroke-width: 18px; }
    .ep-wrap .price-chart__line--past, .ep-wrap .price-chart__line--future { stroke-width: 20; }
    .ep-wrap .price-chart__now-line { stroke-width: 3; stroke-dasharray: 5 4; }
    .ep-wrap .price-chart__grid line { stroke-width: 2.25; }
    .ep-wrap .price-chart__grid--minor line { stroke-width: 1.85; }
}
