/* ═══════════════════════════════════════════════════════════════
   FXD Market Pulse — Public Styles v2.0.0
═══════════════════════════════════════════════════════════════ */

:root {
    --mp-green:   #22c55e;
    --mp-red:     #ef4444;
    --mp-grey:    #64748b;
    --mp-blue:    #3b82f6;
    --mp-gold:    #f59e0b;
    --mp-navy:    #0f2044;
    --mp-radius:  10px;
    --mp-font:    -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ═══════════════════════════════════════════════════════════════
   WIDGET (homepage / dark dashboard context)
═══════════════════════════════════════════════════════════════ */

.fxd-mp-widget {
    font-family: var(--mp-font);
    width: 100%;
    background: transparent;
    padding: 0;
    box-sizing: border-box;
}

.fxd-mp-widget-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    padding: 0;
}
.fxd-mp-widget-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0f172a;
}
.fxd-mp-widget-sub {
    font-size: 0.75rem;
    color: #64748b;
}
.fxd-mp-widget-link {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--mp-blue);
    text-decoration: none;
    white-space: nowrap;
}
.fxd-mp-widget-link:hover { text-decoration: underline; }

/* 4-card grid */
.fxd-mp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
@media (max-width: 900px) { .fxd-mp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .fxd-mp-grid { grid-template-columns: 1fr; } }

/* Individual card */
.fxd-mp-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top-width: 4px;
    border-radius: var(--mp-radius);
    padding: 14px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.fxd-mp-card--up   { border-top-color: var(--mp-green); }
.fxd-mp-card--down { border-top-color: var(--mp-red); }
.fxd-mp-card--flat { border-top-color: var(--mp-grey); }

