.cj-calendar,
.cj-calendar * {
	box-sizing: border-box;
}

.cj-calendar {
	--cj-primary: #17324d;
	--cj-secondary: #c39a3a;
	--cj-background: #f8f7f3;
	--cj-border: #ddd;
	--cj-text: #222;

	max-width: 1250px;
	margin: 20px auto;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--cj-text);
}

.cj-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-bottom: 14px;
}

.cj-toolbar button,
.cj-toolbar select,
.cj-location input,
.cj-exports button,
.cj-exports a {
	border: 1px solid var(--cj-border);
	background: #fff;
	border-radius: 6px;
	padding: 6px 9px;
	font-size: 13px;
}

.cj-toolbar button {
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
}

.cj-location {
	position: relative;
	margin-bottom: 14px;
}

.cj-location label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
}

.cj-location-search {
	width: 420px;
	max-width: 100%;
	box-sizing: border-box;
}

.cj-location-results {
	position: absolute;
	top: 65px;
	left: 0;
	z-index: 100;
	width: 420px;
	max-width: 100%;
	background: #fff;
	border: 1px solid var(--cj-border);
	box-shadow: 0 8px 25px rgba(0,0,0,.15);
}

.cj-location-results button {
	display: block;
	width: 100%;
	padding: 7px 9px;
	text-align: left;
	background: #fff;
	border: 0;
	border-bottom: 1px solid #eee;
	cursor: pointer;
}

.cj-location-results button:hover {
	background: #f2f4f6;
}

.cj-selected-location {
	margin-top: 7px;
	font-weight: 600;
	color: var(--cj-primary);
}

.cj-content {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 270px;
	gap: 18px;
	align-items: start;
}

.cj-calendar-grid {
	min-width: 0;
}

.cj-month {
	margin-bottom: 22px;
}

.cj-month h2 {
	color: var(--cj-primary);
	border-bottom: 1px solid var(--cj-secondary);
	padding-bottom: 5px;
	text-transform: capitalize;
}

.cj-month-table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
	background: #fff;
	border: 1px solid var(--cj-border);
	font-size: 13px;
}

.cj-month-table td {
	padding: 5px 7px;
	border-bottom: 1px solid #e6e6e6;
	vertical-align: middle;
	line-height: 1.25;
}

.cj-month-table tr:last-child td {
	border-bottom: 0;
}

.cj-month-table .cj-day-gregorian {
	width: 32%;
	font-weight: 600;
	color: var(--cj-primary);
	white-space: nowrap;
}

.cj-month-table .cj-day-hebrew {
	width: 68%;
	color: var(--cj-text);
	overflow-wrap: anywhere;
	word-break: normal;
}

.cj-month-table .cj-day {
	cursor: pointer;
	transition: background-color .12s ease;
}

.cj-month-table .cj-day:hover,
.cj-month-table .cj-day.is-selected {
	background: #f5f0e5;
}

.cj-zmanim {
	background: #fff;
	border: 1px solid var(--cj-border);
	border-radius: 9px;
	padding: 12px;
	position: sticky;
	top: 20px;
}

.cj-zmanim h3 {
	margin-top: 0;
	color: var(--cj-primary);
}

.cj-zmanim-date {
	font-size: 13px;
	color: #777;
	margin-bottom: 8px;
}

.cj-zman {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 0;
	border-bottom: 1px solid #eee;
	font-size: 13px;
}

.cj-zman strong {
	color: var(--cj-primary);
	white-space: nowrap;
}

.cj-parasha {
	margin-top: 20px;
	padding: 16px;
	border: 1px solid var(--cj-border);
	border-radius: 9px;
	background: #fff;
}

.cj-parasha h3 {
	margin-top: 0;
	color: var(--cj-primary);
}

.cj-kriyah {
	width: 100%;
	border-collapse: collapse;
	margin-top: 12px;
}

.cj-kriyah td {
	padding: 8px;
	border-bottom: 1px solid #eee;
}

.cj-kriyah td:first-child {
	width: 110px;
	font-weight: 600;
}

.cj-exports {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin-top: 25px;
}

.cj-exports button,
.cj-exports a {
	cursor: pointer;
	text-decoration: none;
}

.cj-credit {
	margin-top: 20px;
	color: #777;
	font-size: 12px;
}

