/* ==========================================================================
   Stock Widget — V6 Glass Terminal Design
   CSS selectors matched to stock-widget.js class names.
   Fonts (Sora, IBM Plex Mono, Outfit) loaded via PHP enqueue, not here.
   ========================================================================== */


/* ==========================================================================
   1. MAIN CONTAINER
   .stock-widget — the card itself, sits inside a content container
   ========================================================================== */

.stock-widget {
    background: linear-gradient(135deg, var(--bh-bg-dark-deep) 0%, var(--bh-bg-dark) 30%, var(--bh-bg-card) 60%, var(--bh-bg-dark) 100%);
    border-radius: 16px;
    overflow: visible;
    position: relative;
    padding: 28px;
    color: var(--bh-text-on-dark-soft);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15), 0 1px 4px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Ambient effect matching hero ::before */
.stock-widget::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(var(--bh-blue-rgb),0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(var(--bh-accent-rgb),0.03) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Reset box-sizing inside widget */
.stock-widget *,
.stock-widget *::before,
.stock-widget *::after {
    box-sizing: border-box;
}


/* ==========================================================================
   2. GLASS PANELS
   Frosted glass effect used by inner cards
   ========================================================================== */

.stock-widget .glass {
    background: var(--bh-bg-elev);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 24px rgba(var(--bh-accent-rgb), 0.04), 0 2px 8px rgba(0, 0, 0, 0.15);
}

.stock-widget .glass-bright {
    background: var(--bh-bg-elev);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 24px rgba(var(--bh-accent-rgb), 0.04), 0 2px 8px rgba(0, 0, 0, 0.15);
}


/* ==========================================================================
   3. HEADER — logo + company name + LIVE badge + refresh
   JS class: .v6-top
   ========================================================================== */

.stock-widget .v6-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.stock-widget .v6-top > div:nth-child(2) {
    flex: 1;
    min-width: 0;
}

.stock-widget .v6-top h2 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stock-widget .v6-top .sub {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stock-widget .v6-badge {
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(var(--bh-accent-rgb), 0.15);
    color: var(--bh-accent);
    font-weight: 600;
    flex-shrink: 0;
    display: inline-block;
    white-space: nowrap;
    line-height: 1.4;
}

/* LIVE — brand (виджет фирменно показывает live-данные) + optional pulse */
.stock-widget .v6-badge.live {
    background: rgba(var(--bh-accent-rgb), 0.15);
    color: var(--bh-accent);
}
/* DELAYED — amber, премаркет/постмаркет */
.stock-widget .v6-badge.delayed {
    background: rgba(245, 158, 11, 0.15);
    color: var(--bh-status-warn);
}
/* CLOSED — muted gray, биржа закрыта */
.stock-widget .v6-badge.closed {
    background: rgba(107, 114, 128, 0.18);
    color: var(--bh-status-offline);
}

/* Refresh button */
.stock-widget .stock-widget-refresh {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.4);
    padding: 6px 8px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.stock-widget .stock-widget-refresh:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
}

.stock-widget .stock-widget-refresh.refreshing svg {
    animation: spin 0.8s linear infinite;
}

/* Logo as <img> */
.stock-widget .stock-widget-logo {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
}

.stock-widget .stock-widget-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

/* Logo placeholder — colored square with letter */
.stock-widget .stock-widget-logo-placeholder {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    color: #fff;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.stock-widget .stock-widget-logo-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 50%);
}


/* ==========================================================================
   4. MAIN GRID — price card (left) + metrics/reco (right)
   JS class: .v6-grid
   ========================================================================== */

.stock-widget .v6-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 16px;
    position: relative;
    z-index: 1;
}


/* ==========================================================================
   5. PRICE CARD — large price, change chips, OHLC, CTA button
   JS classes: .v6-price-card, .v6-price, .v6-changes, .v6-chip, .v6-ohlc
   ========================================================================== */

.stock-widget .v6-price-card {
    position: relative;
    overflow: hidden;
    padding: 28px;
    background: linear-gradient(135deg, var(--bh-bg-card) 0%, var(--bh-bg-card-2) 100%);
    border-radius: var(--bh-radius-lg);
    box-shadow: var(--bh-shadow-soft);
}
.stock-widget .v6-price-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--bh-radius-lg);
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(var(--bh-accent-rgb), 0.22),
        rgba(var(--bh-blue-rgb), 0.1),
        rgba(var(--bh-accent-rgb), 0.05));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

/* Main price — large mono with glow */
.stock-widget .v6-price {
    font-family: var(--bh-font-mono);
    font-size: 48px;
    font-weight: 700;
    color: var(--bh-text-on-dark);
    letter-spacing: -1.5px;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 30px rgba(var(--bh-accent-rgb), 0.25), 0 0 80px rgba(var(--bh-accent-rgb), 0.08);
    line-height: 1.2;
}

/* Price row — price left, sparkline right */
.stock-widget .v6-price-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.stock-widget .v6-price-left {
    flex-shrink: 0;
}
.stock-widget .v6-sparkline {
    flex: 1;
    min-width: 100px;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    padding-right: 4px;
}
.stock-widget .v6-sparkline-svg {
    width: 100%;
    max-width: 260px;
    height: 70px;
}
.stock-widget .v6-sparkline-tabs {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}
.stock-widget .v6-sparkline-tab {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    padding: 2px 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.stock-widget .v6-sparkline-tab:hover {
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.15);
}
.stock-widget .v6-sparkline-tab.active {
    color: var(--bh-accent);
    border-color: rgba(var(--bh-accent-rgb), 0.3);
    background: rgba(var(--bh-accent-rgb), 0.08);
}

