/**
 * Calendar options form.
 *
 * Numbered cards, a dashed upload area, cover tiles and a summary bar that holds
 * the total together with WooCommerce's own add-to-cart button.
 *
 * Written with logical properties (inline-start/end) so the same file works in
 * the Hebrew RTL store and in any LTR theme without a second stylesheet.
 */

/*
 * The block sits inside form.cart, next to .quantity and the add-to-cart button.
 * Many themes lay that form out as a flex row or a grid, which would line the
 * button up beside the fields instead of below them. Claiming a full row here
 * pushes the summary bar onto its own line, whatever the theme does.
 */
form.cart:has(.itim-cal-form) {
	flex-wrap: wrap !important;
	align-items: flex-start;
}

.itim-cal-form,
.itim-cal-cta {
	flex: 0 0 100% !important;
	grid-column: 1 / -1;
	inline-size: 100%;
	max-inline-size: 100%;
}

.itim-cal-form {
	--itim-accent: #a4161a;
	--itim-accent-dark: #7d1114;
	--itim-border: #e4e4e7;
	--itim-muted: #6f6f78;
	--itim-bg-card: #fafafb;
	--itim-radius: 10px;

	margin-block: 1.5em 0;
	text-align: start;
	font-size: 15px;
	line-height: 1.6;
}

.itim-cal-form__title {
	margin-block: 0 0.75em;
	font-size: 1.15em;
}

/* ---------------------------------------------------------- כרטיס בלוק */

.itim-cal-card {
	margin-block-end: 1em;
	padding: 1.1em 1.25em 1.25em;
	border: 1px solid var(--itim-border);
	border-radius: var(--itim-radius);
	background: var(--itim-bg-card);
}

.itim-cal-card__title {
	display: flex;
	align-items: center;
	gap: 0.55em;
	margin-block: 0 0.9em;
	font-size: 1.02em;
	font-weight: 700;
	line-height: 1.3;
}

.itim-cal-step {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 1.6em;
	block-size: 1.6em;
	flex: 0 0 auto;
	border-radius: 50%;
	background: var(--itim-accent);
	color: #fff;
	font-size: 0.82em;
	font-weight: 700;
	line-height: 1;
}

.itim-cal-group__desc {
	margin-block: 0 0.8em;
	color: var(--itim-muted);
	font-size: 0.9em;
}

/* ----------------------------------------------------------------- שדות */

.itim-cal-field {
	margin-block: 0.9em 0;
}

.itim-cal-label {
	display: block;
	margin-block-end: 0.35em;
	font-size: 0.95em;
	font-weight: 500;
}

.itim-cal-label .required,
.itim-cal-question .required {
	margin-inline-start: 0.2em;
	color: var(--itim-accent);
	border: 0;
	text-decoration: none;
}

.itim-cal-input {
	display: block;
	inline-size: 100%;
	padding: 0.7em 0.85em;
	border: 1px solid var(--itim-border);
	border-radius: 8px;
	background: #fff;
	color: inherit;
	font: inherit;
	line-height: 1.4;
}

.itim-cal-input:focus {
	border-color: var(--itim-accent);
	outline: 2px solid rgba(0, 0, 0, 0.12);
	outline-offset: 0;
}

.itim-cal-input--narrow {
	max-inline-size: 9em;
}

.itim-cal-input--tiny {
	max-inline-size: 7em;
}

.itim-cal-note {
	display: block;
	margin-block-start: 0.35em;
	font-size: 0.88em;
}

.itim-cal-note:not(:empty) {
	color: var(--itim-accent);
	font-weight: 600;
}

/* ------------------------------------------------------- שאלות כן / לא */

.itim-cal-question {
	margin-block: 1.1em 0.4em;
	font-size: 0.97em;
	font-weight: 500;
}

.itim-cal-question:first-of-type {
	margin-block-start: 0;
}

.itim-cal-question__price {
	color: var(--itim-muted);
	font-weight: 400;
	white-space: nowrap;
}

/* --------------------------------------------------------------- דוגמה */

.itim-cal-example {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75em 1em;
	margin-block: 0 0.9em;
	padding: 0.75em 0.9em;
	border: 1px solid var(--itim-border);
	border-radius: 8px;
	background: #fff;
}

