/* Taoz Electricity Tariff - Mobile Friendly Styles */

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: Arial, sans-serif;
	line-height: 1.4;
	min-height: 100vh;
	padding: 5px;
	direction: rtl;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.header {
	background-color: rgba(255,255,255,0.9);
	padding: 8px;
	text-align: center;
	border: 2px solid #333;
	margin-bottom: 10px;
	border-radius: 8px;
}

.header h1 {
	font-size: clamp(1rem, 3.5vw, 1.6rem);
	color: #333;
	margin-bottom: 5px;
}

/* Months Grid */
.months-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
	gap: 1px;
	margin-bottom: 15px;
	border-radius: 6px;
	overflow: hidden;
}

.month-cell {
	padding: 6px 3px;
	text-align: center;
	font-size: clamp(0.8rem, 2vw, 1rem);
	font-weight: bold;
	color: #333;
	transition: all 0.3s ease;
	text-decoration: none;
	display: block;
	cursor: pointer;
	box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.month-cell:hover {
	transform: scale(1.05);
	box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.month-cell.current {
	font-size: clamp(0.9rem, 2.5vw, 1.2rem);
	border: 2px solid #000;
	box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

.winter { background-color: #ff6961; }
.spring { background-color: #cdeac0; }
.summer { background-color: #ffb347; }

/* Main Info Section */
.main-info {
	text-align: center;
	padding: 15px 10px;
	background-color: rgba(255,255,255,0.1);
	border-radius: 8px;
	margin-bottom: 15px;
}

.date-time {
	font-size: clamp(0.8rem, 2vw, 1.4rem);
	margin-bottom: 10px;
	color: #333;
	background-color: rgba(255,255,255,0.8);
	padding: 8px;
	border-radius: 6px;
	line-height: 1.1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.current-status {
	font-size: clamp(1.6rem, 5vw, 2.8rem);
	font-weight: bold;
	margin-bottom: 10px;
	color: #fff;
	text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.tariff-info {
	background-color: rgba(255,255,255,0.9);
	padding: 10px;
	border-radius: 8px;
	margin-bottom: 10px;
}

.tariff-row {
	font-size: clamp(1.1rem, 3.5vw, 1.8rem);
	margin-bottom: 8px;
	color: #333;
}

/* Hours Timeline */
.hours-section {
	margin-bottom: 15px;
}

.hours-grid {
	display: grid;
	grid-template-columns: repeat(24, 1fr);
	gap: 1px;
	margin-bottom: 15px;
	border-radius: 6px;
	overflow: hidden;
	direction: ltr;
}

.hour-cell {
	padding: 4px 1px;
	text-align: center;
	font-size: clamp(0.6rem, 1.8vw, 0.9rem);
	font-weight: bold;
	color: #333;
	min-height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(0,0,0,0.2);
	position: relative;
}

.hour-cell.current-hour {
	border: 3px solid #000 !important;
	box-shadow: 0 0 8px rgba(0,0,0,0.6);
	transform: scale(1.1);
	z-index: 10;
}

.hour-indicator {
	display: none;
}

/* Tariff Legend */
.tariff-legend {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 15px;
	border-radius: 6px;
	overflow: visible;
}

.legend-item {
	padding: 15px;
	text-align: center;
	color: #fff;
	font-weight: bold;
	border-radius: 8px;
	box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.legend-price {
	font-size: clamp(1.2rem, 3vw, 1.8rem);
	margin-bottom: 5px;
	font-weight: bold;
}

.legend-name {
	font-size: clamp(1rem, 2.5vw, 1.4rem);
	font-weight: bold;
}

.low-tariff { background-color: #6eac25; }
.peak-tariff { background-color: #ea2613; }

/* Navigation - Timeline Style */
.navigation {
	display: flex !important;
	flex-direction: row !important;
	gap: 4px;
	margin-bottom: 50px !important;
	direction: ltr; /* Override RTL for timeline navigation */
}

.nav-btn {
	flex: 1;
	padding: 8px 4px;
	background-color: rgba(255,255,255,0.9);
	border: 2px solid #333;
	border-radius: 6px;
	cursor: pointer;
	font-size: clamp(0.8rem, 2vw, 1.1rem);
	font-weight: bold;
	color: #333;
	text-align: center;
	transition: all 0.3s ease;
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	min-width: 0;
}

.nav-btn:hover {
	background-color: rgba(255,255,255,1);
	transform: translateY(-2px);
	box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* RTL Navigation Arrows - Timeline Style */
.nav-btn.prev::before {
	content: "◀ ";
	padding-right: 8px;
}

.nav-btn.next::after {
	content: " ▶";
	padding-left: 8px;
}

/* Footer */
.footer {
	background-color: rgba(255,255,255,0.9);
	padding: 20px;
	text-align: center;
	border: 2px solid #333;
	border-radius: 10px;
	font-size: clamp(0.9rem, 2vw, 1.2rem);
	color: #333;
	line-height: 1.8;
}

.footer a {
	color: #0066cc;
	text-decoration: none;
	font-weight: bold;
}

.footer a:hover {
	text-decoration: underline;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
	.container {
		margin: 0;
		border-radius: 0;
	}
	
	.months-grid {
		grid-template-columns: repeat(4, 1fr);
	}
	
	.hours-grid {
		grid-template-columns: repeat(12, 1fr);
		gap: 2px;
	}
	
	.hour-indicator {
		grid-template-columns: repeat(12, 1fr);
	}
	
	.navigation {
		grid-template-columns: 1fr;
		gap: 15px;
	}
}

@media (max-width: 480px) {
	body {
		padding: 5px;
	}
	
	.main-info {
		padding: 20px 10px;
	}
	
	.months-grid {
		grid-template-columns: repeat(3, 1fr);
	}
	
	.hours-grid {
		grid-template-columns: repeat(8, 1fr);
		gap: 2px;
	}
	
	.hour-indicator {
		grid-template-columns: repeat(8, 1fr);
	}
	
	.date-time {
		font-size: clamp(0.9rem, 2.2vw, 1.2rem);
		line-height: 1.2;
	}
}