/* ============================================================
   Dividend Fear & Greed Index — dfg-style.css
   houseofdividends.com — v2.0
   ============================================================ */

/* ── Wrapper ─────────────────────────────────────────────── */
.dfg-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    max-width: 680px;
    margin: 0 auto;
    padding: 22px 20px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    color: #1a1a1a;
    box-sizing: border-box;
}

/* ── Header ──────────────────────────────────────────────── */
.dfg-hdr {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}
.dfg-brand {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
}
.dfg-brand em {
    color: #1D9E75;
    font-style: normal;
}
.dfg-brand-sub {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}
.dfg-hdr-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.dfg-live {
    background: #EAF3DE;
    color: #27500A;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: .05em;
}
.dfg-date {
    font-size: 11px;
    color: #aaa;
}

/* ── Basket Tabs ─────────────────────────────────────────── */
.dfg-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.dfg-tab {
    font-size: 12px;
    padding: 6px 14px;
    border: 1px solid #ddd;
    background: transparent;
    border-radius: 20px;
    cursor: pointer;
    color: #666;
    transition: all .15s;
    font-family: inherit;
}
.dfg-tab:hover { border-color: #1D9E75; color: #1D9E75; }
.dfg-tab-on {
    background: #1D9E75;
    color: #fff;
    border-color: #1D9E75;
    font-weight: 600;
}

/* ── Gauge ───────────────────────────────────────────────── */
.dfg-gauge-sec {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 22px;
}
.dfg-gauge-svg {
    width: 260px;
    max-width: 100%;
    height: auto;
    overflow: visible;
}
#dfg-needle {
    transition: transform 1.2s cubic-bezier(.34,1.56,.64,1);
}
.dfg-score {
    font-size: 54px;
    font-weight: 700;
    line-height: 1;
    margin-top: 4px;
    text-align: center;
}
.dfg-score-lbl {
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    margin-top: 3px;
}
.dfg-prev {
    font-size: 11px;
    color: #aaa;
    text-align: center;
    margin-top: 5px;
}

