/**
 * WP Prayer Time - Frontend Styles
 *
 * @package WP_Prayer_Time
 * @subpackage Frontend/Assets
 */

/* ===================================
   Basic Prayer Time Styles
   =================================== */

.wp-prayer-time-display {
	padding: 20px;
	background: #f9f9f9;
	border: 1px solid #ddd;
	border-radius: 4px;
	margin: 20px 0;
}

.wp-prayer-time-display h3 {
	margin-top: 0;
	color: #333;
}

.wp-prayer-time-display p {
	font-size: 16px;
	line-height: 1.6;
	color: #666;
}

/* Hide unavailable prayer times */
.wp-prayer-time-not-available {
	display: none !important;
}

/* Show available prayer times */
.wp-prayer-time-available {
	display: inline;
}

/* Current date display */
.wp-prayer-current-date {
	display: inline-block;
}

/* Hijri date display */
.wp-prayer-hijri-date {
	display: inline-block;
}

/* Fixed width countdown time to prevent layout shift */
.wp-prayer-countdown-time {
	display: inline-block;
	min-width: 4.5em; /* Enough for H:MM:SS format (e.g., "10:59:59") */
	text-align: left;
}


/* ===================================
   Template 1: Classic Card Layout
   =================================== */

.template-1-container {
	max-width: 800px;
	margin: 40px auto;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.template-1-header {
	background: linear-gradient( 135deg, #667eea 0%, #764ba2 100% );
	color: white;
	padding: 30px;
	border-radius: 15px;
	margin-bottom: 30px;
	box-shadow: 0 10px 30px rgba( 0, 0, 0, 0.2 );
	text-align: center;
}

.template-1-header h2 {
	margin: 0 0 10px 0;
	font-size: 24px;
	font-weight: 600;
}

.template-1-current-time {
	font-size: 48px;
	font-weight: 700;
	margin: 10px 0;
}

.template-1-countdown {
	font-size: 20px;
	margin-top: 20px;
	padding: 15px;
	background: rgba( 255, 255, 255, 0.2 );
	border-radius: 10px;
	backdrop-filter: blur( 10px );
}

.template-1-prayer-container {
	background: white;
	border-radius: 15px;
	padding: 30px;
	box-shadow: 0 10px 30px rgba( 0, 0, 0, 0.1 );
}

.template-1-prayer-container h2 {
	text-align: center;
	color: #333;
	margin: 0 0 30px 0;
	font-size: 28px;
	font-weight: 600;
}

.template-1-grid {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 220px, 1fr ) );
	gap: 25px;
}

.template-1-card {
	text-align: center;
	padding: 25px;
	border-radius: 12px;
	transition: transform 0.3s;
}

.template-1-card:hover {
	transform: translateY( -5px );
}

