/* =======================
   Simple Chart Container
======================= */
.my-simple-chart-container {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.4s ease-out;
    font-family: Vazir, Tahoma, sans-serif;
}

/* Dark Theme */
.my-simple-chart-container[data-theme="dark"] {
    background: #1a1a1a;
    border-color: #404040;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* =======================
   Chart Area
======================= */
.my-simple-chart {
    position: relative;
    min-height: 300px;
    width: 100%;
}

/* =======================
   Loading State
======================= */
.simple-chart-loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    animation: fadeIn 0.3s ease-in;
}

.my-simple-chart-container[data-theme="dark"] .simple-chart-loading {
    background: rgba(26, 26, 26, 0.9);
}

/* =======================
   Spinner
======================= */
.simple-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: simple-spin 1s linear infinite;
    margin-bottom: 12px;
}

.my-simple-chart-container[data-theme="dark"] .simple-spinner {
    border-color: #404040;
    border-top-color: #3498db;
}

/* =======================
   Loading Text
======================= */
.simple-chart-loading p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.my-simple-chart-container[data-theme="dark"] .simple-chart-loading p {
    color: #bbb;
}

/* =======================
   Animations
======================= */
@keyframes simple-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =======================
   Responsive
======================= */
@media (max-width: 768px) {
    .my-simple-chart {
        min-height: 250px;
    }
}

@media (max-width: 480px) {
    .my-simple-chart {
        min-height: 200px;
    }
}

/* =======================
   Accessibility
======================= */
.my-simple-chart-container:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* ========================== */
/* Toolbar ترسیم نمودار */
/* ========================== */

.my-chart-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;             /* فاصله بین دکمه‌ها */
    margin-bottom: 10px;  /* فاصله از نمودار */
    align-items: center;
}

.my-chart-tools button {
    padding: 5px 10px;
    font-size: 13px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #f0f0f0;
    color: #333;
    transition: background-color 0.2s, color 0.2s;
}

.my-chart-tools button:hover {
    background-color: #2962FF; /* رنگ اصلی نمودار یا دلخواه */
    color: #fff;
}

.my-chart-tools button:active {
    background-color: #0039cb;
}

.my-chart-tools button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(41, 98, 255, 0.4);
}



.my-chart-tools button {
    display: flex;
    align-items: center;
    gap: 4px;       /* فاصله بین آیکن و متن */
    padding: 5px 10px;
    font-size: 13px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #f0f0f0;
    color: #333;
    transition: background-color 0.2s, color 0.2s;
}

.my-chart-tools button:hover {
    background-color: #2962FF;
    color: #fff;
}

.my-chart-tools button i {
    width: 16px;
    height: 16px;
}