.itim-cal-form button.itim-cal-example__figure {
	display: flex;
	align-items: center;
	gap: 0.6em;
	inline-size: auto !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	font: inherit;
	cursor: zoom-in;
}

.itim-cal-example__img {
	display: block;
	inline-size: auto;
	max-inline-size: 6em;
	max-block-size: 5em;
	border: 1px solid var(--itim-border);
	border-radius: 5px;
	object-fit: cover;
}

.itim-cal-example__caption {
	color: var(--itim-muted);
	font-size: 0.88em;
	text-decoration: underline;
}

.itim-cal-example__file {
	margin-inline-start: auto;
	font-size: 0.9em;
	font-weight: 600;
}

/* ---------------------------------------------- בורר העמודים המוכנים */

.itim-cal-design-preview {
	display: inline-block;
	margin-block-start: 0.5em;
}

.itim-cal-form button.itim-cal-design-preview__btn {
	inline-size: auto !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	cursor: zoom-in;
}

.itim-cal-design-preview__btn img {
	display: block;
	max-inline-size: 7em;
	border: 1px solid var(--itim-border);
	border-radius: 5px;
}

/* --------------------------------------------------------------- בונוס */

.itim-cal-bonus {
	margin-block: 0 1.1em;
	padding: 1em 1.1em;
	border: 2px solid #0a7d28;
	border-radius: 9px;
	background: #f4fbf5;
}

.itim-cal-bonus__title {
	display: flex;
	align-items: center;
	gap: 0.4em;
	margin-block: 0 0.35em;
	color: #0a7d28;
	font-size: 1em;
	font-weight: 700;
}

.itim-cal-bonus__title::before {
	content: "🎁";
	font-size: 1.1em;
}

.itim-cal-bonus__note {
	margin-block: 0 0.8em;
	color: #4a4a52;
	font-size: 0.88em;
}

.itim-cal-bonus .itim-cal-page {
	margin-block-end: 0.75em;
	border-color: #bfe3c6;
	background: #fff;
}

.itim-cal-bonus .itim-cal-page:last-child {
	margin-block-end: 0;
}

.itim-cal-page__badge {
	margin-inline-start: auto;
	padding: 0.2em 0.6em;
	border-radius: 999px;
	background: #0a7d28;
	color: #fff;
	font-size: 0.75em;
	font-weight: 700;
}

.itim-cal-free-note {
	margin-block: 0 0.5em;
	color: #0a7d28;
	font-size: 0.9em;
	font-weight: 600;
}

.itim-cal-yesno {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5em;
	margin-block: 0.35em 0;
}

.itim-cal-yesno label {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	cursor: pointer;
}

/* ------------------------------------------------ בורר עם חיפוש ברשימה */

/*
 * Themes routinely style bare elements, and a rule like `.entry-content p` beats
 * the UA's `[hidden]` on specificity — which is how a hidden message ends up on
 * screen. Inside this form, hidden means hidden.
 */
.itim-cal-form [hidden] {
	display: none !important;
}

.itim-cal-picker {
	position: relative;
	display: block;
}

/*
 * The select still carries the name, the value and the required marker, so it has
 * to stay a rendered field: display:none would take it out of the missing-fields
 * check along with the form data.
 */
.itim-cal-picker > select {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	margin: 0;
	padding: 0;
	border: 0;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
	clip-path: inset(50%);
}

.itim-cal-form button.itim-cal-picker__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5em;
	inline-size: 100% !important;
	margin: 0;
	padding: 0.65em 0.85em !important;
	border: 1px solid var(--itim-border) !important;
	border-radius: 8px !important;
	background: #fff !important;
	color: inherit !important;
	font: inherit;
	font-weight: 400 !important;
	text-align: start;
	text-decoration: none;
	cursor: pointer;
}

.itim-cal-form button.itim-cal-picker__toggle::after {
	content: "";
	flex: 0 0 auto;
	inline-size: 0.55em;
	block-size: 0.55em;
	margin-block-start: -0.25em;
	border-inline-end: 2px solid #6b6b73;
	border-block-end: 2px solid #6b6b73;
	transform: rotate(45deg);
}

.itim-cal-form button.itim-cal-picker__toggle:hover,
.itim-cal-form button.itim-cal-picker__toggle:focus {
	border-color: var(--itim-accent) !important;
}

