/* MIP-006R-09G — Local Indices Mobile UX Enhancement */
.mip-local-data-divider {
    margin: 48px 0 22px;
    padding: 22px 24px;
    border-inline-start: 5px solid #008e53;
    border-radius: 14px;
    background: linear-gradient(135deg, #eef8f3 0%, #ffffff 100%);
    box-shadow: 0 8px 24px rgba(16, 66, 48, .08);
}
.mip-local-data-divider span {
    display: block;
    margin-bottom: 5px;
    color: #008e53;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.mip-local-data-divider h3 { margin: 0 0 6px; color: #0b4635; font-size: 22px; }
.mip-local-data-divider p { margin: 0; color: #5f6f68; font-size: 13px; }

@media (max-width: 700px) {
    /* Make every generated table row a readable mobile data card. */
    #detailTables .mip-table-scroll {
        overflow: visible !important;
        border: 0 !important;
        background: transparent !important;
    }
    #detailTables .mip-market-table,
    #detailTables .mip-market-table tbody,
    #detailTables .mip-market-table tr,
    #detailTables .mip-market-table td {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }
    #detailTables .mip-market-table { border-collapse: separate !important; border-spacing: 0 10px !important; }
    #detailTables .mip-market-table thead { display: none !important; }
    #detailTables .mip-market-table tbody tr {
        margin: 0 0 12px !important;
        padding: 12px 14px !important;
        border: 1px solid #d8e4de !important;
        border-radius: 12px !important;
        background: #fff !important;
        box-shadow: 0 3px 12px rgba(16, 66, 48, .06) !important;
        overflow: hidden !important;
    }
    #detailTables .mip-market-table tbody td {
        display: grid !important;
        grid-template-columns: minmax(105px, 38%) minmax(0, 1fr) !important;
        align-items: start !important;
        gap: 12px !important;
        padding: 8px 0 !important;
        border: 0 !important;
        border-bottom: 1px solid #edf1ef !important;
        background: transparent !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        font-size: 14px !important;
        line-height: 1.35 !important;
        text-align: end !important;
    }
    #detailTables .mip-market-table tbody td:last-child { border-bottom: 0 !important; }
    #detailTables .mip-market-table tbody td::before {
        content: attr(data-label);
        color: #66756f;
        font-size: 11px;
        font-weight: 800;
        letter-spacing: .035em;
        text-transform: uppercase;
        text-align: start;
    }
    #detailTables .mip-market-table tbody td:first-child {
        display: block !important;
        padding: 0 0 11px !important;
        margin-bottom: 4px !important;
        border-bottom: 2px solid #e4eee9 !important;
        color: #102a22 !important;
        font-size: 16px !important;
        font-weight: 800 !important;
        text-align: start !important;
        position: static !important;
    }
    #detailTables .mip-market-table tbody td:first-child::before { display: none !important; }
    #detailTables .mip-market-table td.mip-positive { color: #007a43 !important; font-weight: 850 !important; }
    #detailTables .mip-market-table td.mip-negative { color: #c21d14 !important; font-weight: 850 !important; }

    /* Override any earlier mobile rule that hides columns. */
    #detailTables .mip-market-table th,
    #detailTables .mip-market-table td,
    #detailTables .mip-market-table th:nth-child(n),
    #detailTables .mip-market-table td:nth-child(n) {
        visibility: visible !important;
        opacity: 1 !important;
    }

    .mip-table-pair-row { display: block !important; }
    .mip-table-pair-row .mip-table-section { margin-bottom: 24px !important; }
    .mip-table-section-header { gap: 10px !important; }
    .mip-local-data-divider { margin-top: 42px; padding: 18px; }
    .mip-local-data-divider h3 { font-size: 20px; }
}

html[dir="rtl"] .mip-local-data-divider { text-align: right; }
@media (max-width: 700px) {
    html[dir="rtl"] #detailTables .mip-market-table tbody td {
        grid-template-columns: minmax(0, 1fr) minmax(105px, 38%) !important;
        text-align: start !important;
    }
    html[dir="rtl"] #detailTables .mip-market-table tbody td::before { grid-column: 2; text-align: right; }
    html[dir="rtl"] #detailTables .mip-market-table tbody td:first-child { text-align: right !important; }
}

@media print {
    .mip-local-data-divider { break-after: avoid; page-break-after: avoid; box-shadow: none; }
}

/* MIP-006R-09G-HF1 — separate Kuwait Market Data area and temporarily hide language selector */
.sidebar-language-control {
    display: none !important;
}

.mip-kuwait-market-data-section {
    margin-top: 48px;
    padding: 24px;
    border: 1px solid #cfe2d9;
    border-radius: 18px;
    background: #f7fbf9;
    box-shadow: 0 10px 28px rgba(16, 66, 48, .08);
}

.mip-kuwait-market-data-section .mip-local-data-divider {
    margin: 0 0 24px;
    background: linear-gradient(135deg, #e8f5ef 0%, #ffffff 100%);
}

.mip-kuwait-market-data-section > .mip-table-section {
    margin-top: 28px;
}

.mip-kuwait-market-data-section > .mip-table-section:first-of-type {
    margin-top: 0;
}

@media (max-width: 700px) {
    .mip-kuwait-market-data-section {
        margin-top: 34px;
        padding: 14px;
        border-radius: 14px;
    }

    .mip-kuwait-market-data-section .mip-local-data-divider {
        margin-bottom: 18px;
    }

    /* Explicitly keep all generated values visible on mobile. */
    #detailTables .mip-market-table tbody td[data-label] {
        display: grid !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}