/* Market status — next to LIVE badge */
.stock-widget .v6-market-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}
.stock-widget .v6-market-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.stock-widget .v6-market-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
}
.stock-widget .v6-market-time {
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
}

/* Change chips row */
.stock-widget .v6-changes {
    display: flex;
    gap: 8px;
    margin: 10px 0 18px;
    flex-wrap: wrap;
}

/* Individual chip (positive by default) */
.stock-widget .v6-chip {
    font-size: 13px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    background: rgba(var(--bh-chart-pos-rgb), 0.12);
    color: var(--bh-chart-pos);
    border: 1px solid rgba(var(--bh-chart-pos-rgb), 0.15);
}

/* Negative variant — JS uses .v6-chip-negative */
.stock-widget .v6-chip.v6-chip-negative {
    background: rgba(var(--bh-chart-neg-rgb), 0.12);
    color: var(--bh-chart-neg);
    border-color: rgba(var(--bh-chart-neg-rgb), 0.15);
}

/* OHLC grid — 2-column */
.stock-widget .v6-ohlc {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 18px;
}

.stock-widget .v6-ohlc-item {
    display: flex;
    justify-content: space-between;
    padding: 9px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    font-size: 13px;
}

.stock-widget .v6-ohlc-item .lbl {
    color: rgba(255, 255, 255, 0.4);
}

.stock-widget .v6-ohlc-item .val {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

/* CTA button — gradient green with glow */
.stock-widget .v6-cta {
    display: block;
    text-align: center;
    padding: 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--bh-accent), var(--bh-accent-dark));
    color: var(--bh-bg-dark-deep);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    box-shadow: 0 0 20px rgba(var(--bh-accent-rgb), 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
    cursor: pointer;
    border: none;
}

/* Tooltip on metrics */
.stock-widget .v6-tip {
    display: inline-block;
    cursor: help;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.25);
    position: relative;
    vertical-align: middle;
    margin-left: 3px;
    transition: color 0.2s;
}
.stock-widget .v6-tip:hover {
    color: rgba(255, 255, 255, 0.6);
}
.stock-widget .v6-tip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bh-bg-card);
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    width: 240px;
    white-space: normal;
    text-transform: none;
    letter-spacing: 0;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
}
.stock-widget .v6-tip:hover::after {
    opacity: 1;
    visibility: visible;
}
/* Arrow */
.stock-widget .v6-tip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--bh-bg-card);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 101;
}
.stock-widget .v6-tip:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Company activities description */
.stock-widget .v6-activities {
    margin-top: 16px;
    font-size: 15px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.78);
}
.stock-widget .v6-activities-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 6px;
}
/* v6-info: толкаем grid под label сверху, кнопку-toggle убираем (контент всегда раскрыт) */
.stock-widget .v6-info-toggle { display: none !important; }
.stock-widget .v6-info-body { display: block !important; margin-top: 6px; }

.stock-widget .v6-cta:hover {
    box-shadow: 0 0 30px rgba(var(--bh-accent-rgb), 0.45), 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
    color: var(--bh-bg-dark-deep);
    text-decoration: none;
}


/* ==========================================================================
   6. RIGHT COLUMN — metrics + recommendations
   JS class: .v6-right
   ========================================================================== */

.stock-widget .v6-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
}


/* ==========================================================================
   7. METRICS CARD — EPS, P/E, Market Cap, Dividends
   JS classes: .v6-met-card, .v6-met-grid, .v6-met
   ========================================================================== */

.stock-widget .v6-met-card {
    position: relative;
    padding: 20px;
    background: linear-gradient(135deg, var(--bh-bg-card) 0%, var(--bh-bg-card-2) 100%);
    border-radius: var(--bh-radius-lg);
    box-shadow: var(--bh-shadow-soft);
}
.stock-widget .v6-met-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--bh-radius-lg);
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(var(--bh-accent-rgb), 0.2),
        rgba(var(--bh-blue-rgb), 0.08),
        rgba(var(--bh-accent-rgb), 0.04));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

/* 52-Week Range Bar */
/* ==== 52-Week Range Slider (polished) ==== */
.stock-widget .v6-week-range {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.stock-widget .v6-week-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    gap: 10px;
    flex-wrap: wrap;
}
.stock-widget .v6-week-label {
    font-size: 11px;
    color: var(--bh-text-on-dark-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 500;
}
.stock-widget .v6-week-pos-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
}
.stock-widget .v6-week-pos-pos     { color: var(--bh-chart-pos); }
.stock-widget .v6-week-pos-neutral { color: var(--bh-text-on-dark-soft); }
.stock-widget .v6-week-pos-neg     { color: var(--bh-chart-neg); }