.template-1-card.fajr {
	background: linear-gradient( 135deg, #667eea 0%, #764ba2 100% );
	box-shadow: 0 4px 15px rgba( 102, 126, 234, 0.4 );
}

.template-1-card.sunrise {
	background: linear-gradient( 135deg, #f093fb 0%, #f5576c 100% );
	box-shadow: 0 4px 15px rgba( 240, 147, 251, 0.4 );
}

.template-1-card.zuhr {
	background: linear-gradient( 135deg, #43e97b 0%, #38f9d7 100% );
	box-shadow: 0 4px 15px rgba( 67, 233, 123, 0.4 );
}

.template-1-card.asr {
	background: linear-gradient( 135deg, #fa709a 0%, #fee140 100% );
	box-shadow: 0 4px 15px rgba( 250, 112, 154, 0.4 );
}

.template-1-card.maghrib {
	background: linear-gradient( 135deg, #30cfd0 0%, #330867 100% );
	box-shadow: 0 4px 15px rgba( 48, 207, 208, 0.4 );
}

.template-1-card.isha {
	background: linear-gradient( 135deg, #a8edea 0%, #fed6e3 100% );
	box-shadow: 0 4px 15px rgba( 168, 237, 234, 0.4 );
}

.template-1-card-label {
	font-size: 18px;
	color: rgba( 255, 255, 255, 0.9 );
	margin-bottom: 10px;
	font-weight: 500;
}

.template-1-card.isha .template-1-card-label {
	color: rgba( 50, 50, 50, 0.9 );
}

.template-1-card-time {
	font-size: 32px;
	color: white;
	font-weight: 700;
}

.template-1-card.isha .template-1-card-time {
	color: #333;
}

/* ===================================
   Template 2: Minimalist List Layout
   =================================== */

.template-2-container {
	max-width: 600px;
	margin: 40px auto;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.template-2-header {
	text-align: center;
	margin-bottom: 30px;
}

.template-2-header h1 {
	font-size: 36px;
	color: #1a202c;
	margin: 0 0 10px 0;
	font-weight: 700;
}

.template-2-header p {
	font-size: 18px;
	color: #718096;
	margin: 0;
}

.template-2-current-time {
	background: #f7fafc;
	border-left: 4px solid #4299e1;
	padding: 20px;
	margin-bottom: 30px;
	border-radius: 8px;
}

.template-2-time-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.template-2-time-label {
	font-size: 18px;
	color: #2d3748;
	font-weight: 600;
}

.template-2-time-value {
	font-size: 24px;
	color: #4299e1;
	font-weight: 700;
}

.template-2-countdown {
	margin-top: 15px;
	padding-top: 15px;
	border-top: 1px solid #e2e8f0;
	font-size: 16px;
	color: #4a5568;
}

.template-2-list {
	background: white;
	border-radius: 12px;
	box-shadow: 0 4px 6px rgba( 0, 0, 0, 0.07 );
	overflow: hidden;
}

.template-2-item {
	padding: 20px;
	border-bottom: 1px solid #e2e8f0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.template-2-item:last-child {
	border-bottom: none;
}

.template-2-item.sunrise,
.template-2-item.asr,
.template-2-item.isha {
	background: #f7fafc;
}

.template-2-prayer-name {
	font-size: 20px;
	color: #2d3748;
	font-weight: 600;
}

.template-2-prayer-time {
	font-size: 24px;
	font-weight: 700;
}

.template-2-item.fajr .template-2-prayer-time {
	color: #4299e1;
}

.template-2-item.sunrise .template-2-prayer-time {
	color: #ed8936;
}

.template-2-item.zuhr .template-2-prayer-time {
	color: #48bb78;
}

.template-2-item.asr .template-2-prayer-time {
	color: #ed8936;
}

.template-2-item.maghrib .template-2-prayer-time {
	color: #f56565;
}

.template-2-item.isha .template-2-prayer-time {
	color: #667eea;
}


/* ===================================
   Template 4: Simple Table Layout
   =================================== */

.template-4-container {
	max-width: 700px;
	margin: 40px auto;
	font-family: Arial, sans-serif;
}

.template-4-container h1 {
	text-align: center;
	color: #2c3e50;
	font-size: 36px;
	margin-bottom: 10px;
}

.template-4-header {
	text-align: center;
	margin-bottom: 30px;
}

.template-4-time-box {
	display: inline-block;
	background: #3498db;
	color: white;
	padding: 15px 30px;
	border-radius: 8px;
	margin-bottom: 15px;
}

.template-4-time-label {
	font-size: 14px;
	margin-bottom: 5px;
	opacity: 0.9;
}

.template-4-time-value {
	font-size: 32px;
	font-weight: bold;
}

.template-4-countdown {
	font-size: 18px;
	color: #7f8c8d;
}

.template-4-table {
	width: 100%;
	border-collapse: collapse;
	background: white;
	box-shadow: 0 2px 10px rgba( 0, 0, 0, 0.1 );
	border-radius: 10px;
	overflow: hidden;
}

.template-4-table thead tr {
	background: #34495e;
	color: white;
}

.template-4-table th {
	padding: 20px;
	font-size: 18px;
}

.template-4-table th:first-child {
	text-align: left;
}

.template-4-table th:last-child {
	text-align: right;
}

.template-4-table tbody tr {
	border-bottom: 1px solid #ecf0f1;
}

.template-4-table tbody tr.sunrise,
.template-4-table tbody tr.asr,
.template-4-table tbody tr.isha {
	background: #f8f9fa;
}

.template-4-table td {
	padding: 20px;
	font-size: 18px;
	color: #2c3e50;
}

.template-4-table td:last-child {
	text-align: right;
	font-size: 24px;
	font-weight: bold;
}

.template-4-table tr.fajr td:last-child {
	color: #3498db;
}

.template-4-table tr.sunrise td:last-child {
	color: #e67e22;
}

.template-4-table tr.zuhr td:last-child {
	color: #27ae60;
}

.template-4-table tr.asr td:last-child {
	color: #f39c12;
}

.template-4-table tr.maghrib td:last-child {
	color: #e74c3c;
}

.template-4-table tr.isha td:last-child {
	color: #9b59b6;
}

/* ===================================
   Template 5: Compact Widget Style
   =================================== */

.template-5-container {
	max-width: 400px;
	margin: 20px auto;
	font-family: 'Helvetica Neue', Arial, sans-serif;
}

.template-5-widget {
	background: white;
	border-radius: 15px;
	box-shadow: 0 8px 20px rgba( 0, 0, 0, 0.12 );
	overflow: hidden;
}

.template-5-header {
	background: linear-gradient( 135deg, #667eea 0%, #764ba2 100% );
	color: white;
	padding: 25px;
	text-align: center;
}

.template-5-header h2 {
	margin: 0 0 10px 0;
	font-size: 24px;
	font-weight: 600;
}

.template-5-current-time {
	font-size: 28px;
	font-weight: 700;
	margin: 5px 0;
}

.template-5-countdown {
	font-size: 14px;
	opacity: 0.9;
	margin-top: 10px;
}

.template-5-list {
	padding: 20px;
}

.template-5-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px 0;
	border-bottom: 1px solid #e2e8f0;
}

.template-5-item:last-child {
	border-bottom: none;
}

.template-5-prayer-name {
	font-size: 17px;
	color: #4a5568;
	font-weight: 500;
}

.template-5-prayer-time {
	font-size: 22px;
	font-weight: 700;
}

.template-5-item.fajr .template-5-prayer-time {
	color: #667eea;
}

.template-5-item.sunrise .template-5-prayer-time {
	color: #f6ad55;
}

.template-5-item.zuhr .template-5-prayer-time {
	color: #48bb78;
}

.template-5-item.asr .template-5-prayer-time {
	color: #ed8936;
}

.template-5-item.maghrib .template-5-prayer-time {
	color: #f56565;
}

.template-5-item.isha .template-5-prayer-time {
	color: #9f7aea;
}

/* ===================================
   Daily Prayer Times Table Styles
   =================================== */

.prayer-times-table {
	margin: 30px 0;
	max-width: 100%;
	box-shadow: 0 4px 6px rgba( 0, 0, 0, 0.1 );
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.prayer-times-table table {
	width: 100%;
	border-collapse: collapse;
}

.prayer-times-table th,
.prayer-times-table td {
	padding: 16px;
	text-align: center;
	border: 1px solid #ddd;
}

.prayer-times-table th {
	background: #2c3e50;
	color: #fff;
	font-weight: 600;
	font-size: 16px;
}

.prayer-times-table .header-row th {
	background: #34495e;
	font-size: 18px;
	padding: 20px;
}

.prayer-times-table .header-row th:first-child {
	text-align: left;
	border-right: 1px solid #111;
}

.prayer-times-table .header-row th:last-child {
	text-align: right;
}

.prayer-times-table .today-label {
	display: block;
	font-size: 20px;
	font-weight: 700;
}

.prayer-times-table .date-label {
	display: block;
	font-size: 14px;
	opacity: 0.9;
	margin-top: 5px;
}

.prayer-times-table .highlight {
	background: #f8f9fa;
	font-weight: 600;
}

.prayer-times-table td {
	font-size: 18px;
	color: #2c3e50;
}

.prayer-times-table .jamaat-row td {
	background: #ecf0f1;
	font-style: italic;
}

/* ===================================
   Monthly Prayer Timetable Styles
   =================================== */

.monthly-prayer-container {
	margin: 40px 0;
	max-width: 100%;
}

.monthly-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0;
	padding: 0 0 20px 0;
	background: transparent;
}

.monthly-header h3 {
	margin: 0;
	font-size: 24px;
	color: #2c3e50;
}

.month-selector {
	display: flex;
	align-items: center;
	gap: 15px;
	margin-left: auto;
}

.month-selector label {
	font-size: 16px;
	font-weight: 600;
	color: #2c3e50;
}

.month-selector select {
	padding: 10px 15px;
	font-size: 16px;
	border: 2px solid #ddd;
	border-radius: 5px;
	background: white;
	cursor: pointer;
	min-width: 150px;
}

.month-selector select:focus {
	outline: none;
	border-color: #2c3e50;
}

.monthly-timetable {
	background: white;
	border-radius: 8px;
	overflow: hidden;
	overflow-x: auto !important;
}

.monthly-timetable table {
	width: 100%;
	border-collapse: collapse;
}

.monthly-timetable th,
.monthly-timetable td {
	padding: 12px 8px;
	text-align: center;
	border: 1px solid #ddd;
	font-size: 14px;
}

.monthly-timetable th {
	background: #aaa;
	color: white;
	font-weight: 600;
	font-size: 13px;
}

.monthly-timetable th.prayer-header {
	background: #888;
	font-size: 15px;
}

.monthly-timetable td {
	color: #888;
}

.monthly-timetable .day-name {
	font-weight: 600;
	color: #34495e;
}

.monthly-timetable .jamaat-cell {
	background: #f8f9fa;
	font-style: italic;
}

.monthly-timetable .hijri-date {
	font-size: 12px;
	color: #666;
}

.monthly-timetable tr:hover {
	background: #f0f0f1;
}

.monthly-timetable tr.today-highlight {
	background: #fff9e6;
	font-weight: 600;
}

.monthly-timetable tr.today-highlight:hover {
	background: #fff3d0;
}

/* ===================================
   Mobile Prayer Times Table Layout
   =================================== */

.prayer-times-table-mobile {
	margin: 30px 0;
	max-width: 100%;
	box-shadow: 0 4px 6px rgba( 0, 0, 0, 0.1 );
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	display: none; /* Hidden by default, shown via media query */
}

.prayer-times-table-mobile table {
	width: 100%;
	border-collapse: collapse;
}

.prayer-times-table-mobile th,
.prayer-times-table-mobile td {
	padding: 14px 12px;
	text-align: center;
	border: 1px solid #ddd;
}

.prayer-times-table-mobile th {
	background: #2c3e50;
	color: #fff;
	font-weight: 600;
	font-size: 15px;
}

.prayer-times-table-mobile .mobile-header-row th {
	background: #34495e;
	font-size: 16px;
	padding: 18px 12px;
	text-align: center;
}

.prayer-times-table-mobile .mobile-today-label {
	display: block;
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 5px;
}

.prayer-times-table-mobile .mobile-hijri-label {
	display: block;
	font-size: 13px;
	opacity: 0.9;
}

.prayer-times-table-mobile .tableHeading {
	background: #2c3e50;
	color: #fff;
	font-weight: 600;
	font-size: 15px;
}

.prayer-times-table-mobile td {
	font-size: 16px;
	color: #2c3e50;
	background: #fff;
}

.prayer-times-table-mobile .jamah {
	background: #ecf0f1;
	font-style: italic;
}

.prayer-times-table-mobile .highlight {
	background: #fff9e6 !important;
	font-weight: 600;
	color: #2c3e50;
}

.prayer-times-table-mobile tr th:first-child {
	text-align: left;
	padding-left: 16px;
	font-weight: 600;
}

/* Hide desktop table on mobile, show mobile table */
/* Note: The breakpoint is dynamically set via inline styles based on admin settings */

/* ===================================
   Mobile Responsive Styles
   =================================== */

@media ( max-width: 768px ) {
	/* Daily Prayer Times Table - Mobile */
	.prayer-times-table {
		margin: 20px 10px;
	}
	
	.prayer-times-table th,
	.prayer-times-table td {
		padding: 12px 8px;
		font-size: 14px;
	}
	
	.prayer-times-table .header-row th {
		padding: 15px 10px;
		font-size: 16px;
	}
	
	.prayer-times-table .today-label {
		font-size: 16px;
	}
	
	.prayer-times-table .date-label {
		font-size: 12px;
	}
	
	.prayer-times-table td {
		font-size: 15px;
	}
	
	/* Mobile Table Adjustments */
	.prayer-times-table-mobile {
		margin: 20px 10px;
	}
	
	.prayer-times-table-mobile th,
	.prayer-times-table-mobile td {
		padding: 12px 10px;
		font-size: 14px;
	}
	
	.prayer-times-table-mobile .mobile-header-row th {
		padding: 15px 10px;
		font-size: 15px;
	}
	
	.prayer-times-table-mobile .mobile-today-label {
		font-size: 16px;
	}
	
	.prayer-times-table-mobile .mobile-hijri-label {
		font-size: 12px;
	}
	
	/* Monthly Timetable - Mobile */
	.monthly-prayer-container {
		margin: 20px 10px;
	}
	
	.monthly-header {
		flex-direction: column;
		gap: 15px;
		text-align: center;
	}
	
	.month-selector {
		flex-direction: column;
		width: 100%;
	}
	
	.month-selector select {
		width: 100%;
	}
	
	.monthly-timetable th,
	.monthly-timetable td {
		padding: 8px 4px;
		font-size: 11px;
	}
	
	.monthly-timetable th {
		font-size: 10px;
	}
	
	.monthly-timetable th.prayer-header {
		font-size: 12px;
	}
}

@media ( max-width: 480px ) {
	/* Daily Prayer Times Table - Small Mobile */
	.prayer-times-table th,
	.prayer-times-table td {
		padding: 10px 5px;
		font-size: 13px;
	}
	
	.prayer-times-table .header-row th {
		padding: 12px 8px;
		font-size: 14px;
	}
	
	.prayer-times-table .today-label {
		font-size: 14px;
	}
	
	.prayer-times-table td {
		font-size: 14px;
	}
}

/* ===================================
   Rotating Banner Styles
   =================================== */

.wp-prayer-banner {
	position: relative;
	width: 100%;
	height: 600px;
	overflow: hidden;
	background: transparent;
	margin: 20px 0;
}

.wp-prayer-banner-slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: none;
}

.wp-prayer-banner-slide.active {
	display: block;
}

.wp-prayer-banner-slide img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center center;
	display: block;
}

/* ===================================
   Scrolling Text Styles
   =================================== */

.wp-prayer-scrolling-text-container {
	width: 100%;
	overflow: hidden;
	position: relative;
}

/* Mobile responsive adjustments */
@media ( max-width: 768px ) {
	.wp-prayer-banner {
		height: 400px;
		margin: 15px 0;
	}
}

@media ( max-width: 480px ) {
	.wp-prayer-banner {
		height: 300px;
		margin: 10px 0;
	}
}
