/* Islamic Hijri Calendar Explorer - Frontend Styles
   Standalone plugin - all classes prefixed "ice-cal-" so this never collides
   with any other Islamic date/calendar plugin on the same site.
*/

.ice-cal-wrap {
	--ice-emerald: #0e5c36;
	--ice-emerald-dark: #082523;
	--ice-gold: #c6a15b;
	--ice-gold-dark: #a9812f;
	--ice-gold-light: #e4c988;
	--ice-ivory: #fbf7ee;
	--ice-ink: #1c2620;
	--ice-border: #e2e7e3;
	--ice-muted: #6b7a71;
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	max-width: 1100px;
	margin: 0 auto;
}

.ice-cal-wrap,
.ice-cal-wrap * {
	box-sizing: border-box;
}

.ice-cal-title {
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 26px;
	font-weight: 700;
	color: var(--ice-emerald);
	margin: 0 0 16px;
	text-align: center;
}

/* Dynamic "days left until Ramadan" banner - always about today's real date,
   sits outside the AJAX-swapped area so it stays put while browsing other months. */

.ice-cal-banner {
	background: #eaf7ef;
	border-left: 4px solid var(--ice-emerald);
	border-radius: 8px;
	padding: 14px 18px;
	margin-bottom: 18px;
}

.ice-cal-banner p {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--ice-emerald);
}

.ice-cal-inner {
	transition: opacity 0.15s ease;
	border: 1px solid var(--ice-border);
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.ice-cal-inner.ice-is-loading {
	opacity: 0.5;
	pointer-events: none;
}

/* Year bar */

.ice-cal-year-bar {
	background: var(--ice-emerald);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 22px;
	padding: 16px 20px;
	position: relative;
}

.ice-cal-year-bar::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: repeating-linear-gradient(
		90deg,
		var(--ice-gold) 0,
		var(--ice-gold) 8px,
		transparent 8px,
		transparent 16px
	);
}

.ice-cal-year-label {
	text-align: center;
	color: var(--ice-ivory);
	min-width: 140px;
}

.ice-cal-year-en {
	display: block;
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 19px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.ice-cal-year-ar {
	display: block;
	font-family: 'Amiri', 'Noto Naskh Arabic', serif;
	font-size: 15px;
	color: var(--ice-gold-light);
	margin-top: 2px;
}

.ice-cal-prev-year,
.ice-cal-next-year {
	background: transparent;
	border: 1px solid var(--ice-gold);
	color: var(--ice-gold-light);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 17px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, color 0.2s ease;
	flex-shrink: 0;
}

.ice-cal-prev-year:hover,
.ice-cal-next-year:hover {
	background: var(--ice-gold);
	color: var(--ice-emerald-dark);
}

.ice-cal-prev-year:focus-visible,
.ice-cal-next-year:focus-visible {
	outline: 2px solid var(--ice-gold-light);
	outline-offset: 2px;
}

/* Body: sidebar (30%) + main grid (70%). Div-based throughout on purpose -
   no <ul>/<li>/<table>, so a theme's default list/table CSS can never leak in. */

.ice-cal-body {
	display: flex;
	align-items: stretch;
}

.ice-cal-sidebar {
	flex: 0 0 30%;
	max-width: 30%;
	background: var(--ice-ivory);
	border-right: 1px solid var(--ice-border);
	padding: 14px 0;
	max-height: 620px;
	overflow-y: auto;
}

.ice-cal-sidebar-title {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--ice-muted);
	padding: 0 20px 10px;
}

.ice-cal-month-list {
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 0 10px;
}

.ice-cal-month-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 12px;
	cursor: pointer;
	border-radius: 8px;
	transition: background 0.15s ease, color 0.15s ease;
}

.ice-cal-month-item:hover {
	background: rgba(198, 161, 91, 0.14);
}

.ice-cal-month-item.is-active {
	background: var(--ice-emerald);
}

.ice-cal-month-num {
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 12px;
	color: var(--ice-gold-dark);
	font-weight: 700;
	flex-shrink: 0;
	width: 20px;
}

.ice-cal-month-item.is-active .ice-cal-month-num {
	color: var(--ice-gold-light);
}

.ice-cal-month-name {
	font-size: 14px;
	font-weight: 600;
	color: var(--ice-ink);
}

.ice-cal-month-item.is-active .ice-cal-month-name {
	color: #ffffff;
}

.ice-cal-main {
	flex: 1 1 70%;
	max-width: 70%;
	padding: 22px 24px;
}

.ice-cal-month-header {
	display: flex;
	align-items: baseline;
	justify-content: flex-end;
	gap: 10px;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--ice-border);
	flex-wrap: wrap;
}

.ice-cal-month-title-en {
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 19px;
	font-weight: 700;
	color: var(--ice-gold-dark);
}

.ice-cal-month-title-ur {
	font-family: 'Amiri', 'Noto Naskh Arabic', serif;
	font-size: 16px;
	color: var(--ice-gold);
}