.stock-widget .v6-week-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.stock-widget .v6-week-val {
    font-family: var(--bh-font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--bh-text-on-dark-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.stock-widget .v6-week-bar {
    flex: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 5px;
    position: relative;
    cursor: help;
}
.stock-widget .v6-week-bar-fill {
    height: 100%;
    background: linear-gradient(90deg,
        rgba(var(--bh-chart-neg-rgb), 0.25) 0%,
        rgba(var(--bh-chart-pos-rgb), 0.25) 100%);
    border-radius: 5px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.stock-widget .v6-week-dot {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: var(--bh-bg-dark);
    border-radius: 50%;
    border: 3px solid var(--bh-chart-pos);
    box-shadow: 0 0 8px rgba(var(--bh-chart-pos-rgb), 0.5),
                0 2px 4px rgba(0, 0, 0, 0.3);
    transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}
.stock-widget .v6-week-dot.v6-week-dot-pos {
    border-color: var(--bh-chart-pos);
    box-shadow: 0 0 8px rgba(var(--bh-chart-pos-rgb), 0.55), 0 2px 4px rgba(0, 0, 0, 0.3);
}
.stock-widget .v6-week-dot.v6-week-dot-neg {
    border-color: var(--bh-chart-neg);
    box-shadow: 0 0 8px rgba(var(--bh-chart-neg-rgb), 0.55), 0 2px 4px rgba(0, 0, 0, 0.3);
}
.stock-widget .v6-week-dot.v6-week-dot-neutral {
    border-color: var(--bh-text-on-dark-muted);
    box-shadow: 0 0 6px rgba(156, 163, 175, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
}
/* hover на bar — небольшое подсвечивание */
.stock-widget .v6-week-bar:hover .v6-week-dot {
    transform: translate(-50%, -50%) scale(1.15);
}

.stock-widget .v6-met-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* ==== TOOL-CARD UPGRADE: signature look из Финансового журнала ==== */
.stock-widget .v6-met {
    position: relative;
    padding: 18px 16px;
    background: linear-gradient(135deg, var(--bh-bg-card) 0%, var(--bh-bg-card-2) 100%);
    border-radius: var(--bh-radius-md);
    box-shadow: var(--bh-shadow-soft);
    transition: transform 0.3s ease;
}
.stock-widget .v6-met::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--bh-radius-md);
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(var(--bh-accent-rgb), 0.2),
        rgba(var(--bh-blue-rgb), 0.1),
        rgba(var(--bh-accent-rgb), 0.05));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.stock-widget .v6-met:hover { transform: translateY(-1px); }

.stock-widget .v6-met label {
    display: block;
    font-size: 11px;
    color: var(--bh-text-on-dark-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 500;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.stock-widget .v6-met .val {
    font-family: var(--bh-font-mono);
    font-size: 22px;
    font-weight: 700;
    color: var(--bh-text-on-dark);
    line-height: 1.1;
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   8. RECOMMENDATIONS BAR
   JS classes: .v6-reco-card, .v6-reco-title, .v6-reco-bar, .v6-reco-seg-*,
               .v6-reco-labels
   ========================================================================== */

.stock-widget .v6-reco-card {
    position: relative;
    padding: 18px 20px;
    background: linear-gradient(135deg, var(--bh-bg-card) 0%, var(--bh-bg-card-2) 100%);
    border-radius: var(--bh-radius-md);
    box-shadow: var(--bh-shadow-soft);
    margin-top: 14px;
}
.stock-widget .v6-reco-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--bh-radius-md);
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(var(--bh-blue-rgb), 0.2),
        rgba(var(--bh-accent-rgb), 0.08),
        rgba(var(--bh-blue-rgb), 0.05));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.stock-widget .v6-reco-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 10px;
}

/* Segmented progress bar */
.stock-widget .v6-reco-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.04);
}

.stock-widget .v6-reco-bar div {
    height: 100%;
    transition: width 0.8s ease;
}

.stock-widget .v6-reco-seg-sb {
    background: var(--bh-chart-pos);
    box-shadow: 0 0 10px rgba(var(--bh-chart-pos-rgb), 0.5);
}

.stock-widget .v6-reco-seg-b {
    background: rgba(var(--bh-chart-pos-rgb), 0.65);
    box-shadow: 0 0 8px rgba(var(--bh-chart-pos-rgb), 0.3);
}

.stock-widget .v6-reco-seg-h {
    background: var(--bh-warning-soft);
}

.stock-widget .v6-reco-seg-s {
    background: var(--bh-warning);
}

.stock-widget .v6-reco-seg-ss {
    background: var(--bh-chart-neg);
    box-shadow: 0 0 8px rgba(var(--bh-chart-neg-rgb), 0.5);
}

/* Labels under the bar */
.stock-widget .v6-reco-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.45);
    gap: 4px;
}

.stock-widget .v6-reco-labels > span::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}
.stock-widget .v6-reco-labels > span:nth-child(1)::before { background: var(--bh-chart-pos); }
.stock-widget .v6-reco-labels > span:nth-child(2)::before { background: rgba(var(--bh-chart-pos-rgb), 0.55); }
.stock-widget .v6-reco-labels > span:nth-child(3)::before { background: var(--bh-warning-soft); }
.stock-widget .v6-reco-labels > span:nth-child(4)::before { background: var(--bh-warning); }
.stock-widget .v6-reco-labels > span:nth-child(5)::before { background: var(--bh-chart-neg); }

.stock-widget .v6-reco-labels > span {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.stock-widget .v6-reco-labels strong {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    display: block;
}


/* ==========================================================================
   9. EXPANDABLE COMPANY INFO
   JS classes: .v6-info, .v6-info-toggle, .v6-info-body, .v6-info-grid,
               .v6-info-item, .v6-full
   ========================================================================== */

.stock-widget .v6-info {
    margin-top: 18px;
    position: relative;
    z-index: 1;
}

.stock-widget .v6-info-toggle {
    width: 100%;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.stock-widget .v6-info-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.65);
}

