﻿/* --- تنسيقات Widget الأسهم الجديد --- */
.stock-widget {
    background-color: #24245c; /* لون الخلفية الكحلي */
    color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    font-family: 'Tajawal', sans-serif; /* استخدام نفس خط القالب */
    direction: rtl;
    text-align: right;
    display: flex;
    justify-content: space-between;
    border: 1px solid #3a3a7a;
    max-width: 650px; /* عرض مناسب للـ Widget */
    margin-left: auto; /* محاذاة لليسار في الشاشات الكبيرة */
}

/* القسم الأيمن: البيانات */
.widget-info {
    flex: 1;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.widget-company-name {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

    .widget-company-name span {
        display: block;
        font-size: 24px;
        font-weight: 900;
    }

.widget-price-box {
    margin: 15px 0;
}

.widget-price-value {
    font-size: 48px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 5px;
}

.widget-label {
    font-size: 14px;
    color: #d0d0d0;
    margin-bottom: 5px;
}

.widget-change-tag {
    background-color: #2da83a; /* اللون الأخضر */
    color: #fff;
    padding: 5px 15px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 18px;
    display: inline-flex;
    justify-content: space-between;
    min-width: 150px;
}

.widget-volume-value {
    font-size: 22px;
    font-weight: 700;
}

/* خط فاصل عمودي */
.widget-divider {
    width: 1px;
    background-color: #4a4a8a;
    margin: 0 10px;
}

/* القسم الأيسر: الرسم البياني */
.widget-chart-section {
    flex: 1.5;
    position: relative;
    padding-right: 20px;
    display: flex;
    flex-direction: column;
}

.chart-container {
    height: 150px;
    border: 1px solid #5a5a9a;
    position: relative;
    background: linear-gradient(to right, transparent 19px, #5a5a9a 20px), linear-gradient(to bottom, transparent 19px, #5a5a9a 20px);
    background-size: 20% 100%, 100% 33.3%; /* شبكة خلفية */
    margin: 10px 0 25px 0; /* مساحة للمحاور */
}

.chart-y-axis {
    position: absolute;
    left: -35px;
    top: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 12px;
    color: #d0d0d0;
    direction: ltr;
}

.chart-x-axis {
    position: absolute;
    bottom: -20px;
    left: 0;
    font-size: 12px;
    color: #d0d0d0;
    direction: ltr;
}

.chart-svg {
    width: 100%;
    height: 100%;
}

.chart-line-path {
    fill: none;
    stroke: #ffffff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.widget-footer {
    margin-top: auto;
    font-size: 11px;
    color: #a0a0c0;
    text-align: right;
}

.widget-date {
    direction: ltr;
    display: inline-block;
}

/* تجاوب للشاشات الصغيرة */
@media (max-width: 768px) {
    .stock-widget {
        flex-direction: column;
        max-width: 100%;
    }

    .widget-info {
        padding-left: 0;
        padding-bottom: 20px;
        border-bottom: 1px solid #4a4a8a;
    }

    .widget-divider {
        display: none;
    }

    .widget-chart-section {
        padding-right: 0;
        padding-top: 20px;
    }
}
/* --- نهاية تنسيقات Widget الأسهم --- */
