/* ============================================================
   PROFESSIONAL MARKET TICKER
   ============================================================ */

.market-ticker {

    width: 100%;
    height: 54px;

    display: flex;
    align-items: center;

    background:
        linear-gradient(
            180deg,
            #151515 0%,
            #090909 100%
        );

    color: #e8e8e8;

    font-family:
        "Roboto Mono",
        "Courier New",
        monospace;

    border-top: 1px solid #303030;
    border-bottom: 1px solid #303030;

    box-shadow:
        0 2px 8px rgba(0,0,0,.35);

    overflow: hidden;

    position: relative;

    z-index: 9999;
}


/* ============================================================
   LEFT LABEL
   ============================================================ */

.market-ticker-label {

    height: 100%;

    min-width: 125px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    background: #111;

    color: #aaa;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 1.5px;

    border-right: 1px solid #333;

    flex-shrink: 0;
}


/* ============================================================
   LIVE DOT
   ============================================================ */

.live-dot {

    width: 7px;
    height: 7px;

    background: #16c784;

    border-radius: 50%;

    box-shadow:
        0 0 7px rgba(22,199,132,.8);

    animation:
        ticker-pulse 1.5s infinite;
}


@keyframes ticker-pulse {

    0% {
        opacity: 1;
    }

    50% {
        opacity: .35;
    }

    100% {
        opacity: 1;
    }
}


/* ============================================================
   TRACK
   ============================================================ */

.market-track {

    height: 100%;

    display: flex;
    align-items: center;

    flex: 1;

    overflow-x: auto;

    scrollbar-width: none;
}

.market-track::-webkit-scrollbar {
    display: none;
}


/* ============================================================
   TICKER ITEM
   ============================================================ */

.ticker-item {

    height: 100%;

    display: flex;
    align-items: center;

    gap: 12px;

    padding:
        0 22px;

    border-right:
        1px solid #292929;

    white-space: nowrap;

    flex-shrink: 0;
}


/* ============================================================
   SYMBOL
   ============================================================ */

.ticker-symbol {

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 1px;

    color: #777;
}


/* ============================================================
   NAME
   ============================================================ */

.ticker-name {

    font-family: Arial, sans-serif;

    font-size: 11px;

    font-weight: 700;

    letter-spacing: .8px;

    color: #ddd;
}


/* ============================================================
   PRICE
   ============================================================ */

.ticker-price {

    display: flex;
    align-items: baseline;

    gap: 5px;
}


.ticker-price span {

    font-size: 15px;

    font-weight: 700;

    color: #fff;
}


.ticker-price small,
.ticker-mxn small {

    font-size: 8px;

    color: #666;

    letter-spacing: .5px;
}


/* ============================================================
   CHANGE
   ============================================================ */

.ticker-change {

    display: flex;

    align-items: center;

    gap: 4px;

    font-size: 11px;

    font-weight: 700;
}


.ticker-change.up {

    color: #16c784;
}


.ticker-change.down {

    color: #ea3943;
}


.ticker-change.flat {

    color: #888;
}


.ticker-change .arrow {

    font-size: 9px;
}


.change-percent {

    opacity: .7;
}


/* ============================================================
   MXN
   ============================================================ */

.ticker-mxn {

    display: flex;

    align-items: baseline;

    gap: 5px;
}


.ticker-mxn span {

    font-size: 12px;

    font-weight: 600;

    color: #aaa;
}


/* ============================================================
   FX
   ============================================================ */

.fx-item {

    min-width: 145px;
}


.fx-item .ticker-price span {

    color: #f0f0f0;
}


/* ============================================================
   UPDATE
   ============================================================ */

.ticker-update {

    height: 100%;

    min-width: 110px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    padding: 0 15px;

    background: #0c0c0c;

    border-left: 1px solid #292929;

    flex-shrink: 0;
}


.ticker-update span {

    font-family: Arial, sans-serif;

    font-size: 7px;

    letter-spacing: 1px;

    color: #555;
}


.ticker-update strong {

    font-size: 10px;

    color: #aaa;

    margin-top: 2px;
}


/* ============================================================
   GOLD
   ============================================================ */

.metal-gold .ticker-symbol {

    color: #c8a951;
}


/* ============================================================
   SILVER
   ============================================================ */

.metal-silver .ticker-symbol {

    color: #b8b8b8;
}


/* ============================================================
   PRICE FLASH
   ============================================================ */

.price-flash {

    animation:
        price-flash-animation .6s ease;
}


@keyframes price-flash-animation {

    0% {
        background: rgba(255,255,255,.20);
    }

    100% {
        background: transparent;
    }
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 700px) {

    .market-ticker {

        height: 48px;

    }

    .market-ticker-label {

        min-width: 88px;

        font-size: 8px;

    }

    .ticker-item {

        padding: 0 15px;

        gap: 8px;

    }

    .ticker-name {

        display: none;

    }

    .ticker-price span {

        font-size: 13px;

    }

    .ticker-mxn {

        display: none;

    }

    .ticker-update {

        min-width: 90px;

    }

}