.stock-widget .v6-info-toggle .arr {
    font-size: 10px;
}

.stock-widget .v6-info-body {
    display: none;
    margin-top: 12px;
}

.stock-widget .v6-info-body.open {
    display: block;
    animation: fadeIn 0.3s ease;
    padding-bottom: 4px;
}

.stock-widget .v6-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    max-width: 100%;
    overflow: hidden;
}

.stock-widget .v6-info-item {
    padding: 12px 14px;
    background: linear-gradient(135deg, var(--bh-bg-card) 0%, var(--bh-bg-card-2) 100%);
    border-radius: var(--bh-radius-sm);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.stock-widget .v6-info-item label {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.stock-widget .v6-info-item span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Full-width info item (spans all columns) */
.stock-widget .v6-full {
    grid-column: 1 / -1;
}


/* ==========================================================================
   10. LOADING STATE
   ========================================================================== */

.stock-widget-loading {
    padding: 60px 28px;
    text-align: center;
    background: linear-gradient(135deg, var(--bh-bg-dark-deep) 0%, var(--bh-bg-card) 50%, var(--bh-bg-card) 100%);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
}

.stock-widget-loading::after {
    content: '';
    display: block;
    width: 32px;
    height: 32px;
    margin: 16px auto 0;
    border: 2px solid rgba(var(--bh-accent-rgb), 0.15);
    border-top-color: var(--bh-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}


/* ==========================================================================
   11. ERROR STATE
   ========================================================================== */

.stock-widget-error {
    padding: 40px 28px;
    text-align: center;
    background: linear-gradient(135deg, var(--bh-bg-dark-deep) 0%, var(--bh-bg-card) 50%, var(--bh-bg-card) 100%);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.stock-widget-error .error-icon {
    font-size: 28px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.stock-widget-error .error-message {
    margin-bottom: 16px;
}

.stock-widget-error .retry-btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stock-widget-error .retry-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}


/* ==========================================================================
   12. ANIMATIONS
   ========================================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}


/* ==========================================================================
   13. CHART INTEGRATION — виджет + TradingView как единый блок
   ========================================================================== */

/* Когда за виджетом идёт график — убираем нижние скругления */
.stock-widget-with-chart .stock-widget {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
/* График прилипает к виджету, фон совпадает с hero */
.stock-widget-with-chart .tv-chart-wrapper {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-top: -1px;
    background: linear-gradient(135deg, var(--bh-bg-dark-deep) 0%, var(--bh-bg-dark) 30%, var(--bh-bg-card) 60%, var(--bh-bg-dark) 100%);
    border-color: rgba(255, 255, 255, 0.06);
}
.stock-widget-with-chart .tv-chart-wrapper .tv-chart-header {
    background: transparent;
    border-bottom-color: rgba(255, 255, 255, 0.06);
}
.stock-widget-with-chart .tv-chart-wrapper .tv-chart-footer {
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}


/* ==========================================================================
   14. RESPONSIVE — tablet and below
   ========================================================================== */

@media (max-width: 768px) {
    .stock-widget {
        padding: 20px;
    }

    .stock-widget .v6-grid {
        grid-template-columns: 1fr;
    }

    .stock-widget .v6-price {
        font-size: 32px;
    }

    .stock-widget .v6-top h2 {
        font-size: 16px;
    }

    .stock-widget .v6-met-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stock-widget .v6-info-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .stock-widget {
        padding: 16px;
        border-radius: 12px;
    }

    .stock-widget .v6-top {
        gap: 10px;
        margin-bottom: 18px;
    }

    .stock-widget .v6-top h2 {
        font-size: 15px;
    }

    .stock-widget .stock-widget-logo-placeholder,
    .stock-widget .stock-widget-logo {
        width: 38px;
        height: 38px;
    }

    .stock-widget .stock-widget-logo-placeholder {
        font-size: 16px;
        border-radius: 8px;
    }

    .stock-widget .v6-price {
        font-size: 28px;
        letter-spacing: -1px;
    }

    .stock-widget .v6-chip {
        font-size: 11px;
        padding: 4px 10px;
    }

    .stock-widget .v6-ohlc {
        grid-template-columns: 1fr;
    }

    .stock-widget .v6-met .val {
        font-size: 15px;
    }

    .stock-widget .v6-info-grid {
        grid-template-columns: 1fr;
    }

    .stock-widget .v6-reco-labels {
        font-size: 9px;
    }

    .stock-widget .v6-reco-labels strong {
        font-size: 12px;
    }
}


/* ==========================================================================
 * 15. LIVE MARKET DOT — pulse animation (online indicator)
 * ========================================================================== */
.stock-widget .v6-market-dot.live {
    position: relative;
    animation: bh-pulse 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes bh-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--bh-chart-pos-rgb), 0.7);
    }
    70% {
        box-shadow: 0 0 0 7px rgba(var(--bh-chart-pos-rgb), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--bh-chart-pos-rgb), 0);
    }
}


/* ==== MOBILE V2 — улучшения @media для узких экранов ==== */

/* Tablet (768px) — refresh button мельче, market status переносится */
@media (max-width: 768px) {
    .stock-widget .v6-top {
        flex-wrap: wrap;
        gap: 10px;
    }
    .stock-widget .v6-top > div:nth-child(2) {
        min-width: 0;
    }
    .stock-widget .v6-market-status {
        margin-left: 0;
        font-size: 12px;
        order: 99;
        width: 100%;
    }
    .stock-widget .v6-badge {
        font-size: 9px;
        padding: 3px 8px;
    }
    .stock-widget .v6-met-card,
    .stock-widget .v6-price-card {
        padding: 18px 16px;
    }
    .stock-widget .v6-met {
        padding: 14px 12px;
    }
    .stock-widget .v6-week-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .stock-widget .v6-week-pos-label {
        font-size: 10px;
    }
    .stock-widget .v6-week-bar {
        height: 8px;
    }
    .stock-widget .v6-week-dot {
        width: 12px;
        height: 12px;
        border-width: 2px;
    }
    .stock-widget .v6-sparkline {
        max-width: 130px;
    }
    .stock-widget .v6-sparkline-svg {
        max-width: 130px;
        height: 50px;
    }
}

/* Phone (480px) — компактный layout */
@media (max-width: 480px) {
    .stock-widget {
        padding: 14px;
    }
    .stock-widget .v6-top {
        margin-bottom: 14px;
    }
    .stock-widget .v6-top h2 {
        font-size: 14px;
    }
    .stock-widget .v6-top .sub {
        font-size: 11px;
    }
    .stock-widget .v6-price-row {
        flex-direction: column;
        gap: 8px;
    }
    .stock-widget .v6-sparkline {
        width: 100%;
        max-width: 100%;
        align-items: stretch;
    }
    .stock-widget .v6-sparkline-svg {
        max-width: 100%;
    }
    .stock-widget .v6-met-card,
    .stock-widget .v6-price-card {
        padding: 14px 12px;
    }
    .stock-widget .v6-met-grid {
        gap: 8px;
    }
    .stock-widget .v6-met {
        padding: 12px 10px;
    }
    .stock-widget .v6-met .val {
        font-size: 16px;
    }
    .stock-widget .v6-chip {
        font-size: 11px;
        padding: 4px 10px;
    }
    .stock-widget .v6-cta {
        padding: 12px;
        font-size: 14px;
    }
    .stock-widget .v6-reco-card {
        padding: 14px 12px;
    }
    .stock-widget .v6-reco-labels {
        font-size: 9px;
    }
    .stock-widget .v6-reco-labels strong {
        font-size: 12px;
    }
    .stock-widget .v6-week-val {
        font-size: 10px;
    }
    .stock-widget .v6-activities {
        font-size: 12px;
    }
    /* Reco bar mobile fix */
    .stock-widget .v6-reco-bar { height: 6px; }
    /* Tooltips — disable on touch (no hover); skipped automatically */
}

/* Phone XS (375px) — iPhone SE и узкие */
@media (max-width: 380px) {
    .stock-widget {
        padding: 12px;
        border-radius: 12px;
    }
    .stock-widget .v6-price {
        font-size: 28px;
        letter-spacing: -1px;
    }
    .stock-widget .v6-top h2 {
        font-size: 13px;
    }
    .stock-widget .stock-widget-logo-placeholder,
    .stock-widget .stock-widget-logo {
        width: 36px;
        height: 36px;
    }
    .stock-widget .v6-met .val {
        font-size: 14px;
    }
    .stock-widget .v6-ohlc {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   CALENDAR EVENTS — earnings + dividends
   JS classes: .v6-events, .v6-event, .v6-event-icon, .v6-event-label,
               .v6-event-date, .v6-event-rel, .v6-event-extra
   ========================================================================== */
.stock-widget .v6-events {
    margin-top: 16px;
}
.stock-widget .v6-events-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--bh-text-on-dark-muted);
    margin-bottom: 8px;
}
.stock-widget .v6-events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.stock-widget .v6-event {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 11px 14px;
    background: linear-gradient(135deg, var(--bh-bg-card) 0%, var(--bh-bg-card-2) 100%);
    border: 1px solid rgba(var(--bh-accent-rgb), 0.08);
    border-radius: var(--bh-radius-sm);
    transition: border-color .2s, transform .2s;
}
.stock-widget .v6-event:hover {
    border-color: rgba(var(--bh-accent-rgb), 0.22);
    transform: translateY(-1px);
}
.stock-widget .v6-event-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg,
        rgba(var(--bh-accent-rgb), 0.12) 0%,
        rgba(var(--bh-accent-rgb), 0.04) 100%);
    border: 1px solid rgba(var(--bh-accent-rgb), 0.18);
    color: var(--bh-accent);
}
.stock-widget .v6-event-icon svg {
    width: 17px;
    height: 17px;
    display: block;
}
/* Hover-эффект подсветки иконки */
.stock-widget .v6-event:hover .v6-event-icon {
    background: linear-gradient(135deg,
        rgba(var(--bh-accent-rgb), 0.20) 0%,
        rgba(var(--bh-accent-rgb), 0.08) 100%);
    border-color: rgba(var(--bh-accent-rgb), 0.32);
}
.stock-widget .v6-event-body { flex: 1; min-width: 0; }
.stock-widget .v6-event-line1 {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin-bottom: 3px;
    flex-wrap: wrap;
}
.stock-widget .v6-event-line2 {
    font-size: 12px;
    line-height: 1.35;
    color: rgba(255,255,255,0.6);
}
.stock-widget .v6-event-label {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--bh-text-on-dark-muted);
    white-space: nowrap;
}
.stock-widget .v6-event-date {
    font-size: 14px;
    font-weight: 700;
    color: var(--bh-text-on-dark);
    white-space: nowrap;
}
.stock-widget .v6-event-sep {
    color: rgba(255,255,255,0.22);
}
.stock-widget .v6-event-rel {
    color: rgba(255, 255, 255, 0.78);
    font-weight: 600;
}
.stock-widget .v6-event-money {
    color: var(--bh-text-on-dark);
    font-family: var(--bh-font-mono);
    font-weight: 600;
}
.stock-widget .v6-event-meta {
    color: rgba(255,255,255,0.5);
}

