/* ============================================================
   Gold & Silver Live Prices Plugin v2.0 – Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800&family=DM+Sans:wght@400;500;600&display=swap');

/* ---- Base ---- */
.gsp-wrapper {
    --gsp-radius:    12px;
/*     --gsp-font-disp: 'Playfair Display', serif; */
/*     --gsp-font-body: 'DM Sans', sans-serif; */
/*     font-family: var(--gsp-font-body); */
    max-width: 860px;
    margin: 1.5rem auto;
    border-radius: var(--gsp-radius);
    overflow: hidden;
    box-shadow: 0 6px 32px rgba(0,0,0,0.10);
}

/* ============================================================
   LIGHT THEME
   ============================================================ */
.gsp-light {
    --bg:        #FDFCF8;
    --bg-sect:   #FFFFFF;
    --border:    #E8E2D0;
    --text:      #1C1810;
    --text-muted:#6B6050;
    --row-even:  #FAF8F2;
    --row-hover: #FFF5DC;
    background: var(--bg);
    border: 1px solid var(--border);
}

/* ============================================================
   DARK THEME
   ============================================================ */
.gsp-dark {
    --bg:        #131110;
    --bg-sect:   #1C1916;
    --border:    #2C2820;
    --text:      #F0EAD8;
    --text-muted:#8C7E68;
    --row-even:  #181512;
    --row-hover: #252018;
    background: var(--bg);
    border: 1px solid var(--border);
}

/* ============================================================
   GOLD HEADER
   ============================================================ */
