/* HVN Precious Metals Widget v1.5.0 */

.hvn-metals-wrap {
    background: #111d15;
    border-radius: 8px;
    overflow: hidden;
    font-family: 'Raleway', 'Helvetica Neue', Helvetica, sans-serif;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0,0,0,.35);
    border: 1px solid rgba(184,154,104,.2);
    position: relative;
}

/* Header */
.hvn-metals-header {
    background: linear-gradient(135deg, #1a3324 0%, #2a5238 100%);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #b89a68;
}
.hvn-metals-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.hvn-metals-logo {
    height: 36px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
    opacity: .9;
}
.hvn-metals-title {
    color: #d4b98a;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    line-height: 1.2;
}
.hvn-metals-subtitle {
    color: rgba(255,255,255,.45);
    font-size: .58rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-top: 2px;
}
.hvn-metals-live {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #7aaa80;
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .12em;
}
.hvn-metals-dot {
    width: 7px;
    height: 7px;
    background: #7aaa80;
    border-radius: 50%;
    display: inline-block;
    animation: hvnPulse 2s ease infinite;
}
@keyframes hvnPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .4; transform: scale(.8); }
}

/* Metal rows */
.hvn-metals-body {
    padding: 4px 0;
}
.hvn-metal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,.05);
    transition: background .2s;
}
.hvn-metal-row:last-child { border-bottom: none; }
.hvn-metal-row:hover { background: rgba(255,255,255,.03); }
.hvn-metal-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.hvn-metal-symbol {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .02em;
    flex-shrink: 0;
    background: rgba(255,255,255,.04);
}
.hvn-metal-name {
    color: #ede8d5;
    font-size: .84rem;
    font-weight: 700;
    line-height: 1.2;
}
.hvn-metal-unit {
    color: rgba(255,255,255,.3);
    font-size: .58rem;
    letter-spacing: .03em;
    margin-top: 2px;
}
.hvn-metal-price {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    letter-spacing: .01em;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    transition: opacity .3s;
}

/* Per-metal price colors */
[data-metal="gold"]      .hvn-metal-price { color: #f0c040 !important; }
[data-metal="silver"]    .hvn-metal-price { color: #c8c8c8 !important; }
[data-metal="platinum"]  .hvn-metal-price { color: #dde0e8 !important; }
[data-metal="palladium"] .hvn-metal-price { color: #ddf0ff !important; }
.hvn-metal-price.loading {
    opacity: .3;
    animation: hvnFade 1s ease infinite alternate;
}
@keyframes hvnFade { from { opacity:.3; } to { opacity:.7; } }

/* Footer */
.hvn-metals-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(0,0,0,.2);
    border-top: 1px solid rgba(255,255,255,.05);
}
.hvn-metals-updated {
    color: rgba(255,255,255,.3);
    font-size: .58rem;
    letter-spacing: .03em;
}
.hvn-metals-time { color: rgba(255,255,255,.5); }

/* Share button */
.hvn-metals-share-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(184,154,104,.15);
    border: 1px solid rgba(184,154,104,.3);
    color: #b89a68;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}
.hvn-metals-share-btn:hover {
    background: rgba(184,154,104,.28);
    color: #d4b98a;
}

/* Compact style */
.hvn-metals-compact .hvn-metals-header { padding: 10px 12px; }
.hvn-metals-compact .hvn-metals-logo { height: 28px; }
.hvn-metals-compact .hvn-metal-row { padding: 9px 12px; }
.hvn-metals-compact .hvn-metal-symbol { width: 30px; height: 30px; font-size: .65rem; }
.hvn-metals-compact .hvn-metal-price { font-size: 1rem; }
.hvn-metals-compact .hvn-metals-footer { padding: 8px 12px; }

/* Share modal */
.hvn-metals-share-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.hvn-metals-modal-inner {
    background: #111d15;
    border: 1px solid rgba(184,154,104,.3);
    border-radius: 8px;
    padding: 20px;
    max-width: 640px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.hvn-metals-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    color: #d4b98a;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.hvn-metals-modal-close {
    background: none;
    border: none;
    color: rgba(255,255,255,.5);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.hvn-metals-modal-close:hover { color: #fff; }
.hvn-metals-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}
.hvn-metals-download-btn,
.hvn-metals-copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 4px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    border: none;
    font-family: inherit;
}
.hvn-metals-download-btn {
    background: #b89a68;
    color: #1a3324;
    flex: 1;
    justify-content: center;
}
.hvn-metals-download-btn:hover { background: #d4b98a; color: #1a3324; }
.hvn-metals-copy-btn {
    background: rgba(255,255,255,.08);
    color: #ede8d5;
    border: 1px solid rgba(255,255,255,.12);
}
.hvn-metals-copy-btn:hover { background: rgba(255,255,255,.14); }