/* ==========================================================================
   PRICE ALERT — split CTA + inline form
   JS classes: .v6-cta-row, .v6-cta-primary, .v6-cta-alert, .v6-alert-form,
               .v6-alert-grid, .v6-alert-field, .v6-alert-submit, .v6-alert-status
   ========================================================================== */
.stock-widget .v6-cta-row {
    display: grid;
    grid-template-columns: 1fr minmax(170px, auto);
    gap: 10px;
    margin-top: 14px;
}
.stock-widget .v6-cta-primary { margin-top: 0 !important; }
.stock-widget .v6-cta-alert {
    text-shadow: none !important;
    box-shadow: none !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(var(--bh-accent-rgb), 0.32);
    color: var(--bh-accent);
    border-radius: var(--bh-radius-md);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .2s;
    letter-spacing: 0.1px;
}
.stock-widget .v6-cta-alert:hover {
    background: rgba(var(--bh-accent-rgb), 0.10) !important;
    border-color: var(--bh-accent) !important;
    box-shadow: 0 6px 16px rgba(var(--bh-accent-rgb), 0.18) !important;
    transform: translateY(-1px);
}
.stock-widget .v6-cta-alert svg { width: 18px; height: 18px; flex-shrink: 0; }
.stock-widget .v6-cta-alert span { text-shadow: none !important; }
.stock-widget .v6-cta-alert[aria-expanded=true] {
    background: rgba(var(--bh-accent-rgb), 0.14);
    border-color: var(--bh-accent);
}

