﻿/* ==========================================================
					   COMPACT GRID STYLING FOR BASE RATE DATAGRID
					   ========================================================== */

/* Root grid container adjustments */
.compact-grid .mud-table-root {
    font-size: 0.85rem; /* Smaller font for dense data */
}

/* General padding adjustments for all headers and cells */
.compact-grid .mud-table-cell,
.compact-grid .mud-table-header {
    padding: 4px 6px !important;
    vertical-align: middle;
}

/* Slightly reduce overall row height */
.compact-grid .mud-table-row {
    height: 36px;
}

/* --- ICON-ONLY COLUMNS (Edit, Copy, Disabled, Exception) --- */
.compact-grid .icon-col,
.compact-grid .icon-col-cell {
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    padding-left: 4px;
    padding-right: 4px;
    text-align: center;
}

.compact-grid .icon-col_Ext,
.compact-grid .icon-col_Ext-cell {
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    padding-left: 4px;
    padding-right: 4px;
    text-align: center;
}
    .compact-grid .icon-col-cell .mud-button-root,
    .compact-grid .icon-col-cell .mud-icon-button-root {
        min-width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

/* --- CHECKBOX COLUMN: give it a bit more room --- */
.compact-grid .checkbox-col,
.compact-grid .checkbox-col-cell {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    text-align: center;
    padding: 0 2px !important;
}

    .compact-grid .checkbox-col-cell .mud-checkbox-root {
        min-width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Center icons/checkbox vertically */
    .compact-grid .icon-col-cell .mud-icon,
    .compact-grid .icon-col-cell .mud-icon-button,
    .compact-grid .checkbox-col-cell .mud-checkbox-root {
        display: flex;
        align-items: center;
        justify-content: center;
    }

/* Compact specific small columns */
.compact-grid .mud-table-cell[data-label="SCHEDULEID"],
.compact-grid .mud-table-cell[data-label="State Code"],
.compact-grid .mud-table-cell[data-label="VectorID"],
.compact-grid .mud-table-cell[data-label="DISABLED"],
.compact-grid .mud-table-cell[data-label="EXCEPTION"] {
    width: 70px;
    min-width: 70px;
    max-width: 70px;
    text-align: center;
}

/* Numeric columns (amounts) right-aligned but compact */
.compact-grid .mud-table-cell[data-label="Max Amount"],
.compact-grid .mud-table-cell[data-label="Min Amount"] {
    text-align: right;
    padding-right: 6px !important;
    width: 75px;
    min-width: 75px;
    max-width: 75px;
}

.compact-grid .narrow-col,
.compact-grid .mud-table-cell.narrow-col {
    width: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    padding: 4px !important;
    text-align: center;
}

/* Row hover highlight */
.compact-grid .mud-table-row:hover {
    background-color: rgba(0, 0, 0, 0.03);
    transition: background-color 0.15s ease-in-out;
}

/* Compact header titles */
.compact-grid .mud-table-header {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Pager spacing */
.compact-grid .mud-data-grid-pager {
    margin-top: 4px;
}


.sticky-tabs {
    position: sticky;
    top: 80px; /* height of header */
    background-color: white;
    z-index: 10;
    border-bottom: 1px solid rgba(0,0,0,0.12);
}

/* ==========================================================
   SHARED COLLAPSIBLE SECTIONS + LIST GRID STYLING
   ========================================================== */

:root {
    --tanzeem-grid-green: #1b5e20;
    --tanzeem-grid-green-2: #2e7d32;
    --tanzeem-grid-border: #dfe8e1;
    --tanzeem-grid-line: #e8eef3;
    --tanzeem-grid-ink: #102a18;
    --tanzeem-grid-gradient: linear-gradient(135deg, #1b5e20 0%, #25712c 50%, #348e3c 100%);
}

.tanzeem-collapsible-page .mud-grid {
    gap: 6px 0 !important;
    row-gap: 6px !important;
}

.tanzeem-collapsible-page .tanzeem-list-expansion-panel > .mud-expand-panel-content .rtl-content,
.tanzeem-collapsible-page .tanzeem-list-expansion-panel .mud-expand-panel-content .rtl-content {
    row-gap: 4px !important;
}

.tanzeem-collapsible-page .filter-section-item,
.tanzeem-collapsible-page .results-section-item {
    padding-top: 0 !important;
}

.tanzeem-collapsible-page .results-section-item {
    margin-top: -4px !important;
}

.tanzeem-collapsible-page .tanzeem-list-expansion-panels {
    border-top: 6px solid var(--tanzeem-grid-green);
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(27, 94, 32, 0.16) !important;
    direction: rtl;
}

.tanzeem-collapsible-page .tanzeem-list-expansion-panel {
    direction: rtl;
}

.tanzeem-collapsible-page .tanzeem-list-expansion-panel .mud-expand-panel-header {
    min-height: 64px;
    padding-inline: 26px !important;
    border-bottom: 1px solid #edf3ee;
    background: linear-gradient(90deg, #f5faf6 0%, #ffffff 68%);
    color: var(--tanzeem-grid-green);
    font-weight: 800;
}

.tanzeem-collapsible-page .tanzeem-list-expansion-panel .mud-expand-panel-icon {
    color: var(--tanzeem-grid-green) !important;
}

.tanzeem-list-panel-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
}

.tanzeem-list-panel-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--tanzeem-grid-green);
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.3;
}

.tanzeem-list-panel-title-icon {
    color: var(--tanzeem-grid-green-2) !important;
    font-size: 1.2rem !important;
}

.tanzeem-collapsible-page .tanzeem-list-expansion-panel .mud-expand-panel-content {
    background: #ffffff;
}

.tanzeem-collapsible-page .tanzeem-list-expansion-panel .mud-expand-panel-content .mud-expand-panel-content {
    padding: 8px !important;
}

.tanzeem-collapsible-page .filter-card,
.tanzeem-collapsible-page .results-card {
    position: relative;
    margin: 0 !important;
    margin-bottom: 0 !important;
    overflow: hidden;
    border: 1px solid var(--tanzeem-grid-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 14px 32px rgba(16, 42, 24, 0.08) !important;
}

.tanzeem-collapsible-page .unified-section-item {
    padding-top: 8px !important;
    padding-bottom: 0 !important;
}

.tanzeem-collapsible-page .tanzeem-unified-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--tanzeem-grid-border) !important;
    border-radius: 14px !important;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(16, 42, 24, 0.08) !important;
}

.tanzeem-collapsible-page .tanzeem-unified-filter {
    border: 0 !important;
    border-radius: 0 !important;
    border-bottom: 1px solid #d9e7dc !important;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdfb 100%);
    box-shadow: none !important;
    padding: 18px 12px 8px !important;
}

.tanzeem-collapsible-page .tanzeem-unified-table {
    margin-top: 0 !important;
    background: #ffffff;
}

.tanzeem-collapsible-page .tanzeem-unified-card .filter-grid {
    row-gap: 0 !important;
}

.tanzeem-collapsible-page .tanzeem-unified-card .filter-grid > .mud-grid-item {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

.tanzeem-collapsible-page .tanzeem-unified-card .filter-grid .mud-input-control {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.tanzeem-collapsible-page .filter-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdfb 100%);
    padding: 10px 12px 8px !important;
}

.tanzeem-collapsible-page .filter-floating-toggle,
.tanzeem-collapsible-page .results-floating-toggle {
    display: none !important;
}

.tanzeem-collapsible-page .collapsible-section-body.is-collapsed {
    display: block !important;
}

.tanzeem-collapsible-page .collapsible-section-body.is-expanded,
.tanzeem-collapsible-page .collapsible-section-body {
    display: block;
}

.tanzeem-collapsible-page .filter-grid {
    align-items: center;
    width: 100%;
    margin-inline: 0 !important;
}

.tanzeem-collapsible-page .inquiry-actions,
.tanzeem-collapsible-page .form-actions {
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 6px;
}

.tanzeem-collapsible-page .inquiry-actions .mud-button-root,
.tanzeem-collapsible-page .form-actions .mud-button-root {
    min-width: 132px;
    min-height: 42px;
    padding-inline: 22px !important;
    padding-block: 0 !important;
    border-radius: 999px !important;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    font-weight: 800 !important;
    white-space: nowrap;
}

.tanzeem-collapsible-page .btn-premium {
    background: var(--tanzeem-grid-gradient) !important;
    box-shadow: 0 8px 18px rgba(27, 94, 32, 0.22) !important;
}

.tanzeem-collapsible-page .btn-premium:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(27, 94, 32, 0.28) !important;
}

