/* BTMC Gold Price Plugin Styles */

.btmc-gold-price-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 100%;
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.btmc-title {
    background: linear-gradient(135deg, #d4a00b 0%, #f5d442 100%);
    color: #fff;
    margin: 0;
    padding: 15px 20px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.btmc-price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.btmc-price-table thead {
    background: #f8f9fa;
}

.btmc-price-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
    font-size: 13px;
    text-transform: uppercase;
}

.btmc-price-table th:nth-child(3),
.btmc-price-table th:nth-child(4) {
    text-align: right;
}

.btmc-price-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.btmc-price-table tbody tr:hover {
    background-color: #f8f9fa;
}

.btmc-price-table tbody tr:last-child {
    border-bottom: none;
}

.btmc-price-table td {
    padding: 12px 15px;
    vertical-align: middle;
}

.btmc-name {
    font-weight: 500;
    color: #333;
    max-width: 200px;
}

.btmc-purity {
    color: #666;
    font-size: 12px;
}

.btmc-buy,
.btmc-sell {
    text-align: right;
    font-weight: 600;
    font-family: "Roboto Mono", monospace;
}

.btmc-buy {
    color: #28a745;
}

.btmc-sell {
    color: #dc3545;
}

.btmc-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    font-size: 12px;
    gap: 10px;
}

.btmc-update-time {
    color: #666;
}

.btmc-refresh-btn {
    background: #d4a00b;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btmc-refresh-btn:hover {
    background: #b8890a;
}

.btmc-refresh-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btmc-refresh-icon {
    display: inline-block;
}

.btmc-refresh-icon.spinning {
    animation: btmc-spin 1s linear infinite;
}

@keyframes btmc-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.btmc-source {
    color: #999;
}

.btmc-source a {
    color: #d4a00b;
    text-decoration: none;
}

.btmc-source a:hover {
    text-decoration: underline;
}

.btmc-error {
    padding: 20px;
    text-align: center;
    color: #dc3545;
}

.btmc-error p {
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .btmc-price-table {
        font-size: 12px;
    }
    
    .btmc-price-table th,
    .btmc-price-table td {
        padding: 10px 8px;
    }
    
    .btmc-name {
        max-width: 120px;
        font-size: 11px;
    }
    
    .btmc-footer {
        flex-direction: column;
        text-align: center;
    }
}

/* Compact mode for sidebar */
.widget .btmc-gold-price-wrapper {
    margin: 0;
    box-shadow: none;
}

.widget .btmc-price-table {
    font-size: 11px;
}

.widget .btmc-price-table th,
.widget .btmc-price-table td {
    padding: 8px 6px;
}

.widget .btmc-name {
    max-width: 100px;
}

.widget .btmc-footer {
    flex-direction: column;
    gap: 8px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .btmc-gold-price-wrapper {
        background: #1e1e1e;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
    
    .btmc-price-table thead {
        background: #2d2d2d;
    }
    
    .btmc-price-table th {
        color: #e0e0e0;
        border-bottom-color: #3d3d3d;
    }
    
    .btmc-price-table tbody tr {
        border-bottom-color: #3d3d3d;
    }
    
    .btmc-price-table tbody tr:hover {
        background-color: #2d2d2d;
    }
    
    .btmc-name {
        color: #e0e0e0;
    }
    
    .btmc-purity {
        color: #999;
    }
    
    .btmc-footer {
        background: #2d2d2d;
        border-top-color: #3d3d3d;
    }
    
    .btmc-update-time {
        color: #999;
    }
}