.stock-widget .v6-alert-form {
    margin-top: 12px;
    padding: 18px;
    background: rgba(0,0,0,0.22);
    border: 1px solid rgba(var(--bh-accent-rgb), 0.18);
    border-radius: var(--bh-radius-md);
    animation: v6-alert-fade-in 0.25s ease;
}
.stock-widget .v6-alert-form[hidden] { display: none; }
@keyframes v6-alert-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.stock-widget .v6-alert-hint {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    line-height: 1.5;
    margin-bottom: 14px;
}
.stock-widget .v6-alert-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 10px;
    margin-bottom: 12px;
}
.stock-widget .v6-alert-field label {
    display: block;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.55);
    margin-bottom: 5px;
}
.stock-widget .v6-alert-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    background: rgba(0,0,0,0.32);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: #fff;
    font-family: var(--bh-font-mono, monospace);
    font-size: 14px;
    font-weight: 500;
    transition: border-color .15s, background .15s;
}
.stock-widget .v6-alert-field input:focus {
    outline: none;
    border-color: var(--bh-accent);
    background: rgba(0,0,0,0.4);
}
.stock-widget .v6-alert-field input::placeholder {
    color: rgba(255,255,255,0.3);
}

.stock-widget .v6-alert-submit {
    width: 100%;
    padding: 11px 16px;
    background: linear-gradient(135deg, var(--bh-accent) 0%, rgba(var(--bh-accent-rgb), 0.85) 100%);
    color: var(--bh-bg-dark-deep);
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.2px;
    transition: filter .15s, transform .15s, box-shadow .15s;
    box-shadow: 0 0 0 rgba(var(--bh-accent-rgb), 0);
}
.stock-widget .v6-alert-submit:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(var(--bh-accent-rgb), 0.25);
}
.stock-widget .v6-alert-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.stock-widget .v6-alert-status {
    margin-top: 10px;
    font-size: 12.5px;
    line-height: 1.45;
    min-height: 18px;
}
.stock-widget .v6-alert-status-ok    { color: var(--bh-accent); }
.stock-widget .v6-alert-status-error { color: var(--bh-chart-neg); }

@media (max-width: 640px) {
    .stock-widget .v6-cta-row {
        grid-template-columns: 1fr;
    }
    .stock-widget .v6-alert-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   PEERS — похожие акции, секция между widget-block и byline
   ========================================================================== */
.stock-peers {
    margin: 22px 0 24px;
}
.stock-peers-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}
.stock-peers-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #6b7280;
    margin: 0 0 14px;
    text-align: left;
}
.stock-peers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}
.stock-peers .peer-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: border-color .18s, transform .18s, box-shadow .18s;
}
.stock-peers .peer-card-link:hover {
    border-color: rgba(var(--bh-accent-rgb, 149, 206, 90), 0.4);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}
