/* Foxco Precious Metals Styles - Luxury Edition */

:root {
    /* Metal-specific colors */
    --gold-primary: #D4AF37;
    --gold-secondary: #FFD700;
    --gold-gradient-start: #C9A961;
    --gold-gradient-end: #F4E4C1;
    --gold-dark: #B8941F;
    
    --silver-primary: #C0C0C0;
    --silver-secondary: #E8E8E8;
    --silver-gradient-start: #A8A8A8;
    --silver-gradient-end: #DCDCDC;
    --silver-dark: #8C8C8C;
    
    --platinum-primary: #E5E4E2;
    --platinum-secondary: #B0B0B0;
    --platinum-gradient-start: #9FA0A3;
    --platinum-gradient-end: #D3D3D3;
    --platinum-dark: #757575;
    
    --palladium-primary: #CED0DD;
    --palladium-secondary: #A6A8B8;
    --palladium-gradient-start: #8B8D9D;
    --palladium-gradient-end: #D8DAE5;
    --palladium-dark: #5F6170;
    
    --rhodium-primary: #B8B8B8;
    --rhodium-secondary: #9E9E9E;
    --rhodium-gradient-start: #7A7A7A;
    --rhodium-gradient-end: #CFCFCF;
    --rhodium-dark: #4A4A4A;
    
    --foxco-positive: #00C853;
    --foxco-negative: #FF1744;
}

/* Single Metal Display - Luxury Card Style */
.foxco-metal-single {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(244, 228, 193, 0.1));
    border-radius: 12px;
    border: 2px solid transparent;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.foxco-metal-single::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-gradient-start), var(--gold-gradient-end));
}

.foxco-metal-single:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Metal-specific single display colors */
.foxco-metal-single[data-metal="gold"]::before {
    background: linear-gradient(90deg, var(--gold-gradient-start), var(--gold-gradient-end));
}
.foxco-metal-single[data-metal="silver"]::before {
    background: linear-gradient(90deg, var(--silver-gradient-start), var(--silver-gradient-end));
}
.foxco-metal-single[data-metal="platinum"]::before {
    background: linear-gradient(90deg, var(--platinum-gradient-start), var(--platinum-gradient-end));
}
.foxco-metal-single[data-metal="palladium"]::before {
    background: linear-gradient(90deg, var(--palladium-gradient-start), var(--palladium-gradient-end));
}
.foxco-metal-single[data-metal="rhodium"]::before {
    background: linear-gradient(90deg, var(--rhodium-gradient-start), var(--rhodium-gradient-end));
}

.foxco-metal-name {
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #2c3338;
    opacity: 0.7;
}

.foxco-metal-value {
    font-weight: 800;
    font-size: 1.5em;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-variant-numeric: tabular-nums;
}

.foxco-metal-change {
    font-size: 0.95em;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    font-variant-numeric: tabular-nums;
}

.foxco-metal-change.positive {
    color: var(--foxco-positive);
    background: rgba(0, 200, 83, 0.1);
}

.foxco-metal-change.negative {
    color: var(--foxco-negative);
    background: rgba(255, 23, 68, 0.1);
}

/* Multiple Metals Table - Luxury Edition */
.foxco-metals-table {
    margin: 20px 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    background: #ffffff;
    position: relative;
}

.foxco-metals-table::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(212, 175, 55, 0.03) 0%, 
        rgba(192, 192, 192, 0.03) 25%,
        rgba(229, 228, 226, 0.03) 50%,
        rgba(206, 208, 221, 0.03) 75%,
        rgba(184, 184, 184, 0.03) 100%
    );
    pointer-events: none;
    z-index: 1;
}

table.foxco-metals {
    width: 100%;
    border-collapse: collapse;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    position: relative;
    z-index: 2;
}

/* Ensure no extra columns from theme */
table.foxco-metals td,
table.foxco-metals th {
    box-sizing: border-box;
}

table.foxco-metals col,
table.foxco-metals colgroup {
    display: none !important;
}

table.foxco-metals thead {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    position: relative;
}

table.foxco-metals thead th {
    padding: 20px 24px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

table.foxco-metals thead th:not(:first-child) {
    text-align: right;
}

table.foxco-metals tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

table.foxco-metals tbody tr:last-child {
    border-bottom: none;
}

table.foxco-metals tbody tr:hover {
    transform: translateX(4px);
}

/* Metal-specific hover backgrounds */
table.foxco-metals tbody tr[data-metal="gold"]:hover {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.08), transparent);
}
table.foxco-metals tbody tr[data-metal="silver"]:hover {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.08), transparent);
}
table.foxco-metals tbody tr[data-metal="platinum"]:hover {
    background: linear-gradient(90deg, rgba(229, 228, 226, 0.08), transparent);
}
table.foxco-metals tbody tr[data-metal="palladium"]:hover {
    background: linear-gradient(90deg, rgba(206, 208, 221, 0.08), transparent);
}
table.foxco-metals tbody tr[data-metal="rhodium"]:hover {
    background: linear-gradient(90deg, rgba(184, 184, 184, 0.08), transparent);
}

table.foxco-metals tbody td {
    padding: 18px 24px;
    font-size: 15px;
}