.fxd-mp-card-icon {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 2px;
}
.fxd-mp-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}
.fxd-mp-card-ticker {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-bottom: 6px;
}
.fxd-mp-card-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
}
.fxd-mp-card-pct {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.fxd-mp-pct--up   { color: var(--mp-green); }
.fxd-mp-pct--down { color: var(--mp-red); }
.fxd-mp-pct--flat { color: var(--mp-grey); }

.fxd-mp-bias {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    align-self: flex-start;
    letter-spacing: 0.03em;
}
.fxd-mp-bias--bullish { background: rgba(34,197,94,0.12);  color: #16a34a; }
.fxd-mp-bias--bearish { background: rgba(239,68,68,0.12);  color: #dc2626; }
.fxd-mp-bias--neutral { background: rgba(100,116,139,0.12); color: #475569; }

.fxd-mp-widget-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.68rem;
    color: #94a3b8;
}

/* ═══════════════════════════════════════════════════════════════
   FULL ANALYSIS PAGE
═══════════════════════════════════════════════════════════════ */

.fxd-mp-page {
    font-family: var(--mp-font);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 60px;
    color: #1e293b;
}

/* Page header */
.fxd-mp-page-header {
    padding: 36px 0 28px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 32px;
}
.fxd-mp-page-title {
    font-size: 1.9rem;
    font-weight: 800;
    margin: 0 0 6px;
    color: var(--mp-navy);
}
.fxd-mp-page-sub {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0 0 4px;
}
.fxd-mp-page-updated {
    font-size: 0.78rem;
    color: #94a3b8;
    margin: 0;
}

/* 2x2 asset cards -- full page */
.fxd-mp-page-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}
@media (max-width: 600px) { .fxd-mp-page-grid { grid-template-columns: 1fr; } }

.fxd-mp-page-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: 4px solid #e2e8f0;
    border-radius: var(--mp-radius);
    padding: 18px 16px 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.fxd-mp-page-card--up   { border-top-color: var(--mp-green); }
.fxd-mp-page-card--down { border-top-color: var(--mp-red); }
.fxd-mp-page-card--flat { border-top-color: #cbd5e1; }

.fxd-mp-pc-top {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.fxd-mp-pc-icon {
    background: var(--mp-navy);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}
.fxd-mp-pc-info { flex: 1; }
.fxd-mp-pc-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}
.fxd-mp-pc-ticker {
    font-size: 0.72rem;
    color: #94a3b8;
}
.fxd-mp-pc-price-block { text-align: right; }
.fxd-mp-pc-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}
.fxd-mp-pc-pct {
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}
.fxd-mp-pct--up   { color: var(--mp-green); }
.fxd-mp-pct--down { color: var(--mp-red); }
.fxd-mp-pct--flat { color: #94a3b8; }

.fxd-mp-pc-bias {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
}
.fxd-mp-bias--bullish { background: rgba(34,197,94,0.1); }
.fxd-mp-bias--bearish { background: rgba(239,68,68,0.1); }
.fxd-mp-bias--neutral { background: rgba(100,116,139,0.1); }

.fxd-mp-pc-bias-label {
    font-size: 0.82rem;
    font-weight: 700;
    flex: 1;
    white-space: nowrap;
}
.fxd-mp-bias--bullish .fxd-mp-pc-bias-label { color: #16a34a; }
.fxd-mp-bias--bearish .fxd-mp-pc-bias-label { color: #dc2626; }
.fxd-mp-bias--neutral .fxd-mp-pc-bias-label { color: #475569; }

.fxd-mp-pc-conf {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
    white-space: nowrap;
}
.fxd-mp-conf--high   { background: rgba(34,197,94,0.2);  color: #16a34a; }
.fxd-mp-conf--medium { background: rgba(245,158,11,0.2); color: #b45309; }
.fxd-mp-conf--low    { background: rgba(100,116,139,0.2); color: #475569; }

.fxd-mp-pc-summary {
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.4;
}
.fxd-mp-pc-reason {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.5;
}

/* AI overview box */
.fxd-mp-overview-box {
    background: linear-gradient(135deg, #0f2044 0%, #1e3a5f 100%);
    color: #e2e8f0;
    border-radius: var(--mp-radius);
    padding: 24px 28px;
    margin-bottom: 32px;
}
.fxd-mp-overview-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin-bottom: 10px;
}
.fxd-mp-overview-box p {
    font-size: 0.95rem;
    line-height: 1.65;
    margin: 0 0 14px;
    color: #e2e8f0;
}
.fxd-mp-key-events {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.7);
}
.fxd-mp-key-events strong { color: #fff; }
.fxd-mp-key-events ul {
    margin: 6px 0 0 16px;
    padding: 0;
}
.fxd-mp-key-events li { margin-bottom: 4px; }

/* Sections */
.fxd-mp-section { margin-bottom: 40px; }
.fxd-mp-section-h {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--mp-navy);
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}
.fxd-mp-notice {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 20px;
    color: #64748b;
    font-size: 0.88rem;
}

/* Calendar table */
.fxd-mp-table-wrap { overflow-x: auto; }
.fxd-mp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.fxd-mp-table th {
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    white-space: nowrap;
    border-bottom: 2px solid #e2e8f0;
}
.fxd-mp-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}
.fxd-mp-day-row td {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    padding: 6px 12px;
}
.fxd-mp-evt-row:hover td { background: #f8fafc; }

/* Impact badges */
.fxd-mp-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.fxd-mp-badge--high   { background: rgba(239,68,68,0.15);  color: #dc2626; }
.fxd-mp-badge--medium { background: rgba(245,158,11,0.15); color: #b45309; }

/* Info tooltip trigger */
.fxd-mp-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    background: #94a3b8;
    color: #fff;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    margin-left: 5px;
    vertical-align: middle;
    flex-shrink: 0;
}
.fxd-mp-info:hover { background: var(--mp-blue); }

/* Actual value (released) */
td.fxd-mp-actual { font-weight: 700; color: var(--mp-navy); }

/* Asset tags */
.fxd-mp-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    margin-right: 3px;
    white-space: nowrap;
}
.fxd-mp-tag--dxy     { background: rgba(59,130,246,0.15);  color: #2563eb; }
.fxd-mp-tag--gold    { background: rgba(245,158,11,0.15);  color: #b45309; }
.fxd-mp-tag--oil     { background: rgba(34,197,94,0.15);   color: #16a34a; }
.fxd-mp-tag--bitcoin { background: rgba(249,115,22,0.15);  color: #ea580c; }

/* News */
.fxd-mp-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.fxd-mp-news-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--mp-radius);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.fxd-mp-news-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 600;
}
.fxd-mp-news-time { margin-left: auto; white-space: nowrap; }
.fxd-mp-news-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.45;
    text-decoration: none;
    display: block;
}
.fxd-mp-news-title:hover { color: var(--mp-blue); }

/* Tooltip */
.fxd-mp-tooltip {
    position: fixed;
    z-index: 9999;
    background: #1e293b;
    color: #e2e8f0;
    font-size: 0.78rem;
    line-height: 1.5;
    padding: 10px 14px;
    border-radius: 8px;
    max-width: 280px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.35);
    pointer-events: none;
}

/* =====================================================================
   Homepage widget — news section (v2.1.22)
   ===================================================================== */
.fxd-mp-widget-news {
    margin-top: 20px;
    border-top: 2px solid #e2e8f0;
    padding-top: 16px;
}
.fxd-mp-wn-heading {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 12px;
}
/* Dark card variants for the widget (navy background) */
.fxd-mp-news-grid--dark {
    margin-bottom: 0;
}
.fxd-mp-news-card--dark {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
    box-shadow: none;
}
.fxd-mp-news-card--dark .fxd-mp-news-meta {
    color: rgba(255,255,255,0.4);
}
.fxd-mp-news-title--dark {
    color: rgba(255,255,255,0.82);
}
.fxd-mp-news-title--dark:hover { color: #fff; }
/* Dark asset tags inside the widget cards */
.fxd-mp-news-tag--dark.fxd-mp-news-tag--bullish { background: rgba(74,222,128,0.15); color: #4ade80; }
.fxd-mp-news-tag--dark.fxd-mp-news-tag--bearish { background: rgba(248,113,113,0.15); color: #f87171; }
.fxd-mp-news-tag--dark.fxd-mp-news-tag--neutral { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.55); }
.fxd-mp-wn-more {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    color: var(--mp-blue);
    text-decoration: none;
    text-align: right;
}
.fxd-mp-wn-more:hover { text-decoration: underline; }

/* News tags in the full analysis page */
.fxd-mp-news-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
}
.fxd-mp-news-tag--bullish { background: rgba(74,222,128,0.12); color: #16a34a; }
.fxd-mp-news-tag--bearish { background: rgba(239,68,68,0.12); color: #dc2626; }
.fxd-mp-news-tag--neutral { background: rgba(0,0,0,0.06); color: #6b7280; }


/* ── Widget card enrichment ─────────────────────────────────────────── */
.fxd-mp-bias { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fxd-mp-wcard-conf {
    font-size: 0.62rem; font-weight: 700; padding: 1px 6px; border-radius: 20px;
    margin-left: auto; white-space: nowrap;
}
.fxd-mp-wcard-factor {
    font-size: 0.68rem; color: #64748b;
    line-height: 1.4; margin-top: 6px; padding-top: 6px;
    border-top: 1px solid #f1f5f9;
}

/* ── Calendar toggle ─────────────────────────────────────────────────── */
.fxd-mp-cal-header {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
}
.fxd-mp-cal-toggle { display: flex; gap: 4px; }
.fxd-mp-cal-btn {
    padding: 6px 16px; border-radius: 6px; border: 1px solid #cbd5e1;
    background: #fff; color: #64748b; font-size: 0.8rem; font-weight: 600;
    cursor: pointer; transition: all 0.15s;
}
.fxd-mp-cal-btn--active,
.fxd-mp-cal-btn:hover {
    background: #0f172a; color: #fff; border-color: #0f172a;
}

/* ═══════════════════════════════════════════════════════════════
   MINI CHARTS (widget cards)
═══════════════════════════════════════════════════════════════ */

.fxd-mp-chart-mini {
    width: 100%;
    height: 70px;
    margin: 8px 0 4px;
    border-radius: 6px;
    overflow: hidden;
    background: transparent;
}

/* Full-page chart container */
.fxd-mp-chart-full {
    width: 100%;
    height: 110px;
    margin: 10px 0;
    border-radius: 6px;
    overflow: hidden;
    background: transparent;
    /* no border — chart blends seamlessly into the card */
}

/* LWC v4 renders inside div.tv-lightweight-charts using a <table> layout.
   WordPress themes commonly apply global td/table borders/backgrounds that
   create a visible gray frame around the chart canvas.  Remove them here. */
.tv-lightweight-charts table,
.tv-lightweight-charts td {
    border:      0 !important;
    background:  transparent !important;
    outline:     0 !important;
    box-shadow:  none !important;
    padding:     0 !important;
}

/* Hide TradingView attribution anchor injected into the chart DOM. */
.tv-lightweight-charts a[href*="tradingview"] { display: none !important; }

/* ═══════════════════════════════════════════════════════════════
   SUPPORT / RESISTANCE BADGES
═══════════════════════════════════════════════════════════════ */

.fxd-mp-sr-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 4px 0 6px;
}

.fxd-mp-sr-row--page {
    margin: 0 0 10px;
}

.fxd-mp-sr {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.fxd-mp-sr--s {
    background: rgba(34,197,94,0.12);
    color: #16a34a;
    border: 1px solid rgba(34,197,94,0.3);
}

.fxd-mp-sr--r {
    background: rgba(239,68,68,0.1);
    color: #dc2626;
    border: 1px solid rgba(239,68,68,0.3);
}

/* Widget SR badges use same light-theme styles as page (no dark override) */

/* ═══════════════════════════════════════════════════════════════
   CALENDAR ACTUAL VALUE STATES
═══════════════════════════════════════════════════════════════ */

.fxd-mp-actual--released {
    color: #94a3b8;
    font-style: italic;
    font-size: 0.8em;
}


/* ── Live Economic Release Banner ─────────────────────────────────────────── */
.fxd-mp-release-wrap { margin-bottom: 12px; }
.fxd-mp-release-box  { background: linear-gradient(90deg,#1a0a0a,#1f0e0e); border: 1px solid rgba(239,68,68,.35); border-radius: 8px; overflow: hidden; }
.fxd-mp-rel-inner    { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 16px; }
.fxd-mp-rel-badge    { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: #ef4444; text-transform: uppercase; white-space: nowrap; animation: fxd-mp-blink 1.4s infinite; }
@keyframes fxd-mp-blink { 0%,100%{opacity:1} 50%{opacity:.45} }
.fxd-mp-rel-name     { font-size: 14px; font-weight: 700; color: #f1f5f9; white-space: nowrap; }
.fxd-mp-rel-val      { font-size: 13px; color: #94a3b8; white-space: nowrap; }
.fxd-mp-rel-val strong { color: #f1f5f9; }
.fxd-mp-rel-beat     { font-size: 13px; font-weight: 700; color: #4ade80; }
.fxd-mp-rel-miss     { font-size: 13px; font-weight: 700; color: #f87171; }
.fxd-mp-rel-inline   { font-size: 13px; color: #94a3b8; }