.itim-cal-picker__toggle--empty .itim-cal-picker__label {
	color: #77777f;
}

.itim-cal-picker__label {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.itim-cal-picker__panel {
	position: absolute;
	z-index: 30;
	inset-block-start: calc(100% + 0.3em);
	inset-inline: 0;
	padding: 0.6em;
	border: 1px solid var(--itim-border);
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}

.itim-cal-picker__search {
	inline-size: 100%;
	margin-block-end: 0.5em;
	padding: 0.55em 0.75em;
	border: 1px solid var(--itim-border);
	border-radius: 8px;
	background: #fff;
	font: inherit;
	box-sizing: border-box;
}

.itim-cal-picker__search:focus {
	border-color: var(--itim-accent);
	outline: none;
}

.itim-cal-picker__search::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
}

.itim-cal-picker__list {
	max-block-size: 15em;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	list-style: none;
	overscroll-behavior: contain;
}

.itim-cal-picker__item {
	margin: 0;
	padding: 0.5em 0.6em;
	border-radius: 6px;
	cursor: pointer;
	list-style: none;
}

.itim-cal-picker__item:hover,
.itim-cal-picker__item.is-active {
	background: #f2f2f4;
}

.itim-cal-picker__item.is-chosen {
	color: var(--itim-accent);
	font-weight: 600;
}

.itim-cal-picker__none {
	margin: 0.4em 0.2em 0.2em;
	color: var(--itim-accent);
	font-size: 0.87em;
}

/* -------------------------------------------------------- שורות עותקים */

/* Same card as a colored page: a numbered heading, then the fields. */
.itim-cal-copy {
	margin-block-end: 0.9em;
	padding: 0.9em 1em;
	border: 1px solid var(--itim-border);
	border-radius: 8px;
	background: var(--itim-bg-card);
}

.itim-cal-copy__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	margin-block-end: 0.5em;
}

.itim-cal-copy__num {
	flex: 1 1 auto;
	min-inline-size: 0;
	font-weight: 700;
	white-space: nowrap;
}

.itim-cal-copy__body {
	display: grid;
	gap: 0.9em;
}

@media (min-width: 700px) {
	.itim-cal-copy__body {
		grid-template-columns: 2fr 1fr;
		align-items: start;
	}
}

.itim-cal-copy__field {
	min-inline-size: 0;
}

.itim-cal-copy__field--qty .itim-cal-input {
	inline-size: 100%;
}

.itim-cal-copy .itim-cal-label {
	display: block;
	margin-block-end: 0.25em;
	font-size: 0.85em;
	font-weight: 500;
}

.itim-cal-conditional {
	margin-block-start: 0.9em;
	padding: 0.9em 1em;
	border: 1px solid var(--itim-border);
	border-radius: 8px;
	background: #fff;
}

/* --------------------------------------------------------------- כריכות */

.itim-cal-covers {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
	gap: 0.75em;
	margin-block: 0.5em 0;
}

.itim-cal-cover {
	position: relative;
	display: block;
	padding: 0.5em;
	border: 2px solid var(--itim-border);
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.itim-cal-cover input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.itim-cal-cover__frame {
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	border-radius: 4px;
	background: #d9d9dd;
}

.itim-cal-cover__frame img,
.itim-cal-cover__img {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
}

.itim-cal-cover__placeholder {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	background: #d9d9dd;
}

.itim-cal-cover__own {
	color: var(--itim-muted);
	font-size: 2em;
	line-height: 1;
}

.itim-cal-cover.is-selected {
	border-color: var(--itim-accent);
	box-shadow: 0 0 0 1px var(--itim-accent);
}

.itim-cal-cover__name {
	display: block;
	margin-block-start: 0.5em;
	font-size: 0.85em;
	line-height: 1.3;
	text-align: center;
}

/*
 * A hint that the picture enlarges, not a control: the whole tile is one click
 * target, so the icon must never swallow the click.
 */
.itim-cal-cover__zoom {
	position: absolute;
	inset-block-start: 0.75em;
	inset-inline-end: 0.75em;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	inline-size: 1.9em;
	block-size: 1.9em;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: #1d1d1f;
	font-size: 0.95em;
	line-height: 1;
	pointer-events: none;
	opacity: 0.75;
	transition: opacity 0.15s ease;
}

.itim-cal-cover:hover .itim-cal-cover__zoom {
	opacity: 1;
}

.itim-cal-cover[data-itim-cover-full] {
	cursor: zoom-in;
}

.itim-cal-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	/* The arrows sit either side of the picture, so the row has to space them. */
	gap: 0.75em;
	padding: 2.5em 1.25em;
	background: rgba(15, 15, 18, 0.88);
	cursor: zoom-out;
}