/* CSS-Grid based calendar body: 7 equal columns */

.ice-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 6px;
}

.ice-cal-weekday {
	text-align: center;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--ice-emerald);
	padding: 6px 0 10px;
}

.ice-cal-day-cell {
	background: #ffffff;
	border: 1px solid #e7ebe8;
	border-radius: 8px;
	text-align: center;
	padding: 10px 4px;
	min-height: 54px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	transition: background 0.15s ease;
}

.ice-cal-day-num {
	font-size: 16px;
	font-weight: 700;
	color: var(--ice-ink);
	line-height: 1.2;
}

.ice-cal-day-greg {
	font-size: 11px;
	color: #8a938d;
	line-height: 1.2;
}

.ice-cal-empty {
	background: transparent;
	border-color: transparent;
}

.ice-cal-is-today {
	background: var(--ice-emerald);
	border-color: var(--ice-emerald);
}

.ice-cal-is-today .ice-cal-day-num {
	color: #ffffff;
}

.ice-cal-is-today .ice-cal-day-greg {
	color: rgba(255, 255, 255, 0.75);
}

.ice-cal-legend {
	padding: 12px 18px 16px;
	font-size: 12px;
	color: var(--ice-muted);
}

.ice-cal-legend-dot {
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--ice-emerald);
	margin-right: 5px;
	vertical-align: middle;
}

.ice-cal-legend-event {
	margin-left: 16px;
}

.ice-cal-legend-event-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--ice-gold);
	margin-right: 5px;
	vertical-align: middle;
}

/* Important-date cells: gold left border + small dot, and a CSS-only tooltip
   on hover (no JS needed) showing what the date is. */

.ice-cal-day-cell.ice-cal-has-event {
	position: relative;
	border-color: var(--ice-gold);
	border-width: 1px 1px 1px 3px;
}

.ice-cal-event-dot {
	position: absolute;
	top: 5px;
	right: 5px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--ice-gold);
}

.ice-cal-day-cell.ice-cal-has-event[data-tooltip]:hover::after {
	content: attr( data-tooltip );
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	background: var(--ice-ink);
	color: #ffffff;
	font-size: 11px;
	font-weight: 600;
	padding: 6px 10px;
	border-radius: 6px;
	white-space: nowrap;
	z-index: 20;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	pointer-events: none;
}

.ice-cal-day-cell.ice-cal-has-event[data-tooltip]:hover::before {
	content: '';
	position: absolute;
	bottom: calc(100% + 3px);
	left: 50%;
	transform: translateX(-50%);
	border: 5px solid transparent;
	border-top-color: var(--ice-ink);
	z-index: 20;
	pointer-events: none;
}

/* Important-dates list shown below the grid, in the empty space. */

.ice-cal-events {
	margin: 16px 18px 18px;
	padding-top: 14px;
	border-top: 1px solid var(--ice-border);
}

.ice-cal-events-title {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ice-muted);
	margin-bottom: 10px;
}

.ice-cal-event-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 9px 0;
	border-bottom: 1px dashed #eef1ee;
}

.ice-cal-event-item:last-child {
	border-bottom: none;
}

.ice-cal-event-date {
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	border-radius: 8px;
	background: #fbf5e9;
	border: 1px solid var(--ice-gold);
	display: flex;
	align-items: center;
	justify-content: center;
}

.ice-cal-event-day {
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 14px;
	font-weight: 700;
	color: var(--ice-gold-dark);
}

.ice-cal-event-info {
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.ice-cal-event-name {
	font-size: 13px;
	font-weight: 700;
	color: var(--ice-ink);
}

.ice-cal-event-sub {
	font-size: 11px;
	color: #8a938d;
}

/* Responsive - mobile: sidebar becomes a horizontal scroll strip on top, grid below */

@media (max-width: 720px) {
	.ice-cal-body {
		flex-direction: column;
	}

	.ice-cal-sidebar {
		flex: 1 1 auto;
		max-width: 100%;
		max-height: none;
		border-right: none;
		border-bottom: 1px solid var(--ice-border);
		overflow-x: auto;
		overflow-y: visible;
		padding: 10px 0;
	}

	.ice-cal-sidebar-title {
		padding: 0 14px 8px;
	}

	.ice-cal-month-list {
		flex-direction: row;
		padding: 0 10px;
	}

	.ice-cal-month-item {
		flex-shrink: 0;
		white-space: nowrap;
	}

	.ice-cal-main {
		max-width: 100%;
		padding: 18px 14px;
	}

	.ice-cal-month-header {
		justify-content: center;
		text-align: center;
	}

	.ice-cal-year-bar {
		gap: 14px;
	}
}

@media (max-width: 480px) {
	.ice-cal-day-cell {
		min-height: 44px;
		padding: 6px 2px;
		border-radius: 6px;
	}

	.ice-cal-day-num {
		font-size: 13px;
	}

	.ice-cal-day-greg {
		font-size: 9px;
	}
}
