/* ==========================================
   Financial Widgets - Dark Theme Styling
   Based on provided screenshots
   ========================================== */

.widget {
    margin-bottom: 2rem;
}

/* Common Widget Styles */
.currencies-widget,
.commodities-widget {
    background: #000;
    color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Widget Header */
.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.widget-header span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-arrow {
    font-size: 1.2rem;
}

/* Column Headers (VALUE, CHANGE%) */
.widget-columns {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #222;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
}

.widget-columns .col-1 {
    text-align: left;
}

.widget-columns .col-2,
.widget-columns .col-3 {
    text-align: right;
    min-width: 100px;
}

/* Widget Item Row */
.widget-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #222;
    align-items: center;
}

.widget-item:last-child {
    border-bottom: none;
}

/* Item Name and Time */
.item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.item-name {
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.live-indicator {
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.item-time {
    color: #888;
    font-size: 0.8rem;
}

/* Item Value */
.item-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    text-align: right;
    min-width: 100px;
}

/* Item Change */
.item-change {
    text-align: right;
    min-width: 100px;
    font-weight: 600;
}

.item-change.positive {
    color: #00ff00;
}

.item-change.negative {
    color: #ff0000;
}

.change-value {
    display: block;
    font-size: 1rem;
}

.change-percent {
    display: block;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {

    .currencies-widget,
    .commodities-widget {
        padding: 1.25rem;
    }
}

@media (max-width: 768px) {
    .widget-item {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1.25rem 0;
    }

    .widget-columns {
        display: none;
    }

    .item-value,
    .item-change {
        text-align: left;
    }

    .item-info {
        border-bottom: 1px solid #333;
        padding-bottom: 0.5rem;
    }

    .item-value {
        padding: 0.25rem 0;
    }
}

@media (max-width: 480px) {

    .currencies-widget,
    .commodities-widget {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .widget-header {
        font-size: 1rem;
    }

    .item-name {
        font-size: 0.95rem;
    }

    .item-value {
        font-size: 1rem;
    }
}