/* ════════════════════════════════════════════════════════════════════════
 * Gold Price Live — Frontend Styles (Optimized for Performance)
 * ════════════════════════════════════════════════════════════════════════ */

/* Top Bar Styles */
.gpl-topbar {
    background-color: #0f172a;
    border-bottom: 2px solid #d97706;
    color: #f59e0b;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 700;
    direction: rtl;
}

.gpl-topbar-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gpl-topbar-label {
    color: #f8fafc;
    font-weight: normal;
}

/* Product Price Styles */
.gpl-price {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35em;
    font-weight: 900;
    line-height: 1.5;
    position: relative;
    direction: ltr;
    text-align: right;
}

.gpl-price .gpl-amount {
    font-size: 1.25em;
    color: #0f172a;
    letter-spacing: 0.02em;
}

.gpl-price .gpl-suffix {
    font-size: 0.85em;
    color: #64748b;
    font-weight: 700;
}

.gpl-price.gpl-up   .gpl-amount { color: #15803d; }
.gpl-price.gpl-down .gpl-amount { color: #b91c1c; }

/* Arrow - Static (No transitions to prevent repaints) */
.gpl-arrow {
    display: none;
    width: 0.9em; height: 0.9em;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.gpl-price.gpl-up .gpl-arrow.gpl-trend-up {
    display: inline-block;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 20 L12 8 M12 8 L6 14 M12 8 L18 14' stroke='%2316a34a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' fill='none'/><circle cx='12' cy='4' r='1.6' fill='%2316a34a'/></svg>");
}

.gpl-price.gpl-down .gpl-arrow.gpl-trend-down {
    display: inline-block;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 4 L12 16 M12 16 L6 10 M12 16 L18 10' stroke='%23dc2626' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' fill='none'/><circle cx='12' cy='20' r='1.6' fill='%23dc2626'/></svg>");
}

/* Meta line (weight + per-gram rate) */
.gpl-meta {
    display: block;
    width: 100%;
    font-size: 0.78em;
    font-weight: normal;
    color: #64748b;
    margin-top: 4px;
    direction: rtl;
    text-align: right;
}

.gpl-meta .gpl-weight, .gpl-meta .gpl-gold-rate {
    color: #475569;
    font-weight: 700;
}

/* Breakdown lines */
.gpl-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em 1em;
    width: 100%;
    font-size: 0.75em;
    font-weight: normal;
    color: #64748b;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #e2e8f0;
    direction: rtl;
}

.gpl-breakdown .gpl-line {
    display: inline-block;
}

.gpl-breakdown b {
    color: #1e293b;
    font-weight: 900;
    margin-right: 4px;
}

/* Pending state */
.gpl-pending .gpl-amount {
    color: #94a3b8;
    font-size: 0.9em;
    font-weight: 600;
}

/* Shop loop styling */
.woocommerce ul.products li.product .gpl-price {
    font-size: 0.95em;
}

.woocommerce ul.products li.product .gpl-meta,
.woocommerce ul.products li.product .gpl-breakdown {
    font-size: 0.7em;
}

/* Cart page */
.woocommerce-cart .gpl-price .gpl-meta,
.woocommerce-cart .gpl-price .gpl-breakdown,
.woocommerce-checkout .gpl-price .gpl-meta,
.woocommerce-checkout .gpl-price .gpl-breakdown {
    display: none;
}