.cj-loading {
	padding: 20px;
	text-align: center;
	color: #777;
}

.cj-error {
	padding: 15px;
	border-radius: 6px;
	background: #fbeaea;
	color: #8a1c1c;
}

@media (max-width: 850px) {

	.cj-calendar {
		width: 100%;
		max-width: 100%;
		margin: 16px 0;
		padding: 0 10px;
	}

	.cj-toolbar select,
	.cj-toolbar button,
	.cj-exports button,
	.cj-exports a {
		min-height: 36px;
	}

	.cj-content {
		grid-template-columns: 1fr;
	}

	.cj-zmanim {
		position: static;
	}
}

/* Acabado tradicional v1.1.1: jerarquía visual para Shabat, Rosh Jodesh y festividades. */
.cj-month {
	margin-bottom: 30px;
}

.cj-month h2 {
	margin: 0;
	padding: 8px 12px 7px;
	border: 1px solid var(--cj-primary);
	border-bottom: 3px double var(--cj-secondary);
	border-radius: 7px 7px 0 0;
	background: linear-gradient(to bottom, #fff, #f4f1e8);
	font-family: Georgia, "Times New Roman", serif;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: .02em;
	text-align: center;
	text-transform: capitalize;
}

.cj-month-table {
	border: 1px solid #cfc8b8;
	border-top: 0;
	box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.cj-month-table td {
	padding: 5px 9px;
	border-right: 1px solid #e1ddd3;
	border-bottom: 1px solid #dedad0;
}

.cj-month-table td:last-child {
	border-right: 0;
}

.cj-month-table tr:nth-child(even) td {
	background: #fcfbf8;
}

.cj-month-table .cj-day-gregorian {
	width: 30%;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 13px;
}

.cj-month-table .cj-day-hebrew {
	width: 70%;
	font-size: 13px;
}

.cj-month-table .cj-day.is-shabbat td {
	background: #f3eee1;
	font-weight: 600;
}

.cj-month-table .cj-day.is-shabbat .cj-day-gregorian {
	color: #7a1f1f;
}

.cj-month-table .cj-day.is-holiday td {
	background: #f8ead0;
}

.cj-month-table .cj-day.is-rosh-chodesh td {
	background: #eef3f7;
}

.cj-month-table .cj-day.is-shabbat.is-holiday td {
	background: #f2e3c8;
}

.cj-month-table .cj-day.is-selected td {
	box-shadow: inset 0 0 0 2px var(--cj-secondary);
}

.cj-month-table .cj-day:hover td {
	background: #f7f2e7;
}

.cj-month-table .cj-day.is-shabbat:hover td,
.cj-month-table .cj-day.is-holiday:hover td,
.cj-month-table .cj-day.is-rosh-chodesh:hover td {
	filter: brightness(.985);
}

@media (max-width: 500px) {
	.cj-location-results {
		width: 100%;
	}

	.cj-month {
		margin-bottom: 22px;
	}

	.cj-month h2 {
		padding: 6px 8px;
		font-size: 15px;
	}

	.cj-month-table {
		font-size: 12px;
	}

	.cj-month-table td {
		padding: 4px 6px;
		line-height: 1.2;
	}

	.cj-month-table .cj-day-gregorian {
		width: 33%;
		font-size: 12px;
	}

	.cj-month-table .cj-day-hebrew {
		width: 67%;
		font-size: 12px;
		overflow-wrap: anywhere;
	}
}

@media print {
	.cj-toolbar,
	.cj-location,
	.cj-zmanim,
	.cj-parasha,
	.cj-exports,
	.cj-credit {
		display: none !important;
	}

	.cj-content {
		display: block;
	}

	.cj-month {
		break-inside: avoid;
		page-break-inside: avoid;
		margin-bottom: 18px;
	}
}

/* Indicadores simbólicos discretos: visibles sin aumentar la altura de las filas. */
.cj-day-hebrew {
	position: relative;
}

.cj-day-markers {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-left: 7px;
	vertical-align: middle;
	white-space: nowrap;
}

.cj-day-marker {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 15px;
	height: 15px;
	font-size: 10px;
	line-height: 1;
	border-radius: 50%;
	box-sizing: border-box;
}

.cj-marker-holiday {
	color: #7b5512;
	background: #f4e3b8;
}

.cj-marker-rosh {
	color: #31546b;
	background: #e1ebf1;
}

.cj-marker-parasha {
	color: #5a4b32;
	background: #eee8da;
}

.cj-day.is-shabbat .cj-marker-parasha {
	background: #e5dcc8;
}

@media (max-width: 500px) {
	.cj-day-markers {
		gap: 3px;
		margin-left: 5px;
	}

	.cj-day-marker {
		width: 13px;
		height: 13px;
		font-size: 9px;
	}
}

@media print {
	.cj-day-markers {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}
}

/* Distribución final v1.1.1: cuatro tríadas de meses (3 + 3 + 3 + 3). */
.cj-controls-panel {
	width: 100%;
	margin: 0 auto 16px;
	padding: 8px 10px;
	border: 1px solid var(--cj-border);
	border-radius: 8px;
	background: #fbfaf7;
	box-shadow: 0 1px 2px rgba(0,0,0,.03);
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(230px, .72fr);
	gap: 8px 14px;
	align-items: center;
}

.cj-controls-panel .cj-toolbar {
	margin: 0;
	gap: 5px;
}

.cj-controls-panel .cj-toolbar select,
.cj-controls-panel .cj-toolbar button,
.cj-controls-panel .cj-location input {
	font-size: 12px;
	padding: 5px 8px;
	min-height: 32px;
}

.cj-controls-panel .cj-toolbar button {
	font-size: 18px;
	padding: 3px 8px;
}

.cj-controls-panel .cj-location {
	margin: 0;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 6px;
}

.cj-controls-panel .cj-location label {
	margin: 0;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.cj-controls-panel .cj-location-search {
	width: 100%;
	max-width: none;
}

.cj-controls-panel .cj-selected-location {
	grid-column: 2;
	margin: -1px 0 0;
	font-size: 11px;
}

.cj-controls-panel .cj-location-results {
	top: 39px;
	left: 47px;
	width: calc(100% - 47px);
}

.cj-month-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px 12px;
	align-items: start;
}

.cj-month {
	min-width: 0;
	margin: 0;
}

.cj-month-header {
	min-width: 0;
	border: 1px solid var(--cj-primary);
	border-bottom: 3px double var(--cj-secondary);
	border-radius: 6px 6px 0 0;
	background: linear-gradient(to bottom, #fff, #f4f1e8);
}

.cj-month-title {
	margin: 0;
	padding: 6px 8px 4px;
	border: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 15px;
	line-height: 1.2;
	text-align: center;
	color: var(--cj-primary);
	text-transform: capitalize;
}

.cj-month-legend {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 3px 7px;
	padding: 0 6px 5px;
	font-size: 9px;
	line-height: 1.15;
	color: #655f54;
}

.cj-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	white-space: nowrap;
}

.cj-month-table {
	border-top: 0;
	font-size: 11.5px;
}

.cj-month-table td {
	padding: 3px 5px;
	line-height: 1.15;
}

.cj-month-table .cj-day-gregorian {
	width: 34%;
	font-size: 11.5px;
}

.cj-month-table .cj-day-hebrew {
	width: 66%;
	font-size: 11.5px;
}

.cj-month-legend .cj-day-marker {
	width: 12px;
	height: 12px;
	font-size: 8px;
	flex: 0 0 12px;
}

@media (max-width: 1050px) {
	.cj-month-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 850px) {
	.cj-controls-panel {
		grid-template-columns: 1fr;
		gap: 7px;
	}

	.cj-controls-panel .cj-location {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.cj-controls-panel .cj-selected-location {
		grid-column: 2;
	}

	.cj-controls-panel .cj-location-results {
		top: 39px;
		left: 47px;
		width: calc(100% - 47px);
	}

	.cj-month-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px 10px;
	}
}

@media (max-width: 560px) {
	.cj-controls-panel {
		padding: 7px;
	}

	.cj-controls-panel .cj-toolbar {
		display: grid;
		grid-template-columns: auto minmax(75px, 1fr) auto minmax(85px, 1fr);
		width: 100%;
	}

	.cj-controls-panel .cj-toolbar .cj-language,
	.cj-controls-panel .cj-toolbar .cj-mode {
		min-width: 0;
		width: 100%;
	}

	.cj-controls-panel .cj-location {
		grid-template-columns: 1fr;
	}

	.cj-controls-panel .cj-selected-location {
		grid-column: 1;
	}

	.cj-controls-panel .cj-location-results {
		top: 61px;
		left: 0;
		width: 100%;
	}

	.cj-month-grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.cj-month-title {
		font-size: 14px;
	}

	.cj-month-legend {
		font-size: 8.5px;
	}

	.cj-month-table {
		font-size: 12px;
	}

	.cj-month-table td,
	.cj-month-table .cj-day-gregorian,
	.cj-month-table .cj-day-hebrew {
		font-size: 12px;
	}

	.cj-month-table td {
		padding: 4px 6px;
	}
}

/* Refuerzo de especificidad para que la cabecera compacta sustituya por completo
 * el estilo anterior de .cj-month h2 sin alterar otros encabezados. */
.cj-month .cj-month-title {
	margin: 0;
	padding: 6px 8px 4px;
	border: 0;
	border-bottom: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

@media (max-width: 560px) {
	.cj-month .cj-month-title {
		padding: 5px 7px 4px;
	}
}

/* Ajuste final v1.1.1: distribución compacta para portátiles de 15,4" y similares. */
.cj-calendar {
	container-type: inline-size;
}

/* Mantener las cuatro tríadas (3 meses por fila) cuando el calendario dispone
 * de suficiente anchura real, independientemente de la resolución física de la pantalla. */
@container (min-width: 900px) {
	.cj-month-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 10px 10px;
	}

	.cj-month-table td {
		padding: 2px 4px;
		line-height: 1.08;
	}

	.cj-month-table .cj-day-gregorian,
	.cj-month-table .cj-day-hebrew {
		font-size: 11px;
	}

	.cj-month-title {
		padding: 4px 6px 3px;
		font-size: 14px;
	}

	.cj-month-legend {
		padding: 0 5px 3px;
		gap: 2px 5px;
		font-size: 8px;
	}

	.cj-month-legend .cj-day-marker {
		width: 11px;
		height: 11px;
		flex-basis: 11px;
		font-size: 7px;
	}
}

/* El panel de Zmanim se mantiene compacto para mostrar todos los horarios
 * habituales sin crear grandes huecos verticales. */
.cj-zmanim {
	padding: 8px 10px;
}

.cj-zmanim h3 {
	margin: 0 0 3px;
	font-size: 15px;
	line-height: 1.15;
}

.cj-zmanim-date {
	margin: 0 0 3px;
	font-size: 11px;
	line-height: 1.15;
}

.cj-zman {
	gap: 7px;
	padding: 3px 0;
	font-size: 11px;
	line-height: 1.15;
}

.cj-zman strong {
	font-size: 11px;
}

/* Evita que el ancho del panel lateral fuerce una columna mensual demasiado estrecha. */
@media (min-width: 901px) and (max-width: 1200px) {
	.cj-content {
		grid-template-columns: minmax(0, 1fr) 235px;
		gap: 10px;
	}
}

/* Por debajo de 900px prima la legibilidad sobre las tríadas. */
@media (max-width: 900px) {
	.cj-content {
		grid-template-columns: 1fr;
	}

	.cj-zmanim {
		position: static;
	}
}

/* En móvil las celdas siguen siendo compactas, pero conservan un área táctil razonable. */
@media (max-width: 560px) {
	.cj-month-grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.cj-month-table td {
		padding: 3px 5px;
		line-height: 1.12;
	}

	.cj-month-table .cj-day-gregorian,
	.cj-month-table .cj-day-hebrew {
		font-size: 11.5px;
	}

	.cj-zmanim {
		padding: 7px 9px;
	}

	.cj-zman {
		padding: 3px 0;
	}
}

/* Ajuste final v1.1.1: tipografía compacta, tríadas estables y pie de acciones. */
.cj-calendar h2 {
	font-size: 22px;
	line-height: 1.15;
}

.cj-calendar h3 {
	font-size: 19px;
	line-height: 1.15;
}

/* El ancho real del calendario, y no la resolución física del monitor,
 * determina cuándo caben las tres columnas. Esto evita que un portátil
 * de 15,4" caiga accidentalmente a una columna por un breakpoint global. */
.cj-calendar-grid {
	container-type: inline-size;
	min-width: 0;
}

.cj-month-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.cj-month {
	min-width: 0;
	margin-bottom: 0;
}

.cj-month-header {
	min-width: 0;
}

.cj-month .cj-month-title {
	font-size: 22px;
	line-height: 1.08;
	padding: 4px 5px 3px;
}

.cj-month-legend {
	padding: 0 4px 3px;
	gap: 2px 4px;
	font-size: 8px;
	line-height: 1.05;
}

.cj-month-table {
	font-size: 10.5px;
}

.cj-month-table td {
	padding: 2px 3px;
	line-height: 1.05;
}

.cj-month-table .cj-day-gregorian,
.cj-month-table .cj-day-hebrew {
	font-size: 10.5px;
}

.cj-day-markers {
	gap: 2px;
	margin-left: 4px;
}

.cj-day-marker {
	width: 12px;
	height: 12px;
	font-size: 8px;
}

/* Zmanim en dos columnas en el panel lateral: conserva todos los horarios
 * pero evita el gran hueco vertical entre ellos. */
.cj-zmanim {
	padding: 8px;
}

.cj-zmanim h3 {
	margin: 0 0 3px;
	font-size: 19px;
}

.cj-zmanim-date {
	font-size: 11px;
	line-height: 1.15;
	margin: 0 0 4px;
}

.cj-zmanim-content {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 8px;
}

.cj-zman {
	min-width: 0;
	gap: 5px;
	padding: 3px 0;
	font-size: 10.5px;
	line-height: 1.1;
}

.cj-zman strong {
	font-size: 10.5px;
}

/* Pie compacto tipo tabla: acciones + procedencia en una sola banda. */
.cj-footer-panel {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(210px, auto);
	align-items: center;
	gap: 8px;
	margin-top: 10px;
	padding: 5px 7px;
	border: 1px solid var(--cj-border);
	border-radius: 6px;
	background: #fbfaf7;
}

.cj-footer-panel .cj-exports {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	margin: 0;
}

.cj-footer-panel .cj-exports button,
.cj-footer-panel .cj-exports a {
	min-height: 0;
	padding: 4px 7px;
	border-radius: 4px;
	font-size: 10.5px;
	line-height: 1.15;
}

.cj-footer-panel .cj-credit {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 3px;
	margin: 0;
	font-size: 10px;
	line-height: 1.15;
	text-align: right;
}

/* Si el calendario dispone de al menos ~760px reales, tres meses caben
 * incluso cuando el tema de WordPress deja menos ancho que la ventana. */
@container (min-width: 660px) {
	.cj-month-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 8px;
	}
}

@container (min-width: 460px) and (max-width: 659px) {
	.cj-month-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}
}

