:root {
    --thm-heat-low: #93c5fd;
    --thm-heat-high: #1e3a8a;
    --thm-tooltip-bg: #1f2937;
    --thm-hover-fill: #f59e0b;
    --thm-stroke-color: #ffffff;
}

.tecson-heizoelpreise-map-wrapper {
    position: relative;
    max-width: 100%;
    box-sizing: border-box;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.thm-heading {
    text-align: center;
    margin-bottom: 20px;
}

.thm-map-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: visible;
    touch-action: manipulation;
}

.thm-map-svg {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-select: none;
}

.thm-map-svg svg {
    width: 100%;
    height: auto;
    max-height: 800px;
    display: block;
}

/* Path interaction styling */
.thm-map-svg path {
    cursor: pointer;
    transition: fill 0.25s ease, stroke 0.2s ease, stroke-width 0.2s ease, opacity 0.25s ease, filter 0.2s ease;
    stroke: var(--thm-stroke-color, #ffffff);
    stroke-width: 1.2px;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.thm-map-svg svg path:hover,
.thm-map-svg svg path.is-active,
.thm-map-svg path:hover,
.thm-map-svg path.is-active {
    fill: var(--thm-hover-fill, #f59e0b) !important;
    stroke-width: 2.5px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
    paint-order: stroke fill;
}

/* Hit proxy circles for tiny states (Bremen, Berlin, Hamburg, Saarland) */
.thm-hit-proxy {
    cursor: pointer;
    fill: transparent;
    stroke: transparent;
    pointer-events: none;
}

@media (pointer: coarse), (max-width: 640px) {
    .thm-hit-proxy {
        pointer-events: all;
    }
}

/* Tooltip styles — visual values (background, color, padding, border-radius)
   are driven by Elementor controls via selectors with !important.
   Structural/layout defaults live here. */
.thm-tooltip {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32), 0 2px 8px rgba(0, 0, 0, 0.15);
    background-color: #1f2937;
    color: #ffffff;
    border-radius: 8px;
    padding: 10px 14px;
    transition: opacity 0.16s ease, transform 0.08s cubic-bezier(0.2, 0, 0.2, 1);
    z-index: 100;
    min-width: 140px;
    max-width: 240px;
    box-sizing: border-box;
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0);
}

.thm-tooltip.is-visible {
    opacity: 1;
}

/* Arrow indicator positioned dynamically */
.thm-tooltip::after {
    content: '';
    position: absolute;
    left: var(--thm-arrow-left, 50%);
    transform: translateX(-50%);
    border-style: solid;
    border-color: transparent;
    transition: left 0.08s ease;
}

/* Tooltip placed above cursor (arrow points down) */
.thm-tooltip.thm-tooltip--top::after {
    bottom: -6px;
    top: auto;
    border-width: 6px 6px 0 6px;
    border-top-color: var(--thm-tooltip-bg, #1f2937);
}

/* Tooltip placed below cursor (arrow points up) */
.thm-tooltip.thm-tooltip--bottom::after {
    top: -6px;
    bottom: auto;
    border-width: 0 6px 6px 6px;
    border-bottom-color: var(--thm-tooltip-bg, #1f2937);
}

/* Close button inside tooltip */
.thm-tooltip-close {
    display: none !important;
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.15) !important;
    border: none !important;
    outline: none !important;
    font-size: 16px;
    line-height: 1;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #ffffff !important;
    cursor: pointer;
    padding: 0;
    opacity: 0.8;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, background-color 0.2s;
}

.thm-tooltip-close:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.3) !important;
}

.thm-tooltip-region {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    opacity: 0.9;
    margin-bottom: 3px;
    padding-right: 18px;
}

.thm-tooltip-price {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 2px;
}

.thm-tooltip-label {
    font-size: 11px;
    opacity: 0.65;
}

/* Mobile State Select Dropdown */
.thm-mobile-select-wrap {
    display: none;
    margin-top: 18px;
    text-align: center;
}

.thm-mobile-select {
    width: 100%;
    max-width: 320px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: #ffffff;
    color: #1e293b;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
}

.thm-mobile-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* CTA */
.thm-cta-wrapper {
    text-align: center;
    margin-top: 28px;
}

.thm-cta-button {
    display: inline-block;
    background: var(--e-global-color-primary, #0f3f8d);
    color: #ffffff;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease;
}

.thm-cta-button:hover {
    background: var(--e-global-color-secondary, #0d326e);
    transform: translateY(-1px);
    color: #ffffff;
}

/* Mobile & Touch Layout */
@media (max-width: 640px) {
    .thm-mobile-select-wrap {
        display: block;
    }

    .thm-tooltip {
        max-width: 220px;
        min-width: 130px;
        z-index: 120;
    }

    .thm-tooltip-close {
        display: flex !important;
    }
}