.gsp-header-gold {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background: linear-gradient(120deg, #1A1205 0%, #3A2A08 40%, #2A1E06 70%, #1A1205 100%);
    border-bottom: 2px solid #7A5C10;
}

/* ============================================================
   SILVER HEADER
   ============================================================ */
.gsp-header-silver {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background: linear-gradient(120deg, #0E1118 0%, #1E2535 40%, #16202E 70%, #0E1118 100%);
    border-bottom: 2px solid #3A4E6A;
}

/* ---- Shared header pieces ---- */
.gsp-header-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.gsp-logo {
    font-size: 2.2rem;
}
.gsp-header-gold   .gsp-logo { filter: drop-shadow(0 0 10px rgba(255,200,50,0.5)); }
.gsp-header-silver .gsp-logo { filter: drop-shadow(0 0 10px rgba(160,190,230,0.5)); }

.gsp-header-gold   h2,
.gsp-header-silver h2 {
    margin: 0;
/*     font-family: var(--gsp-font-disp); */
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1;
}
.gsp-header-gold   h2 { color: #F5D98B; }
.gsp-header-silver h2 { color: #C8D8EC; }

.gsp-updated {
    display: block;
    font-size: 0.7rem;
    margin-top: 3px;
    opacity: 0.65;
}
.gsp-header-gold   .gsp-updated { color: #C8A84A; }
.gsp-header-silver .gsp-updated { color: #7A9ABE; }

/* ---- Currency badges ---- */
.gsp-currency-badge {
/*     font-family: var(--gsp-font-disp); */
    font-size: 1rem;
    font-weight: 700;
    padding: 0.3rem 0.9rem;
    border-radius: 6px;
    letter-spacing: 0.04em;
}
.gsp-badge-gold {
    background: #C9952A;
    color: #1A1205;
}
.gsp-badge-silver {
    background: #6A8AAE;
    color: #FFFFFF;
}

/* ============================================================
   SPOT HERO CARDS
   ============================================================ */
.gsp-spot-hero {
    padding: 1.5rem;
    position: relative;
}

.gsp-spot-hero-gold {
    background: linear-gradient(135deg, #FFF8E0 0%, #FFF0B0 50%, #FFF8E0 100%);
    border-bottom: 1px solid #DEB96A;
}
.gsp-dark .gsp-spot-hero-gold {
    background: linear-gradient(135deg, #221A04 0%, #2E2208 50%, #221A04 100%);
    border-bottom: 1px solid #5C4410;
}

.gsp-spot-hero-silver {
    background: linear-gradient(135deg, #EEF2F8 0%, #E0E8F4 50%, #EEF2F8 100%);
    border-bottom: 1px solid #A0B8D0;
}
.gsp-dark .gsp-spot-hero-silver {
    background: linear-gradient(135deg, #0E1420 0%, #141E2E 50%, #0E1420 100%);
    border-bottom: 1px solid #2A3E58;
}

.gsp-spot-hero-inner {
    display: flex;
    align-items: center;
    gap: 0;
}

.gsp-spot-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.5rem 1rem;
}

.gsp-spot-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 6px;
}
.gsp-spot-hero-gold   .gsp-spot-label { color: #8B6010; }
.gsp-spot-hero-silver .gsp-spot-label { color: #4A6A8E; }
.gsp-dark .gsp-spot-hero-gold   .gsp-spot-label { color: #C8A050; }
.gsp-dark .gsp-spot-hero-silver .gsp-spot-label { color: #7AA0C8; }

.gsp-spot-big {
/*     font-family: var(--gsp-font-disp); */
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text);
}

.gsp-spot-divider {
    width: 1px;
    height: 52px;
    flex-shrink: 0;
}
.gsp-spot-hero-gold   .gsp-spot-divider { background: rgba(180,140,40,0.3); }
.gsp-spot-hero-silver .gsp-spot-divider { background: rgba(100,150,200,0.3); }

/* Markup ribbon */
.gsp-markup-ribbon {
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-left: 50%;
    transform: translateX(-50%);
}
.gsp-markup-ribbon { background: rgba(180,140,30,0.15); color: #8B6010; }
.gsp-markup-ribbon-silver { background: rgba(80,130,190,0.15); color: #3A6898; }
.gsp-dark .gsp-markup-ribbon { color: #D4A840; }
.gsp-dark .gsp-markup-ribbon-silver { color: #80B0D8; }

/* ============================================================
   SECTIONS
   ============================================================ */
.gsp-section {
    background: var(--bg-sect);
    margin: 0 1rem 1rem;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.gsp-section-title {
    padding: 0.7rem 1.2rem;
/*     font-family: var(--gsp-font-disp); */
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}
.gsp-section-gold .gsp-section-title {
    background: linear-gradient(90deg, rgba(201,149,42,0.12) 0%, transparent 100%);
    border-left: 3px solid #C9952A;
}
.gsp-section-silver .gsp-section-title {
    background: linear-gradient(90deg, rgba(100,140,190,0.12) 0%, transparent 100%);
    border-left: 3px solid #6A8AAE;
}

/* ============================================================
   TABLE
   ============================================================ */
.gsp-table-wrap { overflow-x: auto; }

.gsp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.gsp-table thead th {
    padding: 0.6rem 1rem;
    text-align: left;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    background: var(--row-even);
    border-bottom: 1px solid var(--border);
}

.gsp-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.12s;
}
.gsp-table tbody tr:nth-child(even) { background: var(--row-even); }
.gsp-table tbody tr:hover           { background: var(--row-hover); }
.gsp-table td {
    padding: 0.58rem 1rem;
    color: var(--text);
    vertical-align: middle;
}
.gsp-table td strong {
/*     font-family: var(--gsp-font-disp); */
    font-size: 0.95rem;
}

/* Highlight rows */
.gsp-highlight-row td { font-weight: 600; }
.gsp-highlight-row td strong { color: #B8861C; }
.gsp-dark .gsp-highlight-row td strong { color: #F0C050; }

.gsp-silver-highlight td strong { color: #4A6A9A; }
.gsp-dark .gsp-silver-highlight td strong { color: #88B0D8; }

.gsp-price-cell { font-variant-numeric: tabular-nums; font-weight: 500; }

/* ---- Purity Badges ---- */
.gsp-purity-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
}
.gsp-badge-gold-pill {
    background: rgba(201,149,42,0.14);
    color: #8B6010;
    border: 1px solid rgba(201,149,42,0.35);
}
.gsp-dark .gsp-badge-gold-pill {
    background: rgba(201,149,42,0.20);
    color: #F0C860;
    border-color: rgba(201,149,42,0.30);
}
.gsp-silver-badge {
    background: rgba(90,130,185,0.12);
    color: #3A608E;
    border: 1px solid rgba(90,130,185,0.30);
}
.gsp-dark .gsp-silver-badge {
    background: rgba(90,130,185,0.20);
    color: #90B8DC;
    border-color: rgba(90,130,185,0.30);
}

/* ============================================================
   FOOTER
   ============================================================ */
.gsp-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem 0.9rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ============================================================
   ERROR
   ============================================================ */
.gsp-error {
    background: #FFF3F3;
    border: 1px solid #FFC0C0;
    color: #C0392B;
    padding: 1rem 1.5rem;
    border-radius: var(--gsp-radius);
    margin: 1rem 0;
    font-family: var(--gsp-font-body);
}

/* ============================================================
   TABBED WRAPPER
   ============================================================ */

/* Remove the outer box-shadow from individual wrappers inside tabs */
.gsp-tabbed-wrapper .gsp-wrapper {
    box-shadow: none;
    border: none;
    margin: 0;
    border-radius: 0 0 var(--gsp-radius) var(--gsp-radius);
}

/* ============================================================
   TAB BAR — pill-style toggle
   All !important used to override WordPress theme button resets
   ============================================================ */
.gsp-tab-bar {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 16px 20px 0 !important;
    background: #FDFCF8 !important;
    border-bottom: none !important;
}
.gsp-dark .gsp-tab-bar {
    background: #131110 !important;
}

/* Outer pill track */
.gsp-tab-pill {
    display: inline-flex !important;
    align-items: center !important;
    background: #E2E6EE !important;
    border-radius: 999px !important;
    padding: 5px !important;
    gap: 3px !important;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.12) !important;
    border: none !important;
    margin: 0 !important;
    list-style: none !important;
}
.gsp-dark .gsp-tab-pill {
    background: #1E2535 !important;
    box-shadow: inset 0 1px 5px rgba(0,0,0,0.40) !important;
}

/* Individual tab buttons — reset EVERYTHING first */
.gsp-tab-btn {
    all: unset !important;           /* nuclear reset — wipes theme styles */
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 9px 24px !important;
    border-radius: 999px !important;
    border: none !important;
    background: transparent !important;
    color: #8A96A8 !important;
/*     font-family: 'DM Sans', sans-serif !important; */
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: background 0.22s, color 0.22s, box-shadow 0.22s !important;
    outline: none !important;
    text-decoration: none !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}
.gsp-dark .gsp-tab-btn {
    color: #5A6A80 !important;
}

/* Dot inside each button */
.gsp-tab-dot {
    display: inline-block !important;
    width: 7px !important;
    height: 7px !important;
    border-radius: 50% !important;
    background: currentColor !important;
    opacity: 0.4 !important;
    flex-shrink: 0 !important;
    transition: opacity 0.22s, background 0.22s !important;
}

/* ── GOLD active ── */
.gsp-tab-btn[data-tab="gold"].gsp-tab-active {
    background: linear-gradient(135deg, #2A1E06 0%, #3D2C08 100%) !important;
    color: #F5D98B !important;
    box-shadow: 0 2px 14px rgba(58,42,8,0.50) !important;
}
.gsp-tab-btn[data-tab="gold"].gsp-tab-active .gsp-tab-dot {
    background: #F5C842 !important;
    opacity: 1 !important;
}

/* ── SILVER active ── */
.gsp-tab-btn[data-tab="silver"].gsp-tab-active {
    background: linear-gradient(135deg, #1C2535 0%, #243044 100%) !important;
    color: #C8D8EC !important;
    box-shadow: 0 2px 14px rgba(28,37,53,0.55) !important;
}
.gsp-tab-btn[data-tab="silver"].gsp-tab-active .gsp-tab-dot {
    background: #90B4D8 !important;
    opacity: 1 !important;
}

/* Hover — inactive only */
.gsp-tab-btn[data-tab="gold"]:not(.gsp-tab-active):hover {
    background: rgba(201,149,42,0.12) !important;
    color: #A87820 !important;
}
.gsp-tab-btn[data-tab="silver"]:not(.gsp-tab-active):hover {
    background: rgba(90,130,185,0.12) !important;
    color: #3A6A9E !important;
}

/* Panel fade-in */
.gsp-tab-panel {
    animation: gspFadeIn 0.25s ease;
}
@keyframes gspFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 560px) {
    .gsp-spot-big       { font-size: 1.4rem; }
    .gsp-header-gold h2,
    .gsp-header-silver h2 { font-size: 1.15rem; }
    .gsp-table thead th,
    .gsp-table td       { padding: 0.45rem 0.6rem; font-size: 0.78rem; }
    .gsp-section        { margin: 0 0.4rem 0.75rem; }
    .gsp-spot-hero      { padding: 1rem; }

    .gsp-tab-btn        { padding: 7px 14px; font-size: 0.65rem; letter-spacing: 0.06em; }
    .gsp-tab-bar        { padding: 10px 12px 0; }
}