@container (max-width: 459px) {
	.cj-month-grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}
}

@media (max-width: 850px) {
	.cj-zmanim-content {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cj-footer-panel {
		grid-template-columns: 1fr;
	}

	.cj-footer-panel .cj-credit {
		justify-content: flex-start;
		text-align: left;
	}
}

@media (max-width: 560px) {
	.cj-calendar h2,
	.cj-month .cj-month-title {
		font-size: 22px;
	}

	.cj-calendar h3 {
		font-size: 19px;
	}

	.cj-zmanim-content {
		grid-template-columns: 1fr;
	}

	.cj-footer-panel .cj-exports button,
	.cj-footer-panel .cj-exports a {
		font-size: 10px;
		padding: 4px 6px;
	}
}


/* En ventanas de escritorio amplias, priorizar las cuatro tríadas incluso si
 * el tema de WordPress aplica un contenedor relativamente estrecho. */
@media (min-width: 1100px) {
	.cj-month-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
		gap: 8px !important;
	}
}

/* Botones frontend compactos, manteniendo un área de uso razonable. */
.cj-calendar button,
.cj-calendar a.cj-google-calendar {
	font-size: 11px;
	line-height: 1.15;
}

.cj-controls-panel .cj-toolbar button,
.cj-controls-panel .cj-toolbar select {
	min-height: 28px;
	padding: 4px 7px;
}