/* ============================================================
   SPARKLINE (ADDED 2026-10-06 -- new rules only, nothing above
   was changed). Last few updates of Gold / Silver. Colours are
   the ticker's own: up #16c784, down #ea3943, flat #888.
   ============================================================ */

.ticker-spark {

    width: 60px;
    height: 20px;

    flex-shrink: 0;

    overflow: visible;
}


.ticker-spark polyline {

    fill: none;

    stroke: #888;

    stroke-width: 1.5;

    stroke-linecap: round;
    stroke-linejoin: round;
}


.ticker-spark circle {

    fill: #888;
}


.ticker-spark.up polyline {

    stroke: #16c784;
}


.ticker-spark.up circle {

    fill: #16c784;
}


.ticker-spark.down polyline {

    stroke: #ea3943;
}


.ticker-spark.down circle {

    fill: #ea3943;
}


@media (max-width: 700px) {

    .ticker-spark {

        width: 44px;
        height: 16px;

    }

}

/* ============================================================
   PLATINUM / PALLADIUM + METALS PANEL (ADDED 2026-10-06 -- new
   rules only, nothing above was changed).
   ============================================================ */

.metal-platinum .ticker-symbol {

    color: #9bb7cf;
}


.metal-palladium .ticker-symbol {

    color: #b59bc9;
}


.mt-card {

    max-width: 920px;

    margin: 2rem auto 0;

    background: #fff;

    border-radius: 16px;

    padding: 1.6rem 1.5rem;

    box-shadow: 0 12px 36px rgba(11,43,68,.15);
}


.mt-title {

    margin: 0 0 .3rem;

    font-size: 1.4rem;

    color: #1a1a1a;
}


.mt-title i {

    color: #b8860b;

    margin-right: .4rem;
}


.mt-sub {

    margin: 0 0 1rem;

    color: #555;

    font-size: .95rem;
}


.mt-toolbar {

    display: flex;

    align-items: center;

    justify-content: space-between;

    flex-wrap: wrap;

    gap: .6rem;

    margin-bottom: .8rem;
}


.mt-seg {

    display: inline-flex;

    border: 1px solid #d9d2c0;

    border-radius: 10px;

    overflow: hidden;
}


.mt-seg-btn {

    padding: .35rem 1rem;

    border: 0;

    background: #fff;

    color: #6b4f1d;

    font-weight: 700;

    cursor: pointer;
}


.mt-seg-btn.on {

    background: #b8860b;

    color: #fff;
}


.mt-upd {

    font-size: .85rem;

    color: #666;
}


.mt-stale {

    color: #b8860b;
}


.mt-table-wrap {

    overflow-x: auto;
}


.mt-table {

    width: 100%;

    border-collapse: collapse;

    font-size: .95rem;
}


.mt-table th {

    text-align: right;

    font-size: .72rem;

    letter-spacing: .8px;

    text-transform: uppercase;

    color: #777;

    padding: .5rem .7rem;

    border-bottom: 2px solid #eee;

    white-space: nowrap;
}


.mt-table th:first-child,
.mt-table td.mt-name {

    text-align: left;
}


.mt-table td {

    text-align: right;

    padding: .6rem .7rem;

    border-bottom: 1px solid #f0f0f0;

    white-space: nowrap;

    font-variant-numeric: tabular-nums;
}


.mt-table td.mt-name {

    font-weight: 800;

    color: #1a1a1a;
}


.mt-up {

    color: #0f9d6b;

    font-weight: 700;
}


.mt-down {

    color: #d6303c;

    font-weight: 700;
}


.mt-flat {

    color: #888;
}


.mt-empty {

    text-align: center !important;

    color: #888;
}


.mt-note {

    margin: .6rem 0 0;

    font-size: .8rem;

    color: #777;
}


.mt-grid {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));

    gap: 1rem;

    margin-top: 1.4rem;
}


.mt-box {

    border: 1px solid #eee;

    border-radius: 12px;

    padding: 1rem 1.1rem;

    background: #fcfbf8;
}


.mt-box-wide {

    grid-column: 1 / -1;
}


.mt-box h3 {

    margin: 0 0 .6rem;

    font-size: 1.05rem;

    color: #6b4f1d;
}


.mt-box h3 small {

    font-size: .72rem;

    color: #999;

    font-weight: 400;
}


.mt-form {

    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap: .5rem;
}


.mt-select {

    padding: .3rem .5rem;

    border: 1px solid #d9d2c0;

    border-radius: 8px;

    background: #fff;
}


.mt-arrow {

    color: #999;
}


.mt-chart {

    display: block;

    width: 100%;

    height: auto;

    margin-top: .7rem;

    background: #fff;

    border: 1px solid #eee;

    border-radius: 8px;
}


.mt-chart[hidden] {

    display: none;
}


.mt-chart polyline {

    fill: none;

    stroke: #b8860b;

    stroke-width: 1.6;

    stroke-linecap: round;

    stroke-linejoin: round;
}


.mt-chart circle {

    fill: #b8860b;
}


.mt-result {

    margin: .6rem 0 0;

    font-size: .88rem;

    color: #333;

    line-height: 1.5;

    min-height: 1.2em;
}


.mt-result.bad {

    color: #d6303c;
}
