/*
 * Precious Metals Ticker — styled to match blog.swissamerica.com
 * Brand red: #c73939 | Dark bar: #1c1c1c | Gold prices: #d4a843
 */

#pmt-ticker-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99999;
    background-color: #1c1c1c;
    font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1;
    border-bottom: 2px solid #c73939;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

#pmt-ticker-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0 28px;
    padding: 9px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* "LIVE PRICES" badge styled with Swiss America red */
.pmt-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #fff;
    background-color: #c73939;
    padding: 3px 8px;
    border-radius: 2px;
    margin-right: 4px;
    white-space: nowrap;
}

.pmt-metal {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 20px;
}

/* First metal — no left border */
.pmt-metal:first-of-type {
    border-left: none;
    padding-left: 0;
}

.pmt-metal-name {
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #aaa;
}

/* Gold-toned prices — fitting for a precious metals site */
.pmt-metal-price {
    font-weight: 700;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    color: #d4a843;
}

.pmt-metal-price.pmt-loading {
    color: #666;
    font-size: 12px;
    font-weight: 400;
    font-style: italic;
}

/* Change indicators — keep green/red but tone them to not clash */
.pmt-change {
    font-size: 11px;
    font-weight: 600;
    margin-left: 1px;
}

.pmt-change.pmt-up {
    color: #5cb85c;
}

.pmt-change.pmt-down {
    color: #c73939;
}

.pmt-updated {
    font-size: 10px;
    color: #555;
    margin-left: 4px;
    padding-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

/* Push page body down so content isn't hidden behind ticker */
body {
    padding-top: 42px !important;
}

/* WordPress admin bar adjustment */
.admin-bar #pmt-ticker-bar {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar #pmt-ticker-bar {
        top: 46px;
    }

    body {
        padding-top: 38px !important;
    }
}

@media (max-width: 480px) {
    #pmt-ticker-inner {
        gap: 0 16px;
        padding: 8px 12px;
    }

    .pmt-metal {
        padding-left: 12px;
    }

    .pmt-label,
    .pmt-updated {
        display: none;
    }
}