.itim-cal-lightbox[hidden] {
	display: none;
}

.itim-cal-lightbox__figure {
	margin: 0;
	max-inline-size: 100%;
	max-block-size: 100%;
	text-align: center;
}

.itim-cal-lightbox__img {
	display: block;
	max-inline-size: min(92vw, 1100px);
	max-block-size: 82vh;
	margin-inline: auto;
	border-radius: 6px;
	background: #fff;
	object-fit: contain;
	cursor: default;
}

.itim-cal-lightbox__caption {
	margin-block-start: 0.9em;
	color: #fff;
	font-size: 1.05em;
	font-weight: 600;
}

.itim-cal-lightbox__close {
	position: absolute;
	inset-block-start: 0.75em;
	inset-inline-end: 1em;
	inline-size: 2.2em;
	block-size: 2.2em;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 1.6em;
	line-height: 1;
	cursor: pointer;
}

.itim-cal-lightbox__close:hover {
	background: rgba(255, 255, 255, 0.3);
}

/* חיצים לדפדוף בין הכריכות */

.itim-cal-lightbox__nav {
	flex: 0 0 auto;
	inline-size: 2.8em;
	block-size: 2.8em;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	cursor: pointer;
	transition: background 0.15s ease;
}

.itim-cal-lightbox__nav:hover {
	background: rgba(255, 255, 255, 0.32);
}

/*
 * Drawn as a rotated corner rather than a character, so it points the same way
 * whatever font the theme loads — and mirrors by itself in an RTL page.
 */
.itim-cal-lightbox__nav::before {
	content: "";
	display: block;
	inline-size: 0.8em;
	block-size: 0.8em;
	margin-inline: auto;
	border-inline-start: 3px solid currentColor;
	border-block-start: 3px solid currentColor;
}

.itim-cal-lightbox__nav--prev::before {
	transform: rotate(135deg);
	margin-inline-start: 1.1em;
}

.itim-cal-lightbox__nav--next::before {
	transform: rotate(-45deg);
	margin-inline-end: 1.1em;
}

@media (max-width: 520px) {
	.itim-cal-lightbox__nav {
		inline-size: 2.2em;
		block-size: 2.2em;
	}
}

/* --------------------------------------------------------- בחירה מרשימה */

.itim-cal-choices {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6em;
}

