/* Polymetric Pagination Styles */
.polymetric-loading {
	text-align: center;
	padding: 30px;
	color: #666;
}

.polymetric-loading i {
	font-size: 24px;
	margin-right: 10px;
}

.polymetric-od-container {
	display: flex;
	flex-direction: column;
	margin-bottom: 30px;
	overflow-y: auto;
	contain: layout style paint;
	will-change: transform;
	transform: translateZ(0);
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
}

.polymetric-zone-row {
	display: flex;
	align-items: center;
	padding: 8px;
	border-bottom: 1px solid #eee;
	will-change: transform;
	transform: translateZ(0);
	contain: layout style;
	backface-visibility: hidden;
}

.polymetric-zone-row.highlighted {
	background-color: #f0f8ff;
}

.polymetric-zone-info {
	flex: 1;
	min-width: 200px;
}

.polymetric-zone-names {
	text-transform: uppercase;
	font-weight: bold;
	margin-bottom: 0;
	font-size: 13px;
}

.polymetric-zone-select {
	flex: 1;
	min-width: 150px;
}

.polymetric-select-fullscreen {
	width: 100%;
	padding: 6px;
	border: 1px solid #ddd;
	border-radius: 3px;
	background-color: #fff;
	font-size: 13px;
}

.polymetric-pagination-controls {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
	padding: 10px;
	background: #f5f5f5;
	border-radius: 4px;
    position: sticky;
    top: 22px;
    z-index: 20;
}

.polymetric-pagination-left {
	display: flex;
	align-items: center;
	gap: 15px;
}

.polymetric-pagination-right {
	display: flex;
	align-items: center;
	gap: 10px;
}

.polymetric-items-per-page {
	margin: 0;
	min-width: 150px;
}

.polymetric-pagination-info {
	color: #666;
	font-size: 14px;
}

.polymetric-pagination-nav {
	display: flex;
	align-items: center;
	gap: 10px;
}

.polymetric-page-info {
	min-width: 80px;
	text-align: center;
}

.polymetric-pagination-bottom {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	margin-top: 15px;
	padding: 10px;
    position: sticky;
    bottom: -16px;
    background: #fff;
    z-index: 20;
}

.polymetric-page-info-bottom {
	padding: 0 15px;
}

/* Virtual Scrolling Matrix Styles */
.polymetric-matrix-container {
	height: 100%;
	overflow: auto;
	position: relative;
	/* border: 1px solid #ddd; */
	background: #fff;
	contain: layout style paint;
	will-change: scroll-position;
}

.polymetric-matrix-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: #fff;
	/* border-bottom: 2px solid #eee; */
}

.polymetric-matrix-header-row {
	display: flex;
}

.polymetric-matrix-corner {
	width: 150px;
	height: 50px;
	border-right: 1px solid #eee;
	border-bottom: 1px solid #eee;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	background: #f8f9fa;
	text-transform: uppercase;
	font-size: 12px;
}

.polymetric-matrix-header-cells {
	display: flex;
}

.polymetric-matrix-header-cell {
	width: 90px;
	height: 50px;
	border-right: 1px solid #eee;
	text-align: center;
	line-height: 1.2;
	font-weight: bold;
	text-transform: uppercase;
	font-size: 10px;
	background: #f8f9fa;
	display: flex;
	align-items: center;
	justify-content: center;
	word-wrap: break-word;
	overflow-wrap: break-word;
	hyphens: auto;
	padding: 2px;
	box-sizing: border-box;
}

.polymetric-matrix-body {
	position: relative;
}

.polymetric-matrix-row {
	display: flex;
	height: 50px;
	/* border-bottom: 1px solid #eee; */
}

.polymetric-matrix-row-label {
	width: 150px;
	height: 50px;
	border-right: 1px solid #eee;
	border-bottom: 1px solid #eee;
	background: #f8f9fa;
	display: flex;
	align-items: center;
	padding: 0 10px;
	font-weight: bold;
	text-transform: uppercase;
	font-size: 10px;
	position: sticky;
	left: 0;
	z-index: 10;
	word-wrap: break-word;
	overflow-wrap: break-word;
	hyphens: auto;
	box-sizing: border-box;
	overflow: hidden;
}

.polymetric-matrix-cells {
	display: flex;
}

.polymetric-matrix-cell {
	width: 90px;
	height: 50px;
	border-bottom: 1px solid #eee;
	border-right: 1px solid #eee;
}

.polymetric-matrix-row:nth-child(2n+1) .polymetric-matrix-cells {
	background-color: #ca064d36;
}

.polymetric-matrix-input {
	margin: 0;
	padding: 2px;
	width: 100%;
	overflow: hidden;
}

.polymetric-matrix-input select {
	width: 100%;
	height: 36px;
	border: none;
	background: transparent;
	font-size: 12px;
	text-align: center;
}

.polymetric-matrix-input md-select {
	min-width: 90px;
	height: 36px;
	width: 100%;
	overflow: hidden;
}

.fare-class-row:hover {
    background: #ca064d36;
}

/* Performance optimizations for OD polymetric */
.fare-class-row {
    transition: background-color 0.2s ease;
}

.fare-class-row.highlighted {
    background-color: #f0f8ff;
    border-left: 3px solid #2196F3;
}

/* Optimize scrolling performance */
#polymetric-od-container {
    will-change: transform;
    transform: translateZ(0);
}

/* Matrix optimization for big data */
.polymetric-matrix-optimized {
    contain: layout style paint;
    will-change: transform;
    transform: translateZ(0);
    overflow: hidden;
}

.polymetric-matrix-row-optimized {
    contain: layout style;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.polymetric-matrix-cell-optimized {
    contain: layout style;
    will-change: transform;
    transform: translateZ(0);
}

/* Chunked rendering for large matrices */
.polymetric-matrix-chunk {
    display: none;
}

.polymetric-matrix-chunk.visible {
    display: block;
}

/* Performance optimizations for large datasets */
.polymetric-matrix-container-large {
    height: 60vh;
    overflow: auto;
    contain: layout style paint;
    will-change: scroll-position;
}

.polymetric-matrix-header-sticky {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 2px solid #eee;
}

.polymetric-matrix-left-sticky {
    position: sticky;
    left: 0;
    z-index: 50;
    background: #fff;
    border-right: 2px solid #eee;
}

/* Triangular matrix styles */
.triangular-disabled {
	background-color: #f5f5f5 !important;
	opacity: 0.85;
}

.triangular-disabled-cell {
	width: 80px;
	height: 40px;
	border-right: 1px solid #eee;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #f8f9fa;
	position: relative;
}

.triangular-symbol {
	color: #999;
	font-size: 16px;
	font-weight: bold;
}

.triangular-disabled-cell::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(45deg, transparent 0%, transparent 45%, #ddd 45%, #ddd 55%, transparent 55%, transparent 100%);
	pointer-events: none;
}

.strike-through {
	text-decoration: line-through;
	color: #999;
}

/* Responsive design for pagination controls */
@media (max-width: 768px) {
    .pagination-controls {
        flex-direction: column;
        gap: 10px;
    }

    .pagination-info {
        text-align: center;
    }
}