.stock-peers .peer-card-passive { cursor: default; opacity: 0.85; }
.stock-peers .peer-card-logo {
    width: 44px; height: 44px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.03);
    border-radius: 10px;
    overflow: hidden;
}
.stock-peers .peer-card-logo img { width: 32px; height: 32px; object-fit: contain; }
.stock-peers .peer-card-initial {
    font-size: 18px; font-weight: 700; color: #6b7280;
}
.stock-peers .peer-card-body { flex: 1; min-width: 0; }
.stock-peers .peer-card-ticker {
    font-size: 13px; font-weight: 700; color: #111827;
    letter-spacing: 0.3px; margin-bottom: 2px;
    font-family: var(--bh-font-mono, monospace);
}
.stock-peers .peer-card-name {
    font-size: 12px; color: #6b7280;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stock-peers .peer-card-arrow {
    flex-shrink: 0; color: var(--bh-accent, #95ce5a);
    transition: transform .18s;
}
.stock-peers .peer-card-arrow svg { width: 16px; height: 16px; display: block; }
.stock-peers .peer-card-link:hover .peer-card-arrow {
    transform: translateX(2px);
}
.stock-peers .peer-card-ext { color: #d1d5db; font-size: 18px; flex-shrink: 0; }

@media (max-width: 640px) {
    /* Горизонтальный свайп-карусель вместо grid — карточки не режутся, прокручиваются */
    .stock-peers-grid {
        display: flex;
        grid-template-columns: none;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        padding-bottom: 8px;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        /* выходим за padding .stock-peers-inner, чтобы карусель шла от края до края */
        margin: 0 -20px;
        padding-left: 20px;
        padding-right: 20px;
    }
    .stock-peers-grid::-webkit-scrollbar { display: none; }
    .stock-peers .peer-card {
        flex: 0 0 auto;
        width: 200px;
        padding: 12px 14px;
        gap: 10px;
        scroll-snap-align: start;
    }
    .stock-peers .peer-card-logo { width: 38px; height: 38px; }
    .stock-peers .peer-card-logo img { width: 28px; height: 28px; }
}

/* ==========================================================================
   STICKY MOBILE CTA — прилипает к низу на mobile при скролле
   ========================================================================== */
#stock-sticky-cta {
    position: fixed;
    left: 12px; right: 12px;
    bottom: 12px;
    z-index: 9990;
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
}
#stock-sticky-cta.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.stock-sticky-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--bh-accent, #95ce5a) 0%, rgba(var(--bh-accent-rgb, 149,206,90), 0.92) 100%);
    color: var(--bh-bg-dark-deep, #0d1117) !important;
    text-decoration: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(var(--bh-accent-rgb, 149,206,90), 0.4);
    text-shadow: none !important;
}
.stock-sticky-cta-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.stock-sticky-cta-btn:hover {
    filter: brightness(1.05);
    color: var(--bh-bg-dark-deep, #0d1117) !important;
    text-decoration: none;
}

/* Показывать только на мобиле */
@media (max-width: 768px) {
    #stock-sticky-cta { display: block; }
}

/* ==========================================================================
   PERFORMANCE BLOCK — EPS beat/miss + 1Y vs S&P/NASDAQ
   ========================================================================== */
.stock-widget .v6-perf {
    margin-top: 18px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 680px) {
    .stock-widget .v6-perf { grid-template-columns: 1fr; gap: 12px; }
}
.stock-widget .v6-perf-section {
    background: linear-gradient(135deg, var(--bh-bg-card) 0%, var(--bh-bg-card-2) 100%);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--bh-radius-md);
    padding: 14px 16px;
}
.stock-widget .v6-perf-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--bh-text-on-dark-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
}
.stock-widget .v6-perf-subtitle {
    font-size: 10.5px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: rgba(255,255,255,0.35);
}