.cj-controls-panel .cj-toolbar button {
	font-size: 17px;
	line-height: 1;
}

/* ================================================================
 * AISLAMIENTO VISUAL DEL PLUGIN - v1.1.1
 * Evita que estilos globales del tema o de otros plugins alteren
 * tipografías, tablas, controles o la cuadrícula del calendario.
 * Todo queda deliberadamente limitado al contenedor .cj-calendar.
 * ================================================================ */
.cj-calendar {
	all: initial;
	box-sizing: border-box;
	display: block;
	width: 100%;
	max-width: 1250px;
	margin: 20px auto;
	padding: 0;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 14px;
	line-height: 1.35;
	color: #222;
	text-align: left;
	font-weight: 400;
}

.cj-calendar *,
.cj-calendar *::before,
.cj-calendar *::after {
	box-sizing: border-box;
}

.cj-calendar h1,
.cj-calendar h2,
.cj-calendar h3,
.cj-calendar h4,
.cj-calendar h5,
.cj-calendar h6,
.cj-calendar p,
.cj-calendar ul,
.cj-calendar ol,
.cj-calendar li,
.cj-calendar table,
.cj-calendar tbody,
.cj-calendar thead,
.cj-calendar tr,
.cj-calendar td,
.cj-calendar th,
.cj-calendar form,
.cj-calendar label,
.cj-calendar button,
.cj-calendar input,
.cj-calendar select,
.cj-calendar a {
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
}

