.ipc-products-wrapper {
    width: 100%;
    overflow-x: auto;
}

.ipc-products-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.ipc-products-table th,
.ipc-products-table td {
    border: 1px solid #ddd;
    padding: 10px 12px;
    text-align: right;
    vertical-align: middle;
}

.ipc-products-table th {
    background: #f7f7f7;
}

.ipc-show-chart {
    cursor: pointer;
    border: none;
    background: #2b7cff;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
}

.ipc-show-chart:hover {
    background: #1e66d6;
}

.ipc-error {
    padding: 12px 15px;
    background: #ffecec;
    border: 1px solid #f5b5b5;
    color: #a33;
    border-radius: 8px;
    margin: 10px 0;
}

.ipc-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 99999;
}

.ipc-modal.is-open {
    display: block;
}

.ipc-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.ipc-modal-content {
    position: relative;
    width: min(960px, calc(100% - 30px));
    max-height: calc(100vh - 40px);
    margin: 20px auto;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.ipc-modal-close {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #f2f2f2;
    color: #333;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.ipc-modal-close:hover {
    background: #e5e5e5;
}

.ipc-modal-body {
    padding: 55px 20px 20px;
    overflow: auto;
}

.ipc-chart-box {
    width: 100%;
}

.ipc-chart-title {
    margin: 0 0 20px;
    font-size: 20px;
    line-height: 1.6;
}

.ipc-chart-canvas-wrap {
    position: relative;
    width: 100%;
    height: 420px;
}

#ironChart {
    width: 100% !important;
    height: 100% !important;
}

.ipc-loading {
    padding: 30px;
    text-align: center;
    color: #666;
}

body.ipc-modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .ipc-modal-content {
        width: calc(100% - 16px);
        margin: 8px auto;
        max-height: calc(100vh - 16px);
        border-radius: 10px;
    }

    .ipc-modal-body {
        padding: 50px 12px 12px;
    }

    .ipc-chart-canvas-wrap {
        height: 300px;
    }
}



/* ===========================
    Responsive (Mobile)
   =========================== */
@media (max-width: 600px) {

    .ipc-products-table th,
    .ipc-products-table td {
        padding: 8px !important;
        font-size: 13px;
    }

    .ipc-products-table h2 {
        font-size: 16px !important;
    }

    /* کوچک‌سازی دکمه */
    .ipc-show-chart {
        padding: 5px 8px !important;
        font-size: 12px !important;
        border-radius: 6px !important;
    }

    /* کوچک‌سازی المان تغییرات */
    .ipc-change {
        padding: 4px 6px !important;
        font-size: 12px !important;
        gap: 4px !important;
        border-radius: 8px !important;
    }

    /* متن تغییرات */
    .ipc-change .ipc-change-percent {
        font-size: 11px !important;
    }

    /* جلوگیری از اسکرول افقی */
    .ipc-products-wrapper {
        overflow-x: hidden !important;
    }

    /* فشرده‌سازی ستون‌ها */
    .ipc-products-table td:nth-child(1) { /* نام محصول */
        max-width: 100px;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.4;
    }

    .ipc-products-table td:nth-child(4) { /* آخرین بروزرسانی */
        font-size: 11px !important;
    }

    /* دکمه تمام عرض برای استفاده راحت‌تر در موبایل */
    .ipc-show-chart {
        width: 100%;
        text-align: center;
    }
}