/* — EPS bars — */
.stock-widget .v6-perf-eps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}
.stock-widget .v6-perf-eps-cell {
    display: flex; flex-direction: column; align-items: center;
    padding: 8px 4px;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
}
.stock-widget .v6-perf-eps-q {
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 4px;
    font-family: var(--bh-font-mono, monospace);
    letter-spacing: 0.3px;
}
.stock-widget .v6-perf-eps-icon {
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    margin-bottom: 4px;
}
.stock-widget .v6-perf-eps-icon svg { width: 13px; height: 13px; }
.stock-widget .v6-perf-eps-pct {
    font-size: 12px;
    font-weight: 700;
    font-family: var(--bh-font-mono, monospace);
    letter-spacing: 0.2px;
}
.stock-widget .v6-perf-beat .v6-perf-eps-icon {
    background: rgba(var(--bh-chart-pos-rgb), 0.15);
    color: var(--bh-chart-pos);
}
.stock-widget .v6-perf-beat .v6-perf-eps-pct { color: var(--bh-chart-pos); }
.stock-widget .v6-perf-miss .v6-perf-eps-icon {
    background: rgba(var(--bh-chart-neg-rgb), 0.15);
    color: var(--bh-chart-neg);
}
.stock-widget .v6-perf-miss .v6-perf-eps-pct { color: var(--bh-chart-neg); }
.stock-widget .v6-perf-eps-summary {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.stock-widget .v6-perf-eps-summary b { color: var(--bh-chart-pos); font-weight: 700; }

/* — vs S&P / NASDAQ — */
.stock-widget .v6-perf-vs {
    display: flex; flex-direction: column; gap: 9px;
}
.stock-widget .v6-perf-vs-row {
    display: grid;
    grid-template-columns: 64px 1fr 56px;
    align-items: center;
    gap: 10px;
    font-size: 11.5px;
}
.stock-widget .v6-perf-vs-name {
    color: rgba(255,255,255,0.65);
    font-weight: 500;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.stock-widget .v6-perf-vs-target .v6-perf-vs-name {
    color: #fff;
    font-weight: 700;
}
.stock-widget .v6-perf-vs-track {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}
.stock-widget .v6-perf-vs-bar {
    height: 100%;
    border-radius: 3px;
    transition: width .4s ease;
}
.stock-widget .v6-perf-vs-up   { background: linear-gradient(90deg, rgba(var(--bh-chart-pos-rgb), 0.55), var(--bh-chart-pos)); }
.stock-widget .v6-perf-vs-down { background: linear-gradient(90deg, rgba(var(--bh-chart-neg-rgb), 0.4), var(--bh-chart-neg)); }
.stock-widget .v6-perf-vs-pct {
    font-family: var(--bh-font-mono, monospace);
    font-weight: 700;
    font-size: 11.5px;
    text-align: center;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.2px;
    line-height: 1.2;
    white-space: nowrap;
}
.stock-widget .v6-perf-vs-pct.v6-perf-vs-up {
    color: #fff;
    background: var(--bh-chart-pos);
    box-shadow: 0 1px 4px rgba(var(--bh-chart-pos-rgb), 0.35);
}
.stock-widget .v6-perf-vs-pct.v6-perf-vs-down {
    color: #fff;
    background: var(--bh-chart-neg);
    box-shadow: 0 1px 4px rgba(var(--bh-chart-neg-rgb), 0.35);
}
.stock-widget .v6-perf-vs-verdict {
    font-size: 11.5px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid rgba(255,255,255,0.05);
    text-align: center;
    font-weight: 600;
}
.stock-widget .v6-perf-vs-verdict-up      { color: var(--bh-chart-pos); }
.stock-widget .v6-perf-vs-verdict-down    { color: var(--bh-chart-neg); }
.stock-widget .v6-perf-vs-verdict-neutral { color: rgba(255,255,255,0.55); }

/* ==========================================================================
   PEERS INSIDE WIDGET (right column bottom)
   ========================================================================== */
.stock-widget .v6-peers-card {
    margin-top: 16px;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--bh-bg-card) 0%, var(--bh-bg-card-2) 100%);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--bh-radius-md);
}
.stock-widget .v6-peers-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--bh-text-on-dark-muted);
    margin-bottom: 10px;
}
.stock-widget .v6-peers-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.stock-widget .v6-peer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    text-decoration: none;
    color: inherit;
    transition: border-color .18s, background .18s, transform .18s;
}
.stock-widget .v6-peer-link:hover {
    background: rgba(var(--bh-accent-rgb), 0.06);
    border-color: rgba(var(--bh-accent-rgb), 0.22);
    transform: translateX(2px);
}
.stock-widget .v6-peer-passive { cursor: default; }
.stock-widget .v6-peer-logo {
    width: 30px; height: 30px;
    flex-shrink: 0;
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.stock-widget .v6-peer-logo img { width: 22px; height: 22px; object-fit: contain; }
.stock-widget .v6-peer-initial {
    font-size: 13px; font-weight: 700; color: var(--bh-text-on-dark-muted);
}
.stock-widget .v6-peer-body { flex: 1; min-width: 0; overflow: hidden; }
.stock-widget .v6-peer-ticker {
    font-size: 12px; font-weight: 700;
    font-family: var(--bh-font-mono, monospace);
    color: var(--bh-text-on-dark);
    letter-spacing: 0.3px;
    line-height: 1.2;
}
.stock-widget .v6-peer-name {
    font-size: 11px;
    color: var(--bh-text-on-dark-soft);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    margin-top: 2px;
}
.stock-widget .v6-peer-arrow {
    width: 14px; height: 14px;
    color: var(--bh-accent);
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity .18s, transform .18s;
}
.stock-widget .v6-peer-link:hover .v6-peer-arrow {
    opacity: 1;
    transform: translateX(2px);
}

/* ==========================================================================
   AUTO-INTRO в начале article body — структурированный editorial-параграф
   ========================================================================== */
.stock-auto-intro {
    margin: 0 0 28px;
    padding: 16px 20px;
    background: rgba(var(--bh-accent-rgb), 0.04);
    border-left: 3px solid var(--bh-accent);
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.6;
    color: #2c3e50;
}
.stock-auto-intro strong { color: #1f2937; font-weight: 700; }
.stock-auto-intro a {
    color: var(--bh-accent);
    text-decoration: none;
    font-weight: 600;
}
.stock-auto-intro a:hover { text-decoration: underline; }
@media (max-width: 640px) {
    .stock-auto-intro { padding: 12px 14px; font-size: 15px; }
}

/* ==========================================================================
   RECOMMENDATIONS — full-width band под grid (вместо right column)
   Создаёт нижний якорь widget'a, выравнивает нижние границы
   ========================================================================== */
.stock-widget .v6-reco-full-wrap {
    margin-top: 18px;
}
.stock-widget .v6-reco-full-wrap .v6-reco-card {
    padding: 14px 20px;
}
.stock-widget .v6-reco-full-wrap .v6-reco-title {
    font-size: 12px;
    margin-bottom: 12px;
}
.stock-widget .v6-reco-full-wrap .v6-reco-bar {
    height: 10px;
    margin-bottom: 12px;
}
/* 5 категорий в горизонтальной ленте, более просторно */
.stock-widget .v6-reco-full-wrap .v6-reco-counts {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
@media (max-width: 640px) {
    .stock-widget .v6-reco-full-wrap .v6-reco-counts {
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
    }
}


/* Empty segments (0 analysts) — скрыты, в баре только реальные данные. Цвета 5 категорий показаны в labels-точках. */
.stock-widget .v6-reco-bar div[data-empty="1"] {
    display: none;
}

