/* Gold Price Widget CSS
 * Matches the design in the provided images
 */

/* RTL Support */
.gold-price-container,
.gold-chart-container {
    direction: rtl;
    text-align: right;
    /* font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif; */
}

/* Main container */
.gold-price-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    color: #fff;
}

/* Title styles - more aggressive override */
html body .gold-price-container .gold-price-title,
html body .gold-price-title,
.gold-price-title {
    text-align: center !important;
    font-size: 28px !important;
    font-weight: 600 !important;
    margin-bottom: 5px !important;
    color: #ffffff !important;
}

/* Date display */
.gold-price-date {
    text-align: center;
    font-size: 16px;
    color: #ccc;
    margin-bottom: 5px;
}

/* Update time display */
.gold-price-update-time {
    text-align: center;
    font-size: 14px;
    color: #aaa;
    margin-bottom: 25px;
}

/* Card container */
.gold-price-cards {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

/* Individual price card */
.gold-price-card {
    flex: 1;
    min-width: 200px;
    background-color: #1c2637;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #2c3647;
}

/* Gold karat title */
.gold-karat {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #fff;
}

/* Gold price display */
.gold-price {
    font-size: 24px;
    font-weight: 700;
    color: #daa520;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* Currency text */
.currency-text {
    font-size: 14px;
    color: #daa520;
    font-weight: normal;
    margin-left: 5px;
}

/* Price change indicator */
.gold-price-change {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: 500;
    margin-bottom: 10px;
}

.gold-price-change.positive {
    background-color: rgba(0, 128, 0, 0.1);
    color: #00cc00;
}

.gold-price-change.negative {
    background-color: rgba(255, 0, 0, 0.1);
    color: #ff3333;
}

.arrow {
    display: inline-block;
    margin-right: 3px;
}

/* Price description */
.gold-price-description {
    font-size: 14px;
    color: #aaa;
}

/* Chart container */
.gold-chart-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background-color: #1c2637;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: #fff;
    max-height: 800px;
    overflow: hidden;
}

/* Chart title - more aggressive override */
html body .gold-chart-container .gold-chart-title,
html body .gold-chart-title,
.gold-chart-title {
    text-align: center !important;
    font-size: 22px !important;
    font-weight: 600 !important;
    margin-bottom: 5px !important;
    color: #ffffff !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #2c3647 !important;
}

/* Chart update time display */
.gold-chart-update-time {
    text-align: center;
    font-size: 14px;
    color: #aaa;
    margin-bottom: 20px;
}

/* Filter buttons container */
.gold-chart-filters {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

/* Metal filter buttons */
.gold-chart-metal-filter button,
.gold-chart-time-filter button {
    background-color: transparent;
    border: none;
    color: #aaa;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.gold-chart-metal-filter button.active,
.gold-chart-time-filter button.active {
    background-color: #daa520;
    color: #1c2637;
    font-weight: 500;
}

/* Chart legend */
.gold-chart-legend {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.gold-chart-legend-item {
    display: flex;
    align-items: center;
    margin: 0 10px;
}

.gold-legend-color {
    display: block;
    width: 15px;
    height: 8px;
    background-color: #daa520;
    margin-left: 5px;
}

.gold-legend-label {
    font-size: 14px;
    color: #aaa;
}

/* Chart canvas */
#goldPriceChart {
    margin-top: 20px;
    width: 100%;
    max-height: 400px;
    height: auto;
}

/* Responsive styles */
@media (max-width: 768px) {
    .gold-price-cards {
        flex-direction: column;
    }

    .gold-chart-filters {
        flex-direction: column;
        gap: 10px;
    }

    .gold-chart-metal-filter,
    .gold-chart-time-filter {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 5px;
    }
}