/* Score scale band */
.dfg-scale {
    display: flex;
    width: 260px;
    max-width: 100%;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 10px;
}
.dfg-scale-seg {
    flex: 1;
    padding: 5px 3px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.dfg-scale-seg b {
    display: block;
    font-size: 9px;
    font-weight: 700;
}
.dfg-scale-seg span {
    display: block;
    font-size: 8px;
}

/* ── Section title ───────────────────────────────────────── */
.dfg-sec-title {
    font-size: 10px;
    font-weight: 700;
    color: #aaa;
    letter-spacing: .07em;
    text-transform: uppercase;
    margin: 20px 0 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #f0f0f0;
}

/* ── Indicators ──────────────────────────────────────────── */
.dfg-inds { display: flex; flex-direction: column; }

.dfg-ind {
    padding: 14px 0;
    border-bottom: 1px solid #f3f3f3;
}
.dfg-ind:last-child { border-bottom: none; }

.dfg-ind-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}
.dfg-ind-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}
.dfg-ind-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.dfg-ind-body {
    display: grid;
    grid-template-columns: 1fr 130px;
    gap: 14px;
    align-items: start;
}
.dfg-ind-txt {
    font-size: 12px;
    color: #555;
    line-height: 1.6;
}
.dfg-ind-txt strong { font-weight: 600; color: #1a1a1a; }

.dfg-ind-thresh {
    margin-top: 6px;
    font-size: 11px;
    color: #999;
    border-top: 1px dashed #ececec;
    padding-top: 5px;
}

.dfg-ind-right {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
}
.dfg-ind-val {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: right;
}
.dfg-bar-wrap {
    width: 100%;
    height: 7px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}
.dfg-bar {
    height: 100%;
    border-radius: 4px;
    transition: width .8s ease;
}
.dfg-hints {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
}
.dfg-hint-g, .dfg-hint-f {
    font-size: 10px;
    text-align: right;
    line-height: 1.3;
}
.dfg-hint-g { color: #3B6D11; }
.dfg-hint-f { color: #A32D2D; }
.dfg-ind-sub {
    font-size: 10px;
    color: #ccc;
    text-align: right;
    line-height: 1.3;
}

/* ── How to read it ──────────────────────────────────────── */
.dfg-how {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 4px;
}
.dfg-how-card {
    background: #f8f8f6;
    border-radius: 10px;
    padding: 12px 13px;
}
.dfg-how-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-bottom: 7px;
}
.dfg-how-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}
.dfg-how-desc {
    font-size: 11px;
    color: #666;
    line-height: 1.5;
}

/* ── Snapshot stats ──────────────────────────────────────── */
.dfg-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.dfg-stat {
    background: #f7f7f5;
    border-radius: 8px;
    padding: 10px 12px;
    text-align: center;
}
.dfg-stat-l {
    font-size: 10px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 4px;
}
.dfg-stat-v {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

/* ── Top movers ──────────────────────────────────────────── */
.dfg-movers {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 2px;
}
.dfg-mover {
    background: #f7f7f5;
    border-radius: 8px;
    padding: 8px 11px;
    min-width: 68px;
    flex-shrink: 0;
    text-align: center;
}
.dfg-mover-sym { font-size: 12px; font-weight: 600; color: #1a1a1a; }
.dfg-mover-yld { font-size: 11px; color: #1D9E75; margin-top: 2px; }
.dfg-mover-chg { font-size: 11px; font-weight: 600; margin-top: 2px; }
.dfg-up  { color: #1D9E75; }
.dfg-dn  { color: #A32D2D; }

/* ── Chart ───────────────────────────────────────────────── */
.dfg-chart-wrap {
    width: 100%;
    height: 120px;
}

/* ── Share buttons ───────────────────────────────────────── */
.dfg-share {
    display: flex;
    gap: 7px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.dfg-share-btn {
    font-size: 12px;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: 7px;
    border: 1px solid #ddd;
    background: transparent;
    cursor: pointer;
    color: #555;
    font-family: inherit;
    text-decoration: none;
    transition: background .15s;
}
.dfg-share-btn:hover { background: #f5f5f5; }
.dfg-tw { border-color: #1DA1F2; color: #1DA1F2; }
.dfg-li { border-color: #0A66C2; color: #0A66C2; }
.dfg-tw:hover { background: rgba(29,161,242,.07); }
.dfg-li:hover { background: rgba(10,102,194,.07); }

/* ── Embed ───────────────────────────────────────────────── */
.dfg-embed {
    margin-top: 14px;
    font-size: 12px;
    color: #aaa;
}
.dfg-embed summary {
    cursor: pointer;
    color: #1D9E75;
    user-select: none;
}
.dfg-embed-code {
    width: 100%;
    margin-top: 8px;
    font-size: 11px;
    font-family: monospace;
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #f9f9f9;
    resize: none;
    height: 56px;
    box-sizing: border-box;
    cursor: text;
}

/* ── Footer ──────────────────────────────────────────────── */
.dfg-footer {
    font-size: 11px;
    color: #ccc;
    text-align: center;
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}
.dfg-footer a { color: #1D9E75; text-decoration: none; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 520px) {
    .dfg-wrap { padding: 16px 14px; }
    .dfg-stats { grid-template-columns: repeat(2, 1fr); }
    .dfg-ind-body { grid-template-columns: 1fr; }
    .dfg-ind-right { align-items: flex-start; width: 100%; }
    .dfg-ind-val, .dfg-ind-sub, .dfg-hint-g, .dfg-hint-f { text-align: left; }
    .dfg-bar-wrap { width: 100%; }
    .dfg-how { grid-template-columns: 1fr; }
    .dfg-score { font-size: 44px; }
    .dfg-score-lbl { font-size: 18px; }
}