.itim-cal-choice {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.5em 0.9em 0.5em 0.6em;
	border: 2px solid var(--itim-border);
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.itim-cal-choice input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.itim-cal-choice__swatch {
	display: inline-block;
	inline-size: 1.35em;
	block-size: 1.35em;
	flex: 0 0 auto;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 50%;
	background: #d9d9dd;
}

.itim-cal-choice.is-selected {
	border-color: var(--itim-accent);
	box-shadow: 0 0 0 1px var(--itim-accent);
}

/* בורר צבע חופשי */

.itim-cal-colorpick {
	display: flex;
	align-items: center;
	gap: 0.75em;
}

.itim-cal-colorpick__input {
	inline-size: 4em;
	block-size: 2.75em;
	padding: 0.2em;
	border: 1px solid var(--itim-border);
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
}

.itim-cal-colorpick__code {
	padding: 0.35em 0.7em;
	border: 1px solid var(--itim-border);
	border-radius: 6px;
	background: #fff;
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 0.95em;
	letter-spacing: 0.03em;
}

.itim-cal-cover-extras,
.itim-cal-cover-upload {
	margin-block-start: 1em;
	padding: 1em;
	border: 1px solid var(--itim-accent);
	border-radius: 8px;
	background: #fff;
}

.itim-cal-cover-extras__title {
	margin-block: 0 0.6em;
	font-size: 0.97em;
	font-weight: 700;
}

/* --------------------------------------------------------------- העלאה */

.itim-cal-upload {
	margin-block-start: 0.4em;
}

.itim-cal-dropzone {
	/* One line, full width: a wide, shallow target rather than a tall box. */
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.25em 0.6em;
	inline-size: 100%;
	min-block-size: 0;
	padding: 0.85em 1em;
	border: 2px dashed #cdcdd3;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	text-align: center;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.itim-cal-dropzone:hover,
.itim-cal-dropzone.is-dragging {
	border-color: var(--itim-accent);
	background: #fdf6f6;
}

.itim-cal-dropzone .itim-cal-file {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.itim-cal-dropzone__cta {
	font-weight: 600;
}

.itim-cal-dropzone__cta::before {
	content: "📁";
	margin-inline-end: 0.4em;
}

.itim-cal-dropzone__types {
	color: var(--itim-muted);
	font-size: 0.82em;
}

.itim-cal-upload__progress {
	position: relative;
	block-size: 1.6em;
	margin-block-start: 0.5em;
	border-radius: 5px;
	background: #ebebef;
	overflow: hidden;
}

.itim-cal-upload__bar {
	block-size: 100%;
	inline-size: 0;
	background: var(--itim-accent);
	transition: width 0.2s ease;
}

.itim-cal-upload__pct {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.8em;
	font-weight: 600;
}

.itim-cal-upload__file {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6em;
	margin-block-start: 0.5em;
	padding: 0.6em 0.8em;
	border: 1px solid var(--itim-border);
	border-radius: 8px;
	background: #f3f8f3;
}

.itim-cal-upload__name {
	font-weight: 600;
	word-break: break-all;
}

.itim-cal-upload__size {
	color: var(--itim-muted);
	font-size: 0.85em;
}

/*
 * Themes render every <button> inside form.cart as a big primary button, often
 * full width. Reset ours back to plain elements first, then dress each one.
 * The add-to-cart button is untouched: it lives in the summary bar, not here.
 */
.itim-cal-form button {
	inline-size: auto;
	min-inline-size: 0;
	max-inline-size: none;
	box-shadow: none;
	letter-spacing: normal;
	text-transform: none;
	line-height: 1.4;
}

.itim-cal-form button.itim-cal-upload__remove {
	display: inline-block;
	inline-size: auto !important;
	margin: 0;
	margin-inline-start: auto;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	color: var(--itim-accent) !important;
	font: inherit;
	font-size: 0.85em;
	font-weight: 400 !important;
	text-decoration: underline;
	cursor: pointer;
}

.itim-cal-form button.itim-cal-upload__remove:hover {
	background: none !important;
	color: var(--itim-accent-dark) !important;
}

/*
 * The wrapper is what actually keeps the remove button small.
 *
 * Themes ship `.woocommerce form .button { width: 100% !important }` and worse,
 * and no selector this plugin writes is guaranteed to outrank an unknown theme —
 * an id in their selector beats any number of classes here. So the button is not
 * argued with: it is placed in a box that is only as wide as its own content, and
 * "100% wide" then means 100% of that. The rules below still state the intent, and
 * win against the common cases, but the layout no longer depends on winning.
 */
.itim-cal-page__tools,
.itim-cal-copy__tools {
	display: block;
	flex: 0 0 auto;
	inline-size: max-content;
	max-inline-size: 60%;
	margin-inline-start: auto;
}

/*
 * מחיקת שורה: כפתור קטן עם פח, לא קישור
 *
 * Both `width` and `inline-size` are set because a theme may use either.
 */
.itim-cal-form .itim-cal-page__tools button.itim-cal-page__remove,
.itim-cal-form .itim-cal-copy__tools button.itim-cal-copy__remove {
	/* Marked important because themes declare `display: block !important` here. */
	display: inline-flex !important;
	flex: 0 0 auto;
	align-items: center;
	gap: 0.35em;
	width: auto !important;
	inline-size: auto !important;
	min-width: 0 !important;
	min-inline-size: 0 !important;
	max-inline-size: 100%;
	margin: 0;
	margin-inline-start: auto;
	padding: 0.35em 0.7em !important;
	border: 1px solid var(--itim-border) !important;
	border-radius: 6px !important;
	background: #fff !important;
	color: var(--itim-accent) !important;
	font: inherit;
	font-size: 0.82em;
	font-weight: 500 !important;
	white-space: nowrap;
	text-decoration: none;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.itim-cal-form .itim-cal-page__tools button.itim-cal-page__remove::before,
.itim-cal-form .itim-cal-copy__tools button.itim-cal-copy__remove::before {
	content: "🗑";
	font-size: 1.05em;
	line-height: 1;
}

.itim-cal-form .itim-cal-page__tools button.itim-cal-page__remove:hover,
.itim-cal-form .itim-cal-copy__tools button.itim-cal-copy__remove:hover {
	border-color: var(--itim-accent) !important;
	background: #fdf6f6 !important;
	color: var(--itim-accent-dark) !important;
}


.itim-cal-upload__error {
	margin-block: 0.45em 0;
	color: var(--itim-accent);
	font-size: 0.87em;
	font-weight: 600;
}

/* -------------------------------------------------- עמודים צבעוניים */

.itim-cal-page {
	margin-block-end: 0.9em;
	padding: 0.9em 1em;
	border: 1px solid var(--itim-border);
	border-radius: 8px;
	background: var(--itim-bg-card);
}

.itim-cal-page__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	margin-block-end: 0.5em;
}

.itim-cal-page__num {
	flex: 1 1 auto;
	min-inline-size: 0;
	font-weight: 700;
	white-space: nowrap;
}

.itim-cal-page .itim-cal-dropzone__types {
	font-size: 0.78em;
}

.itim-cal-page__body {
	display: grid;
	gap: 0.9em;
}

@media (min-width: 700px) {
	.itim-cal-page__body {
		grid-template-columns: 1fr 1fr;
		/*
		 * Stretch rather than start: the upload box is taller than a row of date
		 * dropdowns, and with both columns the same height the date can be centred
		 * against it instead of floating near the top edge.
		 */
		align-items: stretch;
	}

	/*
	 * The date column sat a few pixels lower than the upload box beside it: its own
	 * gap is wider than the margin under the upload's label. Matching the two puts
	 * the dropdowns and the box on the same line.
	 */
	.itim-cal-page__body > .itim-cal-field--date {
		display: flex;
		flex-direction: column;
		gap: 0;
	}

	.itim-cal-page__body > .itim-cal-field--date > .itim-cal-label {
		margin-block-end: 0.25em;
	}

	.itim-cal-page__body > .itim-cal-field--date > .itim-cal-date-part {
		display: flex;
		flex: 0 0 auto;
		align-items: center;
		min-block-size: var(--itim-dropzone-height, auto);
	}
}

.itim-cal-field--date {
	display: flex;
	flex-direction: column;
	gap: 0.5em;
}

.itim-cal-date-part__label {
	display: block;
	margin-block-end: 0.25em;
	color: var(--itim-muted);
	font-size: 0.82em;
}

.itim-cal-hebdate {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
}

.itim-cal-hebdate .itim-cal-input {
	inline-size: auto;
	flex: 1 1 5em;
}

/* שנה קבועה: מוצגת כטקסט, והשדה עצמו נשאר לצורך שליחת הטופס */
.itim-cal-hebdate__year {
	flex: 0 0 auto;
	align-self: center;
	color: #4a4a52;
	font-weight: 600;
	white-space: nowrap;
}

.itim-cal-hebdate .itim-cal-hebdate__year--fixed {
	position: absolute;
	flex: 0 0 0;
	inline-size: 1px;
	block-size: 1px;
	margin: 0;
	padding: 0;
	border: 0;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
	clip-path: inset(50%);
}

.itim-cal-date__note:not(:empty) {
	color: var(--itim-accent);
	font-size: 0.87em;
	font-weight: 600;
}

.itim-cal-form button.itim-cal-add {
	display: inline-block;
	inline-size: auto !important;
	padding: 0.6em 1.1em !important;
	border: 1px dashed var(--itim-accent) !important;
	border-radius: 8px !important;
	background: none !important;
	color: var(--itim-accent) !important;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.itim-cal-form button.itim-cal-add:hover {
	background: #fdf6f6 !important;
}

/* --------------------------------------------------------------- סיכום */

.itim-cal-summary {
	background: #fff;
}

.itim-cal-summary__title {
	margin-block: 0 0.5em;
	font-size: 1em;
	font-weight: 700;
}

.itim-cal-summary__row {
	display: flex;
	justify-content: space-between;
	gap: 1em;
	padding-block: 0.25em;
	font-size: 0.93em;
}

.itim-cal-summary__row--total {
	margin-block-start: 0.4em;
	padding-block-start: 0.5em;
	border-block-start: 1px solid var(--itim-border);
	font-weight: 700;
}

/* ------------------------------------------------------- סרגל התשלום */

.itim-cal-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	margin-block: 0 1.5em;
	padding: 1.1em 1.25em;
	border: 2px solid var(--itim-accent, #a4161a);
	border-radius: 10px;
	background: #fff;
}

.itim-cal-cta__label {
	display: block;
	color: #6f6f78;
	font-size: 0.9em;
}

.itim-cal-cta__value {
	display: block;
	font-size: 1.6em;
	font-weight: 700;
	line-height: 1.2;
	color: var(--itim-accent, #a4161a);
}

.itim-cal-cta__action {
	display: flex;
	align-items: center;
	gap: 0.75em;
}

.itim-cal-cta__action .quantity {
	margin: 0;
}

.itim-cal-cta__action .single_add_to_cart_button,
.itim-cal-cta__action button[type="submit"] {
	margin: 0;
	padding: 0.85em 1.75em;
	border: 0;
	border-radius: 8px;
	/* The theme dresses this button itself, so the accent has to win. */
	background: var(--itim-accent, #a4161a) !important;
	color: #fff !important;
	font-size: 1em;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background 0.15s ease;
}

.itim-cal-cta__action .single_add_to_cart_button:hover,
.itim-cal-cta__action button[type="submit"]:hover {
	background: var(--itim-accent-dark, #7d1114) !important;
}

/* --------------------------------------------------------- חלון חסרים */

.itim-cal-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25em;
	background: rgba(20, 20, 24, 0.55);
}

.itim-cal-modal[hidden] {
	display: none;
}

.itim-cal-modal__box {
	inline-size: min(30em, 100%);
	max-block-size: 80vh;
	overflow: auto;
	padding: 1.5em;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
	text-align: start;
	font-size: 15px;
	line-height: 1.6;
}

.itim-cal-modal__title {
	display: flex;
	align-items: center;
	gap: 0.5em;
	margin-block: 0 0.5em;
	color: var(--itim-accent, #a4161a);
	font-size: 1.15em;
	font-weight: 700;
}

.itim-cal-modal__title::before {
	content: "!";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 1.5em;
	block-size: 1.5em;
	flex: 0 0 auto;
	border-radius: 50%;
	background: var(--itim-accent, #a4161a);
	color: #fff;
	font-size: 0.85em;
}

.itim-cal-modal__intro {
	margin-block: 0 0.75em;
}

.itim-cal-modal__list {
	margin: 0 0 1.25em;
	padding-inline-start: 1.3em;
}

.itim-cal-modal__list li {
	margin-block-end: 0.35em;
}

.itim-cal-modal__close {
	inline-size: 100%;
	padding: 0.8em 1.5em;
	border: 0 !important;
	border-radius: 8px !important;
	background: var(--itim-accent, #a4161a) !important;
	color: #fff !important;
	font: inherit;
	font-weight: 700;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
}

.itim-cal-modal__close:hover {
	background: var(--itim-accent-dark, #7d1114) !important;
}

.itim-cal-modal__box--wide {
	inline-size: min(44em, 100%);
}

.itim-cal-modal__body {
	margin-block-end: 1em;
}

.itim-cal-modal__note {
	margin-block: 0 1.1em;
	padding: 0.75em 1em;
	border: 1px solid var(--itim-accent, #a4161a);
	border-radius: 8px;
	background: #fdf6f6;
	font-weight: 600;
}

.itim-cal-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6em;
}

.itim-cal-modal__actions .itim-cal-modal__close {
	flex: 1 1 14em;
}

.itim-cal-modal__close.is-disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.itim-cal-modal__cancel {
	flex: 0 1 auto;
	padding: 0.8em 1.5em;
	border: 1px solid #c9c9cf !important;
	border-radius: 8px !important;
	background: #fff !important;
	color: #1d1d1f !important;
	font: inherit;
	cursor: pointer;
}

/* ------------------------------------------------- אישור סופי בתשלום */

.itim-cal-confirm {
	margin-block: 1.25em;
	padding: 1.1em 1.25em;
	border: 1px solid var(--itim-accent, #a4161a);
	border-radius: 10px;
	background: #fff;
	font-size: 15px;
	text-align: start;
}

.itim-cal-confirm__title {
	margin-block: 0 0.4em;
	font-size: 1.02em;
	font-weight: 700;
}

.itim-cal-confirm__intro {
	margin-block: 0 0.8em;
	color: #6f6f78;
	font-size: 0.92em;
}

.itim-cal-confirm__item {
	margin-block-end: 0.9em;
	padding-block-end: 0.9em;
	border-block-end: 1px solid #e4e4e7;
}

.itim-cal-confirm__item:last-child {
	margin-block-end: 0;
	padding-block-end: 0;
	border-block-end: 0;
}

.itim-cal-confirm__name {
	margin-block: 0 0.4em;
	font-size: 1em;
	font-weight: 700;
}

.itim-cal-confirm__list {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.2em 0.9em;
	margin: 0;
	font-size: 0.92em;
}

.itim-cal-confirm__list dt {
	color: #6f6f78;
	font-weight: 500;
}

.itim-cal-confirm__list dd {
	margin: 0;
}

.itim-cal-confirm__check {
	margin-block: 1em 0;
	padding-block-start: 0.9em;
	border-block-start: 1px solid #e4e4e7;
	font-weight: 600;
}

.itim-cal-confirm__check label {
	display: flex;
	align-items: flex-start;
	gap: 0.5em;
	cursor: pointer;
}

.itim-cal-invalid .itim-cal-input,
.itim-cal-invalid.itim-cal-input {
	border-color: var(--itim-accent, #a4161a);
	background: #fdf6f6;
}

.itim-cal-invalid .itim-cal-dropzone {
	border-color: var(--itim-accent, #a4161a);
}

/* --------------------------------------------------- עריכה והודעות */

.itim-cal-editing {
	margin-block: 0 1em;
	padding: 0.75em 1em;
	border: 1px solid #d0a237;
	border-radius: 8px;
	background: #fdf8ec;
	font-size: 0.92em;
}

/*
 * The product name in the cart is itself a link, so this needs a line of its own
 * or the two read as one sentence. The wrapper is what breaks the line; both it
 * and the button are marked important, because cart tables are heavily styled by
 * themes and a plain declaration here loses.
 */
.itim-cal-edit {
	display: block !important;
	margin-block-start: 0.6em;
}

.itim-cal-edit .itim-cal-edit-link,
a.itim-cal-edit-link {
	display: inline-flex !important;
	align-items: center;
	gap: 0.35em;
	inline-size: auto !important;
	padding: 0.35em 0.8em !important;
	border: 1px solid var(--itim-accent, #a4161a) !important;
	border-radius: 6px !important;
	background: #fff !important;
	color: var(--itim-accent, #a4161a) !important;
	font-size: 0.85em;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none !important;
	transition: background 0.15s ease;
}

.itim-cal-edit .itim-cal-edit-link::before {
	content: "✎";
	line-height: 1;
}

.itim-cal-edit .itim-cal-edit-link:hover {
	background: #fdf6f6 !important;
	color: var(--itim-accent-dark, #7d1114) !important;
}

.itim-cal-errors {
	margin-block-end: 1em;
	padding: 0.75em 1em;
	border: 1px solid var(--itim-accent, #a4161a);
	border-radius: 8px;
	background: #fdf1f1;
	color: var(--itim-accent, #a4161a);
}

.itim-cal-customer-files {
	margin: 0.35em 0 0;
	padding: 0;
	list-style: none;
}

.itim-cal-customer-files li {
	margin: 0;
}

/* ------------------------------------------- תצוגה מקדימה בהזמנה */

/*
 * A filename does not tell the customer whether the right cover reached us —
 * seeing it does. Only pictures get one; a PDF or a ZIP has nothing to show.
 */
.itim-cal-preview {
	display: block;
	max-inline-size: 140px;
	margin-block-start: 0.4em;
	border: 1px solid var(--itim-border, #e4e4e7);
	border-radius: 6px;
	overflow: hidden;
	line-height: 0;
}

.itim-cal-preview img {
	display: block;
	inline-size: 100%;
	block-size: auto;
}

.itim-cal-customer-files {
	margin: 0.5em 0 0;
	padding: 0;
	list-style: none;
}

.itim-cal-customer-files li {
	margin-block-end: 0.6em;
}
