/*
 * rangeExpansionList.css
 *
 * Styles for rangeExpansionList.php (Range Expansion Watchlist).
 */

.focus-hero {
    text-align: center;
    padding: 28px 16px 8px;
}
.focus-hero h1 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    margin: 0 0 8px;
    background: linear-gradient(90deg, #ff6b6b, #f7b733, #34d399, #4facfe, #a855f7);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: focusGradientShift 6s ease infinite;
    font-weight: 800;
}
@keyframes focusGradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.focus-hero p {
    max-width: 700px;
    margin: 0 auto;
    color: #555;
    font-size: 0.98rem;
}

.focus-explainer {
    max-width: 700px;
    margin: 12px auto 40px;
    text-align: left;
    color: #444;
    font-size: 0.94rem;
    line-height: 1.6;
    padding: 20px 22px;
    background: #fafafa;
    border-radius: 14px;
    border: 1px solid #eee;
}
.focus-explainer h3 {
    margin: 0 0 12px;
    font-size: 1.1rem;
    color: #222;
    text-align: center;
}
.focus-explainer p {
    margin: 0 0 12px;
}
.focus-explainer p:last-child {
    margin-bottom: 0;
}
.focus-explainer-note {
    font-size: 0.82rem;
    color: #888;
    font-style: italic;
    border-top: 1px solid #e5e5e5;
    padding-top: 12px;
}

.venn-wrapper {
    display: flex;
    justify-content: center;
    padding: 24px 16px 48px;
}

.venn-diagram {
    position: relative;
    width: 100%;
    max-width: 900px;
    aspect-ratio: 16 / 10;
}

/* Circles are intentionally static; only the tags inside them move (on
   hover, via the popup). */
.venn-circle {
    position: absolute;
    top: 50%;
    width: 58%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    transform: translateY(-50%);
    mix-blend-mode: multiply;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    z-index: 1;
}

/* Warm orange/coral rather than red or yellow: red reads as "bearish"
   to traders even in a purely decorative context; yellow multiply-
   blended with the right circle's blue produces green in the overlap
   (accidentally reading as "bullish"). This tone stays neutral on its
   own and still multiplies with blue into a neutral purple overlap. */
.venn-circle-left {
    left: 4%;
    background: radial-gradient(circle at 35% 35%, #ffb37a, #ff8c5a 60%, #f2683c 100%);
}

.venn-circle-right {
    right: 4%;
    background: radial-gradient(circle at 65% 35%, #a1c4fd, #4facfe 60%, #00c6ff 100%);
}

/* Region column = title + its tag list combined into one flex block,
   vertically AND horizontally centered within the space between the
   circle's outer curve and the overlap lens. Self-balances regardless
   of how many stocks are in a region on any given day. */
.venn-region-column {
    position: absolute;
    top: 8%;
    bottom: 8%;
    width: 40%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 2;
}

.venn-region-column-left {
    left: 8%;
}

.venn-region-column-right {
    right: 8%;
}

.venn-region-title {
    font-weight: 800;
    font-size: 0.85rem;
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.35);
    white-space: nowrap;
    margin: 0;
    flex-shrink: 0;
    pointer-events: none;
}

/* Static, vertical tag list inside each region: a single centered
   column so tags never spill outside their own circle or bleed into
   a neighboring region. Pills size to their own text. */
.venn-tag-zone {
    width: 100%;
    max-height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 6px;
}

.venn-tag-zone .venn-tag {
    width: auto;
    max-width: 100%;
    text-align: center;
    box-sizing: border-box;
}

/* Overlap zone: no title, just centered in the lens. */
.venn-tag-zone-overlap {
    position: absolute;
    left: 35%;
    width: 30%;
    top: 50%;
    transform: translateY(-50%);
    max-height: 70%;
    justify-content: center;
    z-index: 3;
}

.venn-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
}

.venn-tag {
    background: rgba(255,255,255,0.92);
    color: #222;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
    cursor: default;
}

.venn-tag:hover {
    background: #fff;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.9), 0 0 16px rgba(255, 210, 0, 0.9);
    z-index: 5;
    position: relative;
}

.venn-empty {
    color: rgba(255,255,255,0.85);
    font-size: 0.8rem;
    font-style: italic;
}

/* Primary entry point into the chart carousel — always visible per
   region, so the carousel is discoverable without first hovering/tapping
   a pill. Deliberately louder than the pills themselves (solid fill,
   drop shadow) since this is meant to read as the headline action. */
.venn-browse-charts {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(90deg, #4facfe, #a855f7);
    border: none;
    padding: 7px 14px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(79, 172, 254, 0.4);
    white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
}
.venn-browse-charts:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(168, 85, 247, 0.45);
}
.venn-browse-charts:active {
    transform: translateY(0);
}
.venn-browse-charts-arrow {
    font-size: 0.95rem;
    line-height: 1;
}

/* Row that holds Browse Charts + Export Watchlist together, wrapping on
   narrow widths rather than overflowing the region column. */
.venn-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}
.venn-action-row .venn-browse-charts {
    margin-top: 0;
}

