/**
 * JewelPulse Public Styles — Luxury theme
 * Designed to blend with any jewelry WooCommerce theme.
 */

:root {
    --jp-gold: #D4AF37;
    --jp-gold-light: #E8D48B;
    --jp-dark: #1A1A2E;
}

/* =================== Product Badge =================== */

.jewelpulse-badge-product {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.95));
    border-radius: 30px;
    border: 1px solid var(--badge-color, var(--jp-gold));
    font-size: 12px;
    line-height: 1;
}

.jewelpulse-badge-product__metal {
    color: var(--badge-color, var(--jp-gold));
    font-weight: 700;
}

.jewelpulse-badge-product__weight {
    color: rgba(255, 255, 255, 0.7);
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.jewelpulse-badge-product__live {
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 4px;
}

.jewelpulse-badge-product__live::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #4ADE80;
    border-radius: 50%;
    animation: jp-pulse 2s infinite;
}

@keyframes jp-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Loop badge (shop page) */
.jewelpulse-badge-loop {
    display: inline-block;
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--badge-color, var(--jp-gold));
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.9), rgba(22, 33, 62, 0.9));
    border-radius: 4px;
    border: 1px solid var(--badge-color, var(--jp-gold));
    margin-top: 6px;
}

/* =================== Price Update Notice =================== */

.jewelpulse-update-notice {
    font-size: 11px;
    color: #888;
    margin: -8px 0 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.jewelpulse-update-notice::before {
    content: '⏱';
    font-size: 13px;
}

/* =================== Price Breakdown =================== */

.jewelpulse-breakdown {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #faf8f0, #f5f0e6);
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.15);
}

.jewelpulse-breakdown__title {
    margin: 0 0 12px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8B7D3C;
}

.jewelpulse-breakdown__items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jewelpulse-breakdown__item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.jewelpulse-breakdown__item:last-child {
    border-bottom: none;
}

.jewelpulse-breakdown__item span:first-child {
    color: #555;
}

.jewelpulse-breakdown__item span:last-child {
    font-weight: 600;
    color: #333;
}

/* =================== Ticker =================== */

.jewelpulse-ticker {
    overflow: hidden;
    padding: 10px 0;
    position: relative;
}

.jewelpulse-ticker--dark {
    background: linear-gradient(135deg, #0D0D14, #1A1A2E);
    color: #E8E8F0;
}

.jewelpulse-ticker--light {
    background: #faf8f0;
    color: #333;
}

.jewelpulse-ticker--gold {
    background: linear-gradient(135deg, #2C2416, #3D3018);
    color: #E8D48B;
}

.jewelpulse-ticker__track {
    display: flex;
    gap: 48px;
    animation: jp-ticker-scroll 20s linear infinite;
    white-space: nowrap;
}

.jewelpulse-ticker:hover .jewelpulse-ticker__track {
    animation-play-state: paused;
}

.jewelpulse-ticker__item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.jewelpulse-ticker__metal {
    font-weight: 800;
    font-size: 14px;
}

.jewelpulse-ticker__name {
    font-size: 12px;
    opacity: 0.6;
}

.jewelpulse-ticker__price {
    font-weight: 600;
    font-size: 13px;
}

@keyframes jp-ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* =================== Price Table =================== */

.jewelpulse-table {
    overflow-x: auto;
}

.jewelpulse-table--luxury {
    border-radius: 12px;
    overflow: hidden;
}

.jewelpulse-table--luxury table {
    width: 100%;
    border-collapse: collapse;
    background: linear-gradient(135deg, #faf8f0, #f5f0e6);
}

.jewelpulse-table--luxury thead {
    background: linear-gradient(135deg, #1A1A2E, #16213E);
}

.jewelpulse-table--luxury th {
    padding: 14px 20px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--jp-gold);
    text-align: left;
    font-weight: 600;
}

.jewelpulse-table--luxury td {
    padding: 14px 20px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid rgba(212, 175, 55, 0.08);
}

.jewelpulse-table--luxury .jewelpulse-metal-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.jewelpulse-table--luxury .jewelpulse-price-cell {
    font-weight: 700;
    color: #1A1A2E;
    font-variant-numeric: tabular-nums;
}

.jewelpulse-table--luxury .jewelpulse-date-cell {
    font-size: 12px;
    color: #888;
}

/* =================== Calculator =================== */

.jewelpulse-calculator {
    max-width: 480px;
    margin: 0 auto;
    padding: 32px;
    border-radius: 16px;
}

.jewelpulse-calculator--luxury {
    background: linear-gradient(145deg, #1A1A2E, #0D0D14);
    border: 1px solid rgba(212, 175, 55, 0.15);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
}

.jewelpulse-calculator__title {
    margin: 0 0 24px;
    font-size: 18px;
    color: var(--jp-gold);
    text-align: center;
    font-weight: 600;
}

.jewelpulse-calculator__fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.jewelpulse-calculator__field label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8888A0;
    margin-bottom: 6px;
}

.jewelpulse-calculator__field select,
.jewelpulse-calculator__field input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #E8E8F0;
    font-size: 15px;
    transition: all 0.3s ease;
}

.jewelpulse-calculator__field select:focus,
.jewelpulse-calculator__field input:focus {
    outline: none;
    border-color: var(--jp-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.jewelpulse-calculator__field select option {
    background: #1A1A2E;
    color: #E8E8F0;
}

.jewelpulse-calculator__result {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.02));
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.15);
}

.jewelpulse-calculator__label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8888A0;
    margin-bottom: 8px;
}

.jewelpulse-calculator__price {
    font-size: 36px;
    font-weight: 700;
    color: var(--jp-gold);
    letter-spacing: -1px;
}

/* =================== No Data =================== */

.jewelpulse-no-data {
    color: #999;
    font-style: italic;
    font-size: 12px;
}

/* =================== Responsive =================== */

@media (max-width: 600px) {
    .jewelpulse-calculator {
        padding: 24px 20px;
    }

    .jewelpulse-calculator__price {
        font-size: 28px;
    }

    .jewelpulse-badge-product {
        flex-wrap: wrap;
    }
}