.cj-calendar h2 {
	font-size: 22px !important;
	line-height: 1.08 !important;
	font-weight: 700;
}

.cj-calendar h3 {
	font-size: 19px !important;
	line-height: 1.12 !important;
	font-weight: 700;
}

.cj-calendar h4 { font-size: 16px !important; }
.cj-calendar h5 { font-size: 14px !important; }

.cj-calendar p { margin-top: 0; }

/* La cuadrícula anual siempre dispone de todo el ancho posible del
 * calendario. El sidebar de Zmanim no puede reducirla por debajo del
 * umbral necesario para las tres columnas en escritorio. */
.cj-calendar .cj-content {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) minmax(220px, 250px) !important;
	gap: 10px !important;
	align-items: start;
}

.cj-calendar .cj-calendar-grid {
	width: 100% !important;
	min-width: 0 !important;
	max-width: none !important;
	container-type: inline-size;
}

.cj-calendar .cj-month-grid {
	display: grid !important;
	width: 100% !important;
	max-width: none !important;
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: 8px !important;
	align-items: start !important;
}

.cj-calendar .cj-month {
	display: block !important;
	width: auto !important;
	min-width: 0 !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.cj-calendar .cj-month-title {
	display: block !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 4px 5px 3px !important;
	font-size: 22px !important;
	line-height: 1.08 !important;
}

.cj-calendar .cj-month-table {
	display: table !important;
	width: 100% !important;
	max-width: none !important;
	min-width: 0 !important;
	table-layout: fixed !important;
	border-collapse: collapse !important;
	border-spacing: 0 !important;
	font-size: 11.5px !important;
	line-height: 1.08 !important;
}

.cj-calendar .cj-month-table tbody {
	display: table-row-group !important;
}

.cj-calendar .cj-month-table tr {
	display: table-row !important;
	height: auto !important;
	min-height: 0 !important;
}

.cj-calendar .cj-month-table td {
	display: table-cell !important;
	padding: 2px 4px !important;
	margin: 0 !important;
	font-size: 11.5px !important;
	line-height: 1.08 !important;
	vertical-align: middle !important;
	white-space: normal;
}

.cj-calendar .cj-month-table .cj-day-gregorian {
	width: 34% !important;
	font-size: 11.5px !important;
	font-weight: 600 !important;
	white-space: nowrap !important;
}

.cj-calendar .cj-month-table .cj-day-hebrew {
	width: 66% !important;
	font-size: 11.5px !important;
	white-space: nowrap !important;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Controles aislados: el tema no puede agrandarlos o aplicar estilos
 * globales de botones/formularios. */
.cj-calendar .cj-controls-panel,
.cj-calendar .cj-controls-panel * {
	font-size: 12px !important;
	line-height: 1.2 !important;
}

.cj-calendar .cj-controls-panel button,
.cj-calendar .cj-controls-panel select,
.cj-calendar .cj-controls-panel input {
	appearance: auto;
	-webkit-appearance: auto;
	font-size: 12px !important;
	line-height: 1.2 !important;
	min-height: 28px !important;
	max-height: 34px;
	padding: 4px 7px !important;
	margin: 0 !important;
	border-width: 1px !important;
}

.cj-calendar .cj-controls-panel label {
	font-size: 12px !important;
	line-height: 1.2 !important;
	margin: 0 !important;
}

.cj-calendar .cj-location-results button {
	width: 100% !important;
	min-height: 0 !important;
	max-height: none !important;
	padding: 6px 8px !important;
	font-size: 12px !important;
	line-height: 1.2 !important;
	margin: 0 !important;
}

/* Zmanim compacto y protegido frente a márgenes tipográficos del tema. */
.cj-calendar .cj-zmanim,
.cj-calendar .cj-zmanim * {
	font-family: inherit;
}

.cj-calendar .cj-zmanim {
	width: 100% !important;
	min-width: 0 !important;
	padding: 7px 8px !important;
	margin: 0 !important;
}

.cj-calendar .cj-zmanim h3 {
	margin: 0 0 2px !important;
	padding: 0 !important;
	font-size: 19px !important;
	line-height: 1.1 !important;
}

.cj-calendar .cj-zmanim-date {
	margin: 0 0 3px !important;
	padding: 0 !important;
	font-size: 11px !important;
	line-height: 1.1 !important;
}

.cj-calendar .cj-zmanim-content {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	column-gap: 8px !important;
}

.cj-calendar .cj-zman {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 2px 0 !important;
	font-size: 10.5px !important;
	line-height: 1.08 !important;
}

.cj-calendar .cj-zman strong {
	font-size: 10.5px !important;
	line-height: 1.08 !important;
	white-space: nowrap !important;
}

/* Pie completamente aislado. */
.cj-calendar .cj-footer-panel,
.cj-calendar .cj-footer-panel * {
	font-size: 10.5px !important;
	line-height: 1.15 !important;
}

.cj-calendar .cj-footer-panel button,
.cj-calendar .cj-footer-panel a {
	font-size: 10.5px !important;
	line-height: 1.15 !important;
	padding: 4px 7px !important;
	min-height: 0 !important;
	margin: 0 !important;
}

/* Los temas suelen imponer display:block, width:100%, margins o font-size
 * a las tablas. Estas reglas devuelven al calendario su comportamiento propio. */
.cj-calendar table {
	border-spacing: 0 !important;
}

.cj-calendar a {
	text-decoration: none;
}

.cj-calendar button {
	cursor: pointer;
}

/* Desktop: tres meses por fila. El breakpoint se refiere al ancho del
 * viewport y se refuerza con la regla de contenedor siguiente. */
@media (min-width: 901px) {
	.cj-calendar .cj-month-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

/* Si el tema deja al contenido por debajo de 900px, seguimos priorizando
 * las tríadas mientras cada columna conserve 190px de ancho. */
@container (min-width: 570px) {
	.cj-calendar .cj-month-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

@container (min-width: 430px) and (max-width: 569px) {
	.cj-calendar .cj-month-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@container (max-width: 429px) {
	.cj-calendar .cj-month-grid {
		grid-template-columns: 1fr !important;
	}
}

@media (max-width: 900px) {
	.cj-calendar .cj-content {
		grid-template-columns: 1fr !important;
	}

	.cj-calendar .cj-zmanim {
		position: static !important;
	}
}

@media (max-width: 560px) {
	.cj-calendar {
		margin: 12px 0 !important;
		padding: 0 8px !important;
		font-size: 14px !important;
	}

	.cj-calendar .cj-month-table td,
	.cj-calendar .cj-month-table .cj-day-gregorian,
	.cj-calendar .cj-month-table .cj-day-hebrew {
		font-size: 12px !important;
		line-height: 1.12 !important;
	}

	.cj-calendar .cj-month-table td {
		padding: 3px 5px !important;
	}

	.cj-calendar .cj-month-title {
		font-size: 22px !important;
	}

	.cj-calendar .cj-zmanim-content {
		grid-template-columns: 1fr !important;
	}
}
