/* Metal Pricing Frontend Styles */

.metal-info {
    display: inline-block;
    margin-left: 8px;
    color: #666;
    font-size: 0.9em;
    font-weight: normal;
}

.dmp-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #46b450;
    margin-top: 5px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.dmp-metal-details {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.dmp-metal-details h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.dmp-metal-details table {
    width: 100%;
    border-collapse: collapse;
}

.dmp-metal-details table tr {
    border-bottom: 1px solid #eee;
}

.dmp-metal-details table tr:last-child {
    border-bottom: none;
}

.dmp-metal-details table td {
    padding: 10px 5px;
    font-size: 14px;
}

.dmp-metal-details table td:first-child {
    font-weight: 600;
    color: #555;
    width: 40%;
}

.dmp-metal-details table td:last-child {
    color: #333;
}

.dmp-metal-details small {
    display: block;
    margin-top: 10px;
    padding-top: 10px;
    color: #999;
    font-size: 12px;
    line-height: 1.4;
}

/* Price badge styling */
.product .price {
    position: relative;
}

.product .price .woocommerce-Price-amount {
    font-weight: 700;
    color: #2c3e50;
}

/* Metal type badge */
.metal-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 10px;
}

.metal-badge.gold {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: #fff;
}

.metal-badge.silver {
    background: linear-gradient(135deg, #d7dde8 0%, #c5cae9 100%);
    color: #333;
}

.metal-badge.platinum {
    background: linear-gradient(135deg, #868f96 0%, #596164 100%);
    color: #fff;
}

/* Pricing breakdown accordion (optional) */
.dmp-pricing-breakdown {
    margin-top: 15px;
    cursor: pointer;
    color: #0073aa;
    font-size: 13px;
    text-decoration: underline;
}

.dmp-pricing-breakdown:hover {
    color: #005177;
}

/* Mobile responsive */
@media screen and (max-width: 768px) {
    .dmp-metal-details {
        padding: 15px;
    }
    
    .dmp-metal-details table td {
        display: block;
        width: 100%;
        padding: 5px;
    }
    
    .dmp-metal-details table td:first-child {
        font-weight: 700;
        padding-bottom: 2px;
    }
    
    .dmp-metal-details table td:last-child {
        padding-top: 2px;
        padding-bottom: 10px;
    }
    
    .metal-info {
        display: block;
        margin-left: 0;
        margin-top: 5px;
    }
}

/* Loading state */
.dmp-price-loading {
    opacity: 0.6;
    pointer-events: none;
}

.dmp-price-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Shop page adjustments */
.woocommerce ul.products li.product .price .metal-info {
    display: block;
    margin: 5px 0 0 0;
    font-size: 0.85em;
}