/* =============================================================================
   TECSON Heizölpreise Manager — Elementor Widget Styles
   Layout structure only — colors and typography are controlled via Elementor
   ============================================================================= */

/* --- Chart Widget --- */
.topm-chart-card {
    overflow: hidden;
    /* Background, border, shadow injected by Elementor */
}

.topm-chart-header {
    /* Padding, background injected by Elementor */
}

.topm-chart-title {
    margin: 0 0 4px;
    line-height: 1.3;
}

.topm-chart-subtitle {
    margin: 0;
}

.topm-chart-body {
    padding: 20px;
}

.topm-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
    /* Gap injected by Elementor */
}

.topm-avg-label {
    font-size: 13px;
    font-weight: 700;
    margin-right: 8px;
    color: #64748b; /* Fallback */
}

.topm-avg-btn {
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    /* Padding, border-radius, colors injected by Elementor */
}

.topm-chart-plot-area {
    position: relative;
    /* Background injected by Elementor */
}

.topm-infobox {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 20px;
    left: 80px;
    padding: 12px 16px;
    z-index: 10;
    /* Colors, border, shadow injected by Elementor */
}

.topm-infobox-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.topm-infobox-date {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 2px;
}

.topm-infobox-price {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2px;
}

.topm-infobox-unit {
    font-size: 11px;
}

.topm-chart-credits {
    margin: 16px 0 0;
    font-size: 11px;
    text-align: right;
}

/* --- Current Price Widget --- */
.topm-current-price-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* padding, bg, radius, shadow injected by Elementor */
}

.topm-current-price-inner {
    /* text-align injected by Elementor */
}

.topm-current-price-value-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 14px;
}

.topm-current-price-value {
    display: inline-block;
    font-weight: 800;
    line-height: 1.1;
    /* font-size, margin-bottom, color injected by Elementor */
}

.topm-current-price-unit {
    font-size: 0.38em;
    font-weight: 400;
    opacity: 0.72;
}

.topm-current-price-change {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

.topm-cp-trend-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.topm-current-price-label {
    font-weight: 500;
    letter-spacing: 0.01em;
    margin-bottom: 4px;
}

/* --- Comparison Card Widget --- */
.topm-comparison-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* padding, bg, radius, shadow, border-left injected by Elementor */
}

.topm-comparison-card.topm-comparison-ref-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topm-comparison-ref-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 2px;
}

.topm-comparison-ref-delta {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

.topm-comparison-row {
    display: flex;
    align-items: center;
    /* gap, margin-bottom injected by Elementor */
}

.topm-comparison-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    /* font-size, color injected by Elementor */
}

.topm-comparison-value {
    font-weight: 700;
    line-height: 1.2;
}

.topm-comparison-label {
    /* typography, color injected by Elementor */
}

.topm-comparison-compare-date {
    opacity: 0.7;
    margin-left: 4px;
}

/* --- Header Ticker Widget --- */
.topm-header-ticker {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    min-width: 0;
    text-decoration: none;
    line-height: 1.3;
}

.topm-ht-dot-wrap {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    width: 8px;
    height: 8px;
}

.topm-ht-dot {
    position: relative;
    display: inline-flex;
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    background-color: #00FF9D;
}

.topm-ht-dot-ping {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background-color: #00FF9D;
    opacity: 0.6;
    animation: topm-ht-ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes topm-ht-ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

.topm-ht-label {
    white-space: nowrap;
}

.topm-ht-price {
    font-weight: 700;
    white-space: nowrap;
}

.topm-ht-delta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    white-space: nowrap;
}

.topm-ht-trend-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.topm-ht-date {
    white-space: nowrap;
}

@media (max-width: 767px) {
    .topm-ht-hide-sm {
        display: none !important;
    }
}

@media (max-width: 1023px) {
    .topm-ht-hide-md {
        display: none !important;
    }
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .topm-chart-body {
        padding: 12px;
    }
    .topm-infobox {
        position: static;
        margin-bottom: 16px;
        align-items: center;
        text-align: center;
    }
}

/* =============================================================================
   TECSON Marktbericht & Marktdaten Widget (.topm-mr-*)
   ============================================================================= */