table.foxco-metals tbody td:not(:first-child) {
    text-align: right;
}

table.foxco-metals .metal-name {
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.5px;
    position: relative;
}

table.foxco-metals .metal-name a {
    text-decoration: none;
    transition: opacity 0.2s ease;
}

table.foxco-metals .metal-name a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Metal-specific name colors with gradients */
table.foxco-metals tr[data-metal="gold"] .metal-name,
table.foxco-metals tr[data-metal="gold"] .metal-name a {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
table.foxco-metals tr[data-metal="silver"] .metal-name,
table.foxco-metals tr[data-metal="silver"] .metal-name a {
    background: linear-gradient(135deg, var(--silver-dark), var(--silver-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
table.foxco-metals tr[data-metal="platinum"] .metal-name,
table.foxco-metals tr[data-metal="platinum"] .metal-name a {
    background: linear-gradient(135deg, var(--platinum-dark), var(--platinum-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
table.foxco-metals tr[data-metal="palladium"] .metal-name,
table.foxco-metals tr[data-metal="palladium"] .metal-name a {
    background: linear-gradient(135deg, var(--palladium-dark), var(--palladium-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
table.foxco-metals tr[data-metal="rhodium"] .metal-name,
table.foxco-metals tr[data-metal="rhodium"] .metal-name a {
    background: linear-gradient(135deg, var(--rhodium-dark), var(--rhodium-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

table.foxco-metals .metal-price,
table.foxco-metals .metal-bid,
table.foxco-metals .metal-ask {
    font-weight: 700;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    color: #1a1a1a;
    font-size: 17px;
    font-variant-numeric: tabular-nums;
}

table.foxco-metals .metal-change {
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 14px;
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

table.foxco-metals .metal-change.positive {
    color: var(--foxco-positive);
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.15), rgba(0, 200, 83, 0.05));
    box-shadow: 0 2px 8px rgba(0, 200, 83, 0.15);
}

table.foxco-metals .metal-change.positive::before {
    content: '▲ ';
    font-size: 0.8em;
    opacity: 0.9;
}

table.foxco-metals .metal-change.negative {
    color: var(--foxco-negative);
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.15), rgba(255, 23, 68, 0.05));
    box-shadow: 0 2px 8px rgba(255, 23, 68, 0.15);
}

table.foxco-metals .metal-change.negative::before {
    content: '▼ ';
    font-size: 0.8em;
    opacity: 0.9;
}

.foxco-metals-footer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 14px 24px;
    font-size: 12px;
    color: #6c757d;
    text-align: right;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Error Display */
.foxco-metal-error {
    color: var(--foxco-negative);
    font-weight: 600;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.1), rgba(255, 23, 68, 0.05));
    border-left: 4px solid var(--foxco-negative);
    border-radius: 8px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(255, 23, 68, 0.1);
}

/* Shimmer effect for loading state */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.foxco-metals-loading {
    animation: shimmer 2s infinite;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.8) 50%, 
        rgba(255,255,255,0) 100%
    );
    background-size: 1000px 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    table.foxco-metals {
        font-size: 13px;
    }
    
    table.foxco-metals thead th,
    table.foxco-metals tbody td {
        padding: 14px 16px;
    }
    
    table.foxco-metals .metal-name {
        font-size: 15px;
    }
    
    table.foxco-metals .metal-price,
    table.foxco-metals .metal-bid,
    table.foxco-metals .metal-ask {
        font-size: 15px;
    }
    
    .foxco-metals-footer {
        text-align: center;
    }
    
    .foxco-metal-single {
        padding: 12px 18px;
    }
    
    /* Mobile column visibility controls */
    
    /* When showing only ASK price on mobile */
    .mobile-price-ask table.foxco-metals thead th:nth-child(2),
    .mobile-price-ask table.foxco-metals tbody td.metal-bid {
        display: none !important;
    }
    
    /* When showing only BID price on mobile */
    .mobile-price-bid table.foxco-metals thead th:nth-child(3),
    .mobile-price-bid table.foxco-metals tbody td.metal-ask {
        display: none !important;
    }
    
    /* Hide change percentage column on mobile when enabled */
    .mobile-hide-change table.foxco-metals thead th:last-child,
    .mobile-hide-change table.foxco-metals tbody td.metal-change {
        display: none !important;
    }
}

@media (max-width: 480px) {
    table.foxco-metals {
        font-size: 12px;
    }
    
    table.foxco-metals thead th,
    table.foxco-metals tbody td {
        padding: 12px 14px;
    }
    
    table.foxco-metals thead th {
        font-size: 10px;
    }
    
    table.foxco-metals .metal-name {
        font-size: 14px;
    }
    
    table.foxco-metals .metal-price,
    table.foxco-metals .metal-bid,
    table.foxco-metals .metal-ask {
        font-size: 14px;
    }
    
    table.foxco-metals .metal-change {
        font-size: 12px;
        padding: 4px 10px;
    }
}

/* Elementor Widget Specific */
.elementor-widget-foxco-metals .foxco-metals-table {
    margin: 0;
}

/* Print styles */
@media print {
    .foxco-metals-table {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    table.foxco-metals tbody tr:hover {
        transform: none;
        background: none !important;
    }
}