.tanzeem-collapsible-page .clear-filter-btn.mud-button-root,
.tanzeem-collapsible-page .btn-secondary-action.mud-button-root {
    border: 1px solid #b8d6bd !important;
    background: #ffffff !important;
    color: var(--tanzeem-grid-green) !important;
    box-shadow: 0 8px 18px rgba(27, 94, 32, 0.08) !important;
}

.tanzeem-collapsible-page .clear-filter-btn.mud-button-root:hover,
.tanzeem-collapsible-page .btn-secondary-action.mud-button-root:hover {
    background: #f3faf4 !important;
    border-color: var(--tanzeem-grid-green-2) !important;
    color: var(--tanzeem-grid-green) !important;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(27, 94, 32, 0.14) !important;
}

.tanzeem-collapsible-page .clear-filter-btn .mud-icon-root,
.tanzeem-collapsible-page .btn-secondary-action .mud-icon-root {
    color: var(--tanzeem-grid-green) !important;
}

.tanzeem-collapsible-page .premium-input .mud-input-label,
.tanzeem-collapsible-page .entry-card .mud-input-label {
    right: 14px !important;
    left: auto !important;
    padding: 0 4px;
    background: #ffffff;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    line-height: 1.15 !important;
    transform-origin: top right !important;
    z-index: 2;
}

