/* Prayer Times Table: styled after the printed Moorlands timetable */

.ptt {
	--ptt-bg: #dbeaca;
	--ptt-purple: #5a2d50;
	--ptt-row: #d5eac4;
	--ptt-jumuah: #72ac47;
	--ptt-today: #ffe58a;
	--ptt-line: #1d1d1b;
	margin-top: 1.5em;
	margin-bottom: 1.5em;
	max-width: 100%;
}

/* ---------- Month picker + download button ---------- */
.ptt .ptt-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: .6em;
	margin: 0 auto 1em;
	max-width: 820px;
}
.ptt .ptt-controls label { font-weight: 700; }
.ptt .ptt-select {
	/* Our own arrow, so it shows whatever the theme does to dropdowns */
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	min-width: 11em;
	height: auto;
	margin: 0;
	padding: .5em 2.4em .5em .8em;
	font: inherit;
	line-height: 1.3;
	color: #1d1d1b !important;
	background-color: #fff !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235a2d50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right .85em center !important;
	background-size: 12px 8px !important;
	border: 1px solid #888 !important;
	border-radius: 4px;
	box-shadow: none;
	cursor: pointer;
}
.ptt .ptt-select::-ms-expand { display: none; }
.ptt .ptt-pdf {
	padding: .55em 1.1em;
	font: inherit;
	font-weight: 700;
	line-height: 1.3;
	color: #fff !important;
	background: var(--ptt-purple) !important;
	border: 0 !important;
	box-shadow: none;
	text-shadow: none;
	border-radius: 4px;
	cursor: pointer;
}
.ptt .ptt-pdf:hover { filter: brightness(1.15); }
.ptt .ptt-pdf:focus-visible,
.ptt .ptt-select:focus-visible { outline: 3px solid #f9b52c; outline-offset: 2px; }
.ptt .ptt-pdf[disabled] { opacity: .7; cursor: progress; }

/* Admin-only reload button */
.ptt .ptt-admin { display: flex; flex-wrap: wrap; gap: .6em; align-items: center; justify-content: center; margin: -.4em auto 1em; font-size: .85em; color: #555; }
.ptt .ptt-admin button.ptt-reload {
	padding: .4em .9em;
	font: inherit;
	line-height: 1.3;
	color: #5a2d50 !important;            /* fixed colours: themes often make button text white */
	background: #fff !important;
	border: 1px solid #5a2d50 !important;
	border-radius: 4px;
	box-shadow: none;
	text-shadow: none;
	cursor: pointer;
}
.ptt .ptt-admin button.ptt-reload:hover { color: #fff !important; background: #5a2d50 !important; }
.ptt .ptt-qr-hint {
	display: block;
	max-width: 150px;
	padding: 8px;
	font-size: 12px;
	line-height: 1.35;
	text-align: center;
	color: #5a2d50;
	background: #fff;
	border: 2px dashed #5a2d50;
	text-decoration: none;
}

/* ---------- The sheet ---------- */
.ptt .ptt-stage { container-type: inline-size; }

.ptt .ptt-sheet {
	box-sizing: border-box;
	max-width: 820px;
	margin: 0 auto;
	padding: 26px 26px 20px;
	background: var(--ptt-bg);
	color: #1d1d1b;
	font-family: Arial, Helvetica, sans-serif;
	line-height: 1.2;
}
.ptt .ptt-sheet[hidden] { display: none; }
.ptt .ptt-sheet p { margin: 0; text-indent: 0; }
.ptt .ptt-sheet .ptt-notes p { text-align: center; }

.ptt .ptt-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
}
.ptt .ptt-logo { display: block; width: 58%; height: auto; margin-top: 3%; }
.ptt .ptt-emblem { display: block; width: 22%; height: auto; }

.ptt .ptt-hijri,
.ptt .ptt-greg-title {
	color: var(--ptt-purple);
	font-weight: 700;
	font-size: 20px;
	margin: 8px 0 4px;
}

/* ---------- Table ---------- */
.ptt .ptt-table-wrap { margin: 0; }
.ptt .ptt-table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	border-spacing: 0;
	table-layout: fixed;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 16px;
	background: transparent;
}
.ptt .ptt-table th,
.ptt .ptt-table td {
	padding: 3px 2px;
	border: 1px solid var(--ptt-line);
	text-align: center;
	vertical-align: middle;
	line-height: 1.25;
	background: #fff;
	color: #1d1d1b;
	white-space: nowrap;
}
.ptt .ptt-table th { font-weight: 700; }

/* "June 2026" sits in the empty corner above Date / Hijri, like the printed sheet */
.ptt .ptt-table th.ptt-greg {
	background: var(--ptt-bg);
	border: 0;
	border-bottom: 1px solid var(--ptt-line);
	color: var(--ptt-purple);
	font-size: 16px;
	text-align: left;
	padding: 0 0 4px;
	vertical-align: bottom;
}
.ptt .ptt-table .ptt-sep { border-left-width: 2px; }
.ptt .ptt-table .ptt-bands th:not(.ptt-greg) { border-top-width: 2px; }
.ptt .ptt-table .ptt-bands th:last-child,
.ptt .ptt-table td:last-child,
.ptt .ptt-table .ptt-cols th:last-child { border-right-width: 2px; }
.ptt .ptt-table tbody tr:last-child td { border-bottom-width: 2px; }
.ptt .ptt-table .ptt-cols th:first-child,
.ptt .ptt-table td:first-child { border-left-width: 2px; }

.ptt .ptt-table .ptt-cols th { font-size: .92em; padding-left: 1px; padding-right: 1px; }
.ptt .ptt-table tr.ptt-full td { background: var(--ptt-row); }
.ptt .ptt-table td.ptt-jumuah { background: var(--ptt-jumuah); }
.ptt .ptt-table tr.ptt-today td { background: var(--ptt-today); font-weight: 700; }
.ptt .ptt-table tr.ptt-today td.ptt-jumuah,
.ptt .ptt-table tr.ptt-full td.ptt-jumuah { background: var(--ptt-jumuah); } /* Friday colour wins over row shading */

/* Jumu'ah times under the monthly table */
.ptt .ptt-jumuah-info {
	margin: 14px 0 0;
	padding: 8px 12px;
	border: 2px solid var(--ptt-purple);
	background: #fff;
	color: var(--ptt-purple);
	text-align: center;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 16px;
	line-height: 1.45;
}
.ptt .ptt-jumuah-info {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: stretch;
}
/* Each line is centred both ways, whatever the theme does to paragraphs */
.ptt .ptt-sheet .ptt-jumuah-info .ptt-j-line {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	column-gap: 6px;
	row-gap: 0;
	margin: 0 !important;
	padding: 0;
	text-align: center !important;
	text-indent: 0;
	line-height: 1.45;
}
.ptt .ptt-jumuah-info .ptt-j-line > span { display: inline-block; vertical-align: middle; }
.ptt .ptt-sheet .ptt-jumuah-info .ptt-j-line + .ptt-j-line { border-top: 1px dashed #b9a3b4; margin-top: 4px !important; padding-top: 4px; }
.ptt .ptt-jumuah-info .ptt-j-title { font-weight: 700; unicode-bidi: isolate; }
.ptt .ptt-jumuah-info .ptt-j-title bdi { display: inline-block; line-height: 1; vertical-align: middle; }
.ptt .ptt-jumuah-info .ptt-j-when { font-weight: 700; color: #6b5a68; unicode-bidi: isolate; }
.ptt .ptt-jumuah-info b { color: #1d1d1b; font-weight: 700; }

/* ---------- Footer ---------- */
.ptt .ptt-foot {
	display: flex;
	align-items: flex-end;
	gap: 16px;
	margin-top: 22px;
	color: var(--ptt-purple);
}
.ptt .ptt-notes { flex: 1; text-align: center; }
.ptt .ptt-note { font-weight: 700; font-size: 18px; color: #6b5a68; }
.ptt .ptt-note2 { font-weight: 700; font-size: 14px; color: #6b5a68; margin-top: 2px; }
.ptt .ptt-contact {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 26px;
	font-weight: 700;
	font-style: italic;
	font-size: 16px;
}
.ptt .ptt-contact a,
.ptt .ptt-contact span { color: var(--ptt-purple); text-decoration: none; }
.ptt .ptt-contact a:hover { text-decoration: underline; }

.ptt .ptt-donate {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	color: var(--ptt-purple);
	text-decoration: none;
	font-family: "Brush Script MT", "Segoe Script", cursive;
	font-size: 15px;
}
.ptt .ptt-qr {
	display: block;
	width: 92px;
	height: 92px;
	padding: 5px;
	background: #fff;
}
.ptt .ptt-qr img,
.ptt .ptt-qr canvas { display: block; width: 100% !important; height: 100% !important; }

/* ---------- Narrow screens (phones) ---------- */
@container (max-width: 759px) {
	.ptt .ptt-sheet { padding: 14px 10px 14px; }
	.ptt .ptt-hijri, .ptt .ptt-greg-title { font-size: 16px; }
	.ptt .ptt-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
	.ptt .ptt-table { width: 700px; font-size: 15px; }
	.ptt .ptt-table th.ptt-greg { font-size: 15px; }
	/* keep the Date column in view while scrolling sideways */
	.ptt .ptt-table td:first-child,
	.ptt .ptt-table .ptt-cols th:first-child { position: sticky; left: 0; z-index: 1; box-shadow: 2px 0 0 var(--ptt-line); }
	.ptt .ptt-foot { flex-direction: column; align-items: center; }
	.ptt .ptt-note { font-size: 14px; }
	.ptt .ptt-note2 { font-size: 12px; }
	.ptt .ptt-contact { flex-direction: column; align-items: center; gap: 4px; margin-top: 12px; font-size: 14px; }
}

/* ---------- Printing (fallback for the PDF button) ---------- */
@media print {
	.ptt .ptt-controls, .ptt .ptt-admin { display: none; }
	.ptt .ptt-sheet { max-width: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* =====================================================================
   [prayer_times_today]: today's times for the home page
   ===================================================================== */
.ptt-today {
	--pttd-text: #3c4858;
	--pttd-line: #1d1d1b;
	--pttd-head: #b6d9a0;
	--pttd-now: #f5fa96;
	--pttd-green: #138a13;
	--pttd-purple: #5a2d50;
	box-sizing: border-box;
	max-width: 760px;
	margin: 1.5em auto;
	color: var(--pttd-text);
	border: 1px solid var(--pttd-line);
	background: #fff;
	text-align: center;
	line-height: 1.3;
}
.ptt-today p { margin: 0; }
.ptt-today .ptt-today-head { padding: 14px 12px 12px; }
.ptt-today .ptt-today-date { font-weight: 700; font-size: 1.05em; }
.ptt-today .ptt-nowrap { white-space: nowrap; }
.ptt-today .ptt-today-label { font-weight: 700; font-size: 1.05em; margin-top: 4px; }
.ptt-today .ptt-today-time { font-size: 2.6em; font-weight: 500; line-height: 1.15; margin: 8px 0 12px; }
.ptt-today .ptt-today-countdown { color: var(--pttd-green); font-weight: 700; font-size: 1.05em; min-height: 1.3em; font-variant-numeric: tabular-nums; }

.ptt-today .ptt-today-table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	border-spacing: 0;
	table-layout: fixed;
	font-size: 1em;
	background: #fff;
}
.ptt-today .ptt-today-table th,
.ptt-today .ptt-today-table td {
	padding: 9px 6px;
	border: 1px solid var(--pttd-line);
	text-align: center;
	vertical-align: middle;
	color: var(--pttd-text);
	background: #fff;
}
.ptt-today .ptt-today-table tr > :first-child { border-left: 0; }
.ptt-today .ptt-today-table tr > :last-child { border-right: 0; }
.ptt-today .ptt-today-table tbody tr:last-child > * { border-bottom: 0; }
.ptt-today .ptt-today-table thead th { background: var(--pttd-head); font-weight: 700; }
.ptt-today .ptt-today-table tbody th { font-weight: 700; }
.ptt-today .ptt-today-table .ptt-begin { font-weight: 400; }
.ptt-today .ptt-today-table .ptt-iqamah { font-weight: 700; }
.ptt-today .ptt-today-table .ptt-tomorrow-col { background: #f6f6f2; }
.ptt-today .ptt-today-table thead .ptt-tomorrow-col { background: #d6e9c6; }
.ptt-today .ptt-today-table .ptt-muted { color: #999; }
.ptt-today .ptt-today-table tr.ptt-now > * { background: var(--pttd-now); font-weight: 700; }
.ptt-today .ptt-today-table tr.ptt-jumuah-row > * { background: #efe6ee; }
.ptt-today .ptt-today-table tr.ptt-jumuah-row.ptt-now > * { background: var(--pttd-now); }
.ptt-today .ptt-today-table .ptt-coming small { color: #6b6b6b; font-weight: 400; }
.ptt-today .ptt-today-table .ptt-sub { display: block; font-size: .75em; font-weight: 400; color: #777; }
.ptt-today .ptt-changed { color: var(--pttd-purple); font-weight: 700; text-decoration: underline dotted; text-underline-offset: 3px; }
.ptt-today .ptt-today-table td.ptt-changed { background: #f1e6ee; }
.ptt-today .ptt-today-table th {
	white-space: normal !important;      /* some themes stop headings wrapping */
	overflow-wrap: normal;
	word-break: normal;
}
.ptt-today .ptt-label-short { display: none; }

@media (max-width: 520px) {
	.ptt-today { font-size: 14px; }
	.ptt-today .ptt-today-time { font-size: 2.2em; }
	.ptt-today .ptt-today-table th,
	.ptt-today .ptt-today-table td { padding: 8px 3px; }
	.ptt-today .ptt-today-table tbody th { font-size: .92em; }
	.ptt-today .ptt-today-table { font-size: .95em; }
	.ptt-today .ptt-today-table thead th { font-size: .85em; padding-left: 2px; padding-right: 2px; }
	.ptt-today .ptt-label-long { display: none; }
	.ptt-today .ptt-label-short { display: inline; }
	/* Arabic name on its own line under the English */
	.ptt-today .ptt-today-table .ptt-slash { display: none; }
	.ptt-today .ptt-today-table .ptt-ar { display: block; font-weight: 600; font-size: .95em; margin-top: 1px; }
	.ptt-today .ptt-today-table td { white-space: nowrap; font-size: .9em; letter-spacing: -.01em; }
}