/* Single combined "Export Full Watchlist" button — placed once, below
   the whole page layout (after focus-zone-panel), since it covers all
   three regions rather than belonging to any one of them. Plain block
   context here (not inside the flex .venn-wrapper), so no special
   layout rules are needed beyond centering it. */
.venn-export-all-row {
    display: flex;
    justify-content: center;
    max-width: 700px;
    margin: 20px auto 40px;
}
.venn-export-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(90deg, #34d399, #4facfe);
    border: none;
    padding: 10px 22px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(52, 211, 153, 0.4);
    white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.venn-export-all:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(79, 172, 254, 0.45);
}
.venn-export-all:active {
    transform: translateY(0);
}

/* Inside the focus-zone-panel (light background), the gradient button
   already has enough contrast on its own — no override needed — but the
   region column layout there is centered, matching venn-region-column. */
.focus-zone-panel .venn-browse-charts {
    margin-top: 14px;
}

@media (max-width: 700px) {
    .venn-diagram {
        display: none;
    }
    .venn-mobile-panels {
        display: block !important;
    }
    /* The combined export row sits after .venn-diagram closes (not
       nested inside it), so it needs its own hide rule here — the
       mobile-specific instance below the stacked panels takes over. */
    .venn-export-all-row:not(.venn-export-all-row-mobile) {
        display: none;
    }
}

.venn-mobile-panels {
    display: none;
    max-width: 700px;
    margin: 0 auto;
}
.venn-mobile-panel {
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 14px;
    text-align: center;
}
.venn-mobile-panel-left {
    background: linear-gradient(135deg, #ffb37a, #f2683c);
}
.venn-mobile-panel-right {
    background: linear-gradient(135deg, #a1c4fd, #00c6ff);
}
.venn-mobile-panel .venn-region-title {
    color: #fff;
}

.focus-zone-panel {
    max-width: 700px;
    margin: 0 auto 40px;
    text-align: center;
    background: linear-gradient(135deg, #fff7e6, #ffe9c7);
    border: 2px solid #f7971e;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(247,151,30,0.2);
}
.focus-zone-panel .venn-region-title {
    color: #3a2100;
    text-shadow: none;
}

/* Pro-locked state shown to free / logged-out users in place of the
   watchlist. */
.venn-locked {
    max-width: 560px;
    margin: 20px auto 50px;
    text-align: center;
    background: linear-gradient(135deg, #ffe6f0, #e6f0ff);
    border: 2px dashed #c084fc;
    border-radius: 20px;
    padding: 36px 24px;
}
.venn-locked-icon {
    font-size: 2.4rem;
    margin-bottom: 8px;
}
.venn-locked h2 {
    margin: 0 0 10px;
    font-size: 1.3rem;
    color: #6b21a8;
}
.venn-locked p {
    color: #555;
    font-size: 0.95rem;
    margin: 0 0 18px;
}
.venn-locked-cta {
    display: inline-block;
    background: linear-gradient(90deg, #ff6b6b, #a855f7);
    color: #fff;
    font-weight: 700;
    padding: 10px 26px;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(168, 85, 247, 0.4);
}

/* Pill hover/tap cursor - the actual popup card is built and
   positioned by JS, since a CSS-only tooltip is too small to read
   comfortably and clips off-screen for pills near the top of the
   diagram. */
.venn-tag[data-symbol] {
    cursor: pointer;
}

/* Shared floating popup card, one instance reused for whichever pill
   is currently active. JS sets its position and content. */
.venn-popup {
    position: fixed;
    display: none;
    background: #1f2937;
    color: #fff;
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    z-index: 200;
    min-width: 180px;
    /* Pointer events are enabled (unlike the original text-only popup) so
       the chart link(s) below can be hovered onto and clicked without the
       popup closing first. rangeExpansionList.js keeps it open via a
       short close-delay + mouseenter/mouseleave pair on the popup itself. */
    pointer-events: auto;
}
.venn-popup.venn-popup-visible {
    display: block;
}
.venn-popup-symbol {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: 0.02em;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 6px;
}
.venn-popup-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 3px 0;
}
.venn-popup-row .venn-popup-label {
    color: #9ca3af;
    font-weight: 600;
}
.venn-popup-row .venn-popup-value {
    color: #fff;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* Divider between the TC/BC/R1/S1 set and the Gann Square of 9 Buy
   Above / Sell Below set below it. */
.venn-popup-divider {
    height: 1px;
    background: rgba(255,255,255,0.18);
    margin: 8px 0;
}

/* Chart launch link(s), appended after the Gann rows. Styled distinctly
   (pill-like, accent color) so it reads as an action rather than another
   data row. */
.venn-popup-chart-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.venn-popup-chart-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #93c5fd;
    text-decoration: none;
    padding: 4px 2px;
    cursor: pointer;
}
.venn-popup-chart-link:hover {
    color: #bfdbfe;
    text-decoration: underline;
}

/* On touch devices, tapping a pill opens the popup and tapping
   anywhere else closes it; this invisible backdrop catches that
   outside tap. Desktop never sees it (hover handles it there). */
.venn-popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 190;
    display: none;
}
.venn-popup-backdrop.venn-popup-backdrop-visible {
    display: block;
}
