/* Coin price page (Views/Exchange/Price.cshtml), like binance.com/price/bitcoin.
   Theme tokens use the same values as Spot and the Order Book page. */

html.theme-dark .pp-page {
    --pp-fg: #EAECEF;
    --pp-muted: #848E9C;
    --pp-border: #2B3139;
    --pp-panel: rgba(24, 25, 27, 0.6);
    --pp-btn: #2B3139;
    --pp-btn-hover: #363c45;
}

html.theme-light .pp-page {
    --pp-fg: #1e2329;
    --pp-muted: #5e6673;
    --pp-border: #e0e3eb;
    --pp-panel: rgba(255, 255, 255, 0.72);
    --pp-btn: #eaecef;
    --pp-btn-hover: #dfe2e6;
}

.pp-page {
    /* Fallback for a first paint before the theme class lands. */
    --pp-fg: #EAECEF;
    --pp-muted: #848E9C;
    --pp-border: #2B3139;
    --pp-panel: rgba(24, 25, 27, 0.6);
    --pp-btn: #2B3139;
    --pp-btn-hover: #363c45;
    --pp-up: #0ECB81;
    --pp-down: #F6465D;
    --pp-accent: #F0B90B;
    max-width: 1100px;
    margin: 0 auto;
    color: var(--pp-fg);
    font-variant-numeric: tabular-nums;
}

/* ---- Breadcrumb ---- */
.pp-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--pp-muted);
    margin-bottom: 20px;
}

.pp-breadcrumb a {
    color: var(--pp-muted);
    text-decoration: none;
}

.pp-breadcrumb a:hover { color: var(--pp-fg); }

.pp-breadcrumb [aria-current] { color: var(--pp-fg); }

/* ---- Hero ---- */
.pp-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.pp-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex: 0 0 48px;
    object-fit: cover;
}

.pp-hero-text { min-width: 0; }

.pp-title {
    font-size: 14px;
    color: var(--pp-muted);
}

.pp-price {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
}

.pp-change { font-size: 14px; }

.pp-up { color: var(--pp-up); }
.pp-down { color: var(--pp-down); }

.pp-share {
    margin-left: auto;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 0;
    border-radius: 8px;
    background: var(--pp-btn);
    color: var(--pp-fg);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.pp-share:hover { background: var(--pp-btn-hover); }

.pp-share svg {
    width: 16px;
    height: 16px;
}

/* ---- Chart card ---- */
.pp-card {
    background: var(--pp-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--pp-border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 32px;
}

.pp-ranges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
}

.pp-range {
    border: 0;
    border-radius: 6px;
    padding: 4px 10px;
    background: none;
    color: var(--pp-muted);
    font-size: 13px;
    cursor: pointer;
}

.pp-range:hover { color: var(--pp-fg); }

.pp-range.active {
    background: var(--pp-btn);
    color: var(--pp-fg);
    font-weight: 600;
}

.pp-currency {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
}

.pp-chart-wrap {
    position: relative;
    height: 320px;
}

.pp-chart-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--pp-muted);
}

.pp-updated {
    margin-top: 8px;
    font-size: 12px;
    color: var(--pp-muted);
}

/* ---- Sections ---- */
.pp-section { margin-bottom: 32px; }

.pp-h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 16px;
}

.pp-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px 24px;
    margin: 0;
}

.pp-stat dt {
    font-size: 13px;
    font-weight: 400;
    color: var(--pp-muted);
    margin-bottom: 6px;
    cursor: help;
}

.pp-stat dd {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    overflow-wrap: anywhere;
}

/* ---- Price Today ---- */
.pp-h2-lg { font-size: 26px; }

.pp-h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 6px;
}

.pp-today {
    font-size: 14px;
    line-height: 1.6;
    color: var(--pp-muted);
    margin: 0;
}

/* ---- 24H Trading Activity ---- */
.pp-sub {
    font-size: 13px;
    color: var(--pp-muted);
    margin: 0 0 12px;
}

.pp-activity-bar {
    display: flex;
    gap: 2px;
    max-width: 600px;
    height: 6px;
}

.pp-activity-sell,
.pp-activity-buy {
    display: block;
    height: 100%;
    border-radius: 3px;
}

.pp-activity-sell { background: var(--pp-down); }
.pp-activity-buy { background: var(--pp-up); }

.pp-activity-labels {
    display: flex;
    justify-content: space-between;
    max-width: 600px;
    margin-top: 6px;
    font-size: 12px;
}

/* ---- Price History ---- */
.pp-history-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.pp-history-head .pp-h3 { margin: 0; }

.pp-tabs {
    display: inline-flex;
    gap: 2px;
    padding: 2px;
    border-radius: 6px;
    background: var(--pp-btn);
}

.pp-tab {
    border: 0;
    border-radius: 4px;
    padding: 3px 12px;
    background: none;
    color: var(--pp-muted);
    font-size: 12px;
    cursor: pointer;
}

.pp-tab:hover { color: var(--pp-fg); }

.pp-tab.active {
    background: var(--pp-panel);
    color: var(--pp-fg);
    font-weight: 600;
}

.pp-history {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.pp-history dt { cursor: default; }

/* ---- Resources ---- */
.pp-resources {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    font-size: 13px;
    margin-bottom: 32px;
}

.pp-resources[hidden],
.pp-resources a[hidden] { display: none; }

.pp-resources-title { color: var(--pp-muted); }

.pp-resources a {
    color: var(--pp-accent);
    text-decoration: none;
}

.pp-resources a:hover { text-decoration: underline; }

/* ---- Crypto Market Sentiments (Fear & Greed) ---- */
.pp-fng {
    display: grid;
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
    gap: 24px 48px;
    align-items: center;
    margin-bottom: 8px;
}

.pp-fng-gauge .pp-h3 { margin-bottom: 12px; }

.pp-fng-dial {
    position: relative;
    max-width: 240px;
}

.pp-fng-dial svg {
    display: block;
    width: 100%;
    height: auto;
}

/* Sits in the hollow of the arc. */
.pp-fng-readout {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    text-align: center;
}

.pp-fng-value {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
}

.pp-fng-label {
    font-size: 14px;
    font-weight: 600;
}

.pp-fng-history {
    margin: 0;
    max-width: 360px;
}

.pp-fng-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--pp-border);
    font-size: 14px;
}

.pp-fng-row:last-child { border-bottom: 0; }

.pp-fng-row dt {
    font-weight: 400;
    color: var(--pp-muted);
}

.pp-fng-row dd {
    margin: 0;
    font-weight: 600;
}

/* Value chip in the reading's colour (set inline by price.js from a fixed palette). */
.pp-fng-chip {
    display: inline-block;
    min-width: 32px;
    margin-left: 8px;
    padding: 1px 6px;
    border-radius: 4px;
    color: #fff;
    text-align: center;
}

.pp-fng-source {
    font-size: 12px;
    color: var(--pp-muted);
    margin: 0;
}

.pp-fng-source a { color: var(--pp-muted); }

@media (max-width: 991.98px) {
    .pp-history { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .pp-fng { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767.98px) {
    .pp-price { font-size: 26px; }
    .pp-stats,
    .pp-history { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pp-h2-lg { font-size: 22px; }
    .pp-chart-wrap { height: 240px; }
    .pp-stat dd { font-size: 16px; }
}