.tanzeem-collapsible-page .premium-input .mud-input-outlined-label,
.tanzeem-collapsible-page .entry-card .mud-input-outlined-label {
    right: 14px !important;
    left: auto !important;
}

.tanzeem-collapsible-page .tanzeem-grid-table .mud-table-root {
    border-collapse: separate !important;
    border-spacing: 0;
}

.tanzeem-collapsible-page .table-header-beautified th,
.tanzeem-collapsible-page .table-header-beautified .mud-table-cell {
    background-color: #f7fbf8 !important;
    color: var(--tanzeem-grid-green) !important;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    font-size: .9rem !important;
    font-weight: 800 !important;
    white-space: nowrap;
    text-align: right !important;
    border-bottom: 1px solid #d9e7dc !important;
    padding-top: 13px !important;
    padding-bottom: 13px !important;
}

.tanzeem-collapsible-page .table-header-beautified th {
    border-left: 1px solid #e6eee8 !important;
}

.tanzeem-collapsible-page .table-header-beautified th:last-child {
    border-left: 0 !important;
}

.tanzeem-collapsible-page .tanzeem-grid-table .mud-table-cell {
    text-align: right !important;
    padding: 10px 14px !important;
    border-bottom: 1px solid var(--tanzeem-grid-line) !important;
    border-left: 1px solid #eef3f0 !important;
    vertical-align: middle;
}

.tanzeem-collapsible-page .tanzeem-grid-table .mud-table-cell:last-child {
    border-left: 0 !important;
}

.tanzeem-collapsible-page .tanzeem-grid-table .mud-table-body .mud-table-row:last-child .mud-table-cell {
    border-bottom: 0 !important;
}

.tanzeem-collapsible-page .row-premium-hover {
    transition: background-color .2s ease, box-shadow .2s ease;
}

.tanzeem-collapsible-page .row-premium-hover:hover {
    background-color: #f4faf5 !important;
    box-shadow: inset 3px 0 0 var(--tanzeem-grid-green-2);
}

.tanzeem-collapsible-page .ref-badge {
    display: inline-block;
    padding: 3px 10px;
    border: 1px solid #d7e5ff;
    border-radius: 7px;
    background: #eef5ff;
    color: #1745b5;
    font-weight: 800;
}

.tanzeem-collapsible-page .action-icon-group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    direction: ltr;
}

.tanzeem-collapsible-page .action-icon-btn {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    border: 1px solid transparent !important;
    border-radius: 9px !important;
    box-shadow: none !important;
}

.tanzeem-collapsible-page .action-icon-btn .mud-icon-root {
    font-size: 1.08rem !important;
}

.tanzeem-collapsible-page .action-view {
    background: #edf8ff !important;
    border-color: #d4ecfb !important;
    color: #0ea5e9 !important;
}

.tanzeem-collapsible-page .action-edit {
    background: #eef8ef !important;
    border-color: #d6ead8 !important;
    color: var(--tanzeem-grid-green-2) !important;
}

.tanzeem-collapsible-page .action-delete {
    background: #fff1f1 !important;
    border-color: #ffdada !important;
    color: #ef4444 !important;
}

.tanzeem-collapsible-page .action-view .mud-icon-root {
    color: #0ea5e9 !important;
}

.tanzeem-collapsible-page .action-edit .mud-icon-root {
    color: var(--tanzeem-grid-green-2) !important;
}

.tanzeem-collapsible-page .action-delete .mud-icon-root {
    color: #ef4444 !important;
}

.tanzeem-collapsible-page .action-icon-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(16, 42, 24, 0.12) !important;
}

.tanzeem-collapsible-page .actions-cell {
    white-space: nowrap;
    text-align: center !important;
}

@media (min-width: 960px) {
    .tanzeem-collapsible-page .filter-field-item {
        padding-inline: 8px !important;
    }

    .tanzeem-collapsible-page .filter-actions-item {
        padding-inline: 8px !important;
    }
}

@media (max-width: 600px) {
    .tanzeem-collapsible-page .tanzeem-list-expansion-panel .mud-expand-panel-header {
        padding-inline: 16px !important;
    }

    .tanzeem-list-panel-titlebar {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .tanzeem-collapsible-page .filter-card {
        padding: 10px !important;
    }

    .tanzeem-collapsible-page .inquiry-actions,
    .tanzeem-collapsible-page .form-actions {
        flex-direction: column;
        align-items: stretch !important;
    }

    .tanzeem-collapsible-page .inquiry-actions .mud-button-root,
    .tanzeem-collapsible-page .form-actions .mud-button-root {
        min-width: 100%;
    }
}