.topm-mr-callout {
    background: var(--e-global-color-uicore_light, #f8fafc);
    border: 1px solid var(--e-global-color-tecson_border, #e2e8f0);
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.topm-mr-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--e-global-color-uicore_primary, #242975);
    text-transform: uppercase;
}

.topm-mr-bullets {
    margin: 0;
    padding-left: 18px;
    list-style-type: disc !important;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--e-global-color-uicore_headline, #1a1d23);
}

.topm-mr-bullets li::marker {
    color: var(--e-global-color-uicore_primary, #242975);
}

.topm-mr-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--e-global-color-uicore_primary, #242975);
    text-decoration: none;
    align-self: flex-start;
}

.topm-mr-link:hover {
    text-decoration: underline;
}

.topm-mr-card {
    background: var(--e-global-color-uicore_white, #ffffff);
    border: 1px solid var(--e-global-color-tecson_border, #e2e8f0);
    border-radius: 16px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.topm-mr-news-card {
    padding: 32px;
}

.topm-mr-h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--e-global-color-uicore_headline, #1a1d23);
}

.topm-mr-p {
    margin: 0;
    font-size: 15px;
    line-height: 1.68;
    color: var(--e-global-color-uicore_body, #65758b);
}

.topm-mr-table-wrap {
    border: 1px solid var(--e-global-color-tecson_border, #e2e8f0);
    border-radius: 10px;
    overflow: hidden;
    background: var(--e-global-color-uicore_light, #f8fafc);
}

.topm-mr-table-head {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--e-global-color-uicore_primary, #242975);
    background: var(--e-global-color-tecson_muted, #f1f5f9);
    border-bottom: 1px solid var(--e-global-color-tecson_border, #e2e8f0);
}

.topm-mr-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
}

.topm-mr-table tr {
    border-top: 1px solid var(--e-global-color-tecson_border, #e2e8f0);
}

.topm-mr-table tr:first-child {
    border-top: none;
}

.topm-mr-table td {
    padding: 11px 16px;
}

.topm-mr-td-lbl {
    color: var(--e-global-color-uicore_body, #65758b);
}

.topm-mr-td-val {
    text-align: right;
    font-weight: 700;
    color: var(--e-global-color-uicore_headline, #1a1d23);
    white-space: nowrap;
}

.topm-mr-td-chg {
    text-align: right;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    width: 72px;
}

.topm-mr-td-chg.is-up {
    color: #dc2626;
}

.topm-mr-td-chg.is-down {
    color: #16a34a;
}

.topm-mr-td-chg.is-flat {
    color: #65758b;
}

.topm-mr-inline-quote {
    background: var(--e-global-color-uicore_light, #f8fafc);
    border: 1px solid var(--e-global-color-tecson_border, #e2e8f0);
    border-radius: 10px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.topm-mr-iq-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.topm-mr-iq-img {
    width: 110px !important;
    height: 110px !important;
    border-radius: 8px;
    object-fit: cover !important;
    flex-shrink: 0;
}

.topm-mr-iq-txt {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    font-style: italic;
    color: var(--e-global-color-uicore_headline, #1a1d23);
}

.topm-mr-iq-src {
    font-size: 13px;
    font-weight: 600;
    color: var(--e-global-color-uicore_primary, #242975);
}

.topm-mr-sublbl {
    font-size: 13px;
    color: var(--e-global-color-uicore_body, #65758b);
    margin-bottom: 6px;
}

.topm-mr-metric-val {
    font-size: 26px;
    font-weight: 800;
    color: var(--e-global-color-uicore_headline, #1a1d23);
    line-height: 1.2;
}

.topm-mr-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.topm-mr-pill {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    background: var(--e-global-color-tecson_secondary, #f1f5f9);
    color: var(--e-global-color-uicore_body, #65758b);
}

.topm-mr-pill.is-active {
    background: var(--e-global-color-uicore_primary, #242975);
    color: #ffffff;
    font-weight: 600;
}

.topm-mr-dark-quote {
    background: var(--e-global-color-uicore_primary, #242975);
    color: #ffffff;
    border-radius: 16px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    box-sizing: border-box;
}

.topm-mr-dq-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 16px;
}

.topm-mr-dq-head > div {
    min-width: 0;
    flex: 1 1 auto;
}

.topm-mr-dq-avatar {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    height: 150px !important;
    border-radius: 8px !important;
    object-fit: cover !important;
    object-position: center top !important;
    flex-shrink: 0;
}

.topm-mr-dq-name {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
}

.topm-mr-dq-role {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
}

.topm-mr-dq-body {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: #ffffff;
}

.topm-mr-dq-src {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.72);
}

.topm-mr-warte-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.topm-mr-risk-h {
    color: var(--e-global-color-tecson_coral, #e11d48);
}

.topm-mr-chance-h {
    color: var(--e-global-color-tecson_success, #16a34a);
}

.topm-mr-warte-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.topm-mr-warte-item {
    padding: 2px 0 2px 14px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--e-global-color-uicore_body, #65758b);
    border-left: 2px solid #cbd5e1;
}

.topm-mr-warte-item.is-risk {
    border-left-color: #e11d48;
}

.topm-mr-warte-item.is-chance {
    border-left-color: #16a34a;
}

@media (max-width: 767px) {
    .topm-mr-card,
    .topm-mr-news-card,
    .topm-mr-dark-quote {
        padding: 20px;
    }
    .topm-mr-dq-head {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 14px;
    }
    .topm-mr-dq-avatar {
        width: 150px !important;
        min-width: 150px !important;
        max-width: 150px !important;
        height: 150px !important;
    }
    .topm-mr-iq-row {
        flex-direction: column;
    }
    .topm-mr-iq-img {
        width: 84px !important;
        height: 84px !important;
    }
    .topm-mr-warte-grid {
        grid-template-columns: 1fr;
    }
}
