/* =====================================================================
   Ceramics Studio Booking — "שדות חימר" Frontend Styles
   Matches the studio's live site palette: warm coffee/clay brown tones
   (deep espresso-brown buttons and headings, tan/cream backgrounds),
   all typography in Google Fonts "Assistant", generous white space,
   thin divider lines. Fully RTL. Namespaced under .csb-wrapper so it
   never conflicts with Divi 5's own styling.
   ===================================================================== */

.csb-wrapper,
.csb-wrapper * {
	box-sizing: border-box;
	font-family: 'Assistant', Arial, Tahoma, sans-serif;
}

.csb-wrapper {
	direction: rtl;
	text-align: right;
	max-width: 680px;
	margin: 0 auto;
	color: #2e2117;
	background: #f4f3ed;
	padding: 28px 16px;
	border-radius: 12px;

	--csb-brand: #7a5738;
	--csb-brand-dark: #3d2b1f;
	--csb-brand-light: #a9866a;
	--csb-ink: #2e2117;
	--csb-ink-soft: #6b5744;
	--csb-cream: #f3e9db;
	--csb-border: #e4d3bb;
	--csb-border-strong: #cbae88;
	--csb-error: #b3261e;
	--csb-success: #2e7d32;
	--csb-serif: 'Assistant', Arial, Tahoma, sans-serif;
}

/* ---- Outer terracotta frame, echoing the gallery-poster border ---- */
.csb-frame {
	background: #ffffff;
	border: 1px solid var(--csb-border);
	border-radius: 4px;
	padding: 6px;
	margin-bottom: 28px;
	box-shadow: 0 1px 3px rgba(60, 34, 18, 0.05), 0 12px 32px rgba(90, 54, 30, 0.07);
	position: relative;
}

.csb-frame::before {
	content: '';
	position: absolute;
	inset: 6px;
	border: 1px solid var(--csb-border);
	border-radius: 2px;
	pointer-events: none;
}

/* ---- Hero: logo lockup + serif headline, gallery-poster style ---- */
.csb-hero {
	display: flex;
	flex-direction: row-reverse;
	align-items: stretch;
	gap: 28px;
	padding: 34px 34px 24px;
}

.csb-hero-compact {
	padding-bottom: 8px;
}

.csb-hero-centered {
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 6px;
	padding-top: 38px;
}

.csb-kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	align-self: flex-start;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--csb-brand);
	text-transform: uppercase;
}

.csb-kicker-center {
	align-self: center;
}

.csb-hero-content {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 10px;
}

.csb-hero-centered .csb-hero-content {
	align-items: center;
}

.csb-headline {
	font-family: var(--csb-serif);
	font-weight: 600;
	font-size: 32px;
	line-height: 1.2;
	margin: 0;
	color: var(--csb-brand-dark);
}

.csb-headline-center {
	text-align: center;
}

.csb-hero-sub {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--csb-ink-soft);
	max-width: 46ch;
}

.csb-center {
	text-align: center;
	margin-left: auto;
	margin-right: auto;
}

.csb-title-sm {
	font-family: var(--csb-serif);
	margin: 0 0 16px;
	font-size: 19px;
	font-weight: 600;
	color: var(--csb-brand-dark);
	text-align: right;
	padding: 26px 34px 0;
}

/* ---- Info bar: thin vertical dividers, echoing the poster's bottom row ---- */
.csb-info-bar {
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	gap: 0;
	margin: 0 34px 26px;
	padding-top: 20px;
	border-top: 1px solid var(--csb-border);
}

.csb-info-item {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
	text-align: center;
	padding: 0 8px;
}

.csb-info-value {
	font-family: var(--csb-serif);
	font-size: 15px;
	font-weight: 600;
	color: var(--csb-brand-dark);
	white-space: nowrap;
}

.csb-info-label {
	font-size: 11.5px;
	color: var(--csb-ink-soft);
	letter-spacing: 0.02em;
}

.csb-info-divider {
	width: 1px;
	background: var(--csb-border-strong);
	margin: 2px 0;
	flex-shrink: 0;
}

/* ---- Form ---- */
.csb-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
	text-align: right;
}

.csb-form-padded {
	padding: 6px 34px 34px;
}

.csb-field-row {
	display: flex;
	gap: 18px;
	flex-wrap: wrap;
}

.csb-field-row .csb-field-group {
	flex: 1 1 200px;
}

.csb-field-group {
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.csb-field-group label {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--csb-ink-soft);
	text-align: right;
}

/* Editorial "underline" input style instead of boxed fields */
.csb-field-group input[type="text"],
.csb-field-group input[type="email"],
.csb-field-group input[type="tel"],
.csb-field-group select,
.csb-field-group textarea {
	direction: rtl;
	text-align: right;
	width: 100%;
	padding: 10px 4px 12px;
	border: none;
	border-bottom: 1.5px solid var(--csb-border-strong);
	border-radius: 0;
	font-size: 16px;
	font-weight: 500;
	background: transparent;
	color: var(--csb-ink);
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
	appearance: none;
	-webkit-appearance: none;
}

.csb-field-group select {
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23b85c38' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: left 6px center;
	padding-left: 26px;
	cursor: pointer;
}

.csb-field-group textarea {
	border: 1.5px solid var(--csb-border-strong);
	border-radius: 10px;
	padding: 12px 14px;
	resize: vertical;
	min-height: 76px;
	font-size: 15px;
	font-weight: 400;
}

.csb-field-group input:focus,
.csb-field-group select:focus,
.csb-field-group textarea:focus {
	outline: none;
	border-color: var(--csb-brand);
}

.csb-field-group input[type="text"]:focus,
.csb-field-group input[type="email"]:focus,
.csb-field-group input[type="tel"]:focus,
.csb-field-group select:focus {
	box-shadow: 0 1.5px 0 0 var(--csb-brand);
}

.csb-field-group textarea:focus {
	box-shadow: 0 0 0 3px rgba(184, 92, 56, 0.12);
}

/* ---- Buttons: confident, editorial, with a subtle motion cue ---- */
.csb-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 16px 26px;
	border-radius: 999px;
	border: none;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.01em;
	cursor: pointer;
	text-decoration: none;
	overflow: hidden;
	transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.csb-btn-label {
	position: relative;
	z-index: 1;
}

.csb-btn-arrow {
	position: relative;
	z-index: 1;
	display: inline-flex;
	transition: transform 0.2s ease;
}

.csb-btn:hover .csb-btn-arrow {
	transform: translateX(-4px);
}

.csb-btn-icon {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	transition: transform 0.2s ease;
}

.csb-btn-icon svg {
	display: block;
}

.csb-btn-icon-pottery svg {
	width: 20px;
	height: 20px;
}

.csb-btn:hover .csb-btn-icon-pottery {
	transform: rotate(-8deg) scale(1.08);
}

.csb-btn:active {
	transform: translateY(1px) scale(0.99);
}

/* Each call-to-action button has its own brand color per the studio's
   spec — not a shared "primary/secondary" pair — so each one is a
   distinct, named modifier class. */

.csb-btn-book {
	background: linear-gradient(135deg, #8e6947 0%, #6f4f33 100%);
	color: #fff;
	box-shadow: 0 8px 22px rgba(142, 105, 71, 0.3);
}

.csb-btn-book:hover {
	box-shadow: 0 10px 26px rgba(142, 105, 71, 0.42);
}

.csb-btn-book:disabled {
	background: #d8c3ac;
	box-shadow: none;
	cursor: not-allowed;
}

.csb-btn-join {
	background: linear-gradient(135deg, #98aa6c 0%, #7c8f52 100%);
	color: #fff;
	box-shadow: 0 8px 22px rgba(152, 170, 108, 0.32);
}

.csb-btn-join:hover {
	box-shadow: 0 10px 26px rgba(152, 170, 108, 0.44);
}

.csb-btn-join:disabled {
	background: #c9d3b3;
	box-shadow: none;
	cursor: not-allowed;
}

.csb-btn-login {
	background: linear-gradient(135deg, #8d4a38 0%, #6e372a 100%);
	color: #fff;
	box-shadow: 0 8px 22px rgba(141, 74, 56, 0.3);
}

.csb-btn-login:hover {
	box-shadow: 0 10px 26px rgba(141, 74, 56, 0.42);
}

.csb-btn-centered {
	align-self: center;
	margin: 6px auto 0;
}

/* ---- Messages ---- */
.csb-message {
	font-size: 14px;
	font-weight: 600;
	padding: 0;
	min-height: 0;
	text-align: right;
}

.csb-message-error {
	color: var(--csb-error);
	background: #fdecea;
	border: 1px solid #f5c6c2;
	border-radius: 8px;
	padding: 10px 14px;
}

.csb-message-success {
	color: var(--csb-success);
	background: #eaf6ea;
	border: 1px solid #bfe3bf;
	border-radius: 8px;
	padding: 10px 14px;
}

.csb-availability-note {
	font-size: 13px;
	color: var(--csb-error);
	text-align: right;
	min-height: 0;
}

.csb-availability-note.csb-kids-note {
	color: var(--csb-ink-soft);
	background: var(--csb-cream);
	border: 1px solid var(--csb-border);
	border-radius: 8px;
	padding: 9px 13px;
	line-height: 1.5;
}

/* ---- Split-screen entry view (logged-out: login vs. join request) ----
   Breaks out of the standard 680px card width to a proper full-width
   landing layout, since it's often the very first thing a visitor sees. */
.csb-wrapper-entry {
	max-width: 1100px;
	background: transparent;
	padding: 0;
}

.csb-entry-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(46, 33, 23, 0.06), 0 18px 44px rgba(46, 33, 23, 0.08);
}

.csb-entry-col {
	padding: 48px 40px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.csb-entry-col-login {
	background: #eae4ca;
}

.csb-entry-col-join {
	background: #f4f3ed;
}

.csb-entry-inner {
	width: 100%;
	max-width: 360px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 14px;
}

.csb-entry-icon {
	color: #333333;
	width: 100px;
	margin-bottom: 4px;
}

.csb-entry-icon svg {
	width: 100%;
	height: auto;
	display: block;
}

.csb-entry-heading {
	font-family: var(--csb-serif);
	font-size: 22px;
	font-weight: 700;
	color: var(--csb-ink);
	margin: 0;
}

.csb-entry-sub {
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--csb-ink-soft);
	margin: 0 0 6px;
}

.csb-entry-col .csb-btn {
	align-self: center;
}

.csb-already-member {
	text-align: center;
	font-size: 15px;
	color: var(--csb-brand-dark);
	font-weight: 600;
	padding: 10px 0;
}

/* The embedded join form inside the entry column reuses .csb-form /
   .csb-field-group styling, just left-aligned within the centered column. */
.csb-entry-col-join .csb-registration-form {
	width: 100%;
	text-align: right;
}

/* ---- My bookings list ---- */
.csb-my-bookings {
	padding-bottom: 6px;
}

.csb-booking-list {
	list-style: none;
	margin: 0;
	padding: 0 34px 30px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.csb-booking-item {
	background: var(--csb-cream);
	border: 1px solid var(--csb-border);
	border-radius: 8px;
	padding: 11px 16px;
	font-size: 14px;
}

.csb-booking-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 14px;
}

.csb-my-bookings-hint {
	margin: 4px 34px 12px;
	font-size: 13px;
	color: var(--csb-ink);
	opacity: 0.75;
}

.csb-my-bookings-message {
	margin: 0 34px;
}

.csb-my-bookings-message:not(:empty) {
	margin-bottom: 12px;
}

.csb-booking-empty {
	margin: 0;
	padding: 0 34px 30px;
	font-size: 14px;
}

/* Per-booking actions: small outline buttons (not the big pill CTAs). */
.csb-booking-actions {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.csb-booking-locked {
	font-size: 12px;
	opacity: 0.65;
}

.csb-mini-btn {
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	padding: 8px 14px;
	border-radius: 999px;
	border: 1.5px solid #8e6947;
	background: transparent;
	color: #6f4f33;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.csb-mini-btn:hover {
	background: #8e6947;
	color: #fff;
}

.csb-mini-btn-cancel {
	border-color: #8d4a38;
	color: #8d4a38;
}

.csb-mini-btn-cancel:hover {
	background: #8d4a38;
	color: #fff;
}

.csb-mini-btn-save {
	background: #8e6947;
	color: #fff;
}

.csb-mini-btn-save:hover {
	background: #6f4f33;
}

.csb-mini-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Inline edit panel under a booking row */
.csb-booking-edit {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px dashed var(--csb-border);
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.csb-edit-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.csb-booking-date {
	font-weight: 700;
	color: var(--csb-brand-dark);
}

.csb-booking-time {
	font-variant-numeric: tabular-nums;
}

.csb-booking-resource {
	font-size: 12px;
	background: #fff;
	border: 1px solid var(--csb-border);
	border-radius: 999px;
	padding: 3px 10px;
}

/* =====================================================================
   Flatpickr RTL overrides — mirrors the default LTR calendar correctly
   for Hebrew/RTL, and applies the brand's fonts and colors.
   ===================================================================== */
.flatpickr-calendar {
	direction: rtl;
	font-family: 'Assistant', Arial, sans-serif !important;
	box-shadow: 0 4px 24px rgba(90, 54, 30, 0.18);
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid var(--csb-border, #e4d3bb);
}

.flatpickr-months {
	direction: rtl;
}

.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month {
	right: auto;
	left: 0;
}

.flatpickr-months .flatpickr-next-month.flatpickr-next-month {
	left: auto;
	right: 0;
}

.flatpickr-current-month {
	direction: rtl;
	font-family: 'Assistant', Arial, sans-serif;
	font-weight: 600;
}

.flatpickr-weekdays,
.flatpickr-days {
	direction: rtl;
}

.flatpickr-day {
	font-family: 'Assistant', Arial, sans-serif;
	border-radius: 6px;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
	background: var(--csb-brand, #7a5738);
	border-color: var(--csb-brand, #7a5738);
}

.flatpickr-day.today {
	border-color: var(--csb-brand, #7a5738);
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
	color: #d0c7bd;
	text-decoration: line-through;
	cursor: not-allowed;
}

/* Inline mode: the calendar is now a permanently-visible grid embedded
   in the form (see csb-booking.js `inline: true`), not a popup — so it
   should read as part of the card rather than a floating overlay. */
.flatpickr-calendar.inline {
	box-shadow: none;
	border: 1px solid var(--csb-border, #e4d3bb);
	width: 100%;
	max-width: 100%;
	margin-top: 4px;
}

.flatpickr-calendar.inline .flatpickr-days,
.flatpickr-calendar.inline .dayContainer {
	width: 100%;
	max-width: 100%;
}

.flatpickr-calendar.inline .flatpickr-day {
	max-width: none;
	height: 42px;
	line-height: 42px;
	font-size: 15px;
}

.csb-field-hint {
	font-size: 12.5px;
	color: var(--csb-ink-soft);
	margin-top: -2px;
}

/* Split-screen entry view: stack to one column at a slightly wider
   breakpoint than the rest of the UI, since two side-by-side forms need
   more room than a single card does. Login column stays first (top) —
   it's already first in the DOM, so no reordering needed here. */
/* Responsive */
@media (max-width: 640px) {
	.csb-entry-split {
		grid-template-columns: 1fr;
	}

	.csb-entry-col {
		padding: 36px 24px;
	}

	.csb-entry-icon {
		width: 64px;
	}

	.csb-wrapper {
		padding: 20px 10px;
	}

	.csb-hero {
		flex-direction: column-reverse;
		padding: 26px 22px 18px;
		gap: 18px;
	}

	.csb-hero-centered {
		flex-direction: column;
		padding-top: 28px;
	}

	.csb-headline {
		font-size: 26px;
	}

	.csb-info-bar {
		flex-wrap: wrap;
		row-gap: 16px;
		margin: 0 22px 20px;
	}

	.csb-info-item {
		flex: 1 1 40%;
	}

	.csb-info-divider {
		display: none;
	}

	.csb-title-sm {
		padding: 22px 22px 0;
	}

	.csb-form-padded,
	.csb-booking-list {
		padding-left: 22px;
		padding-right: 22px;
	}

	.csb-field-row {
		flex-direction: column;
		gap: 18px;
	}

	/* In a column the desktop "flex: 1 1 200px" basis would become a 200px
	   HEIGHT; size each field to its content instead. */
	.csb-field-row .csb-field-group {
		flex: 0 0 auto;
	}

	.csb-btn {
		width: 100%;
	}

	.csb-my-bookings-hint,
	.csb-my-bookings-message {
		margin-left: 22px;
		margin-right: 22px;
	}

	.csb-booking-empty {
		padding-left: 22px;
		padding-right: 22px;
	}

	.csb-booking-actions {
		width: 100%;
	}
}

/* =====================================================================
   [clay_class_schedule] — public weekly class timetable, styled after the
   studio's printed schedule (brown day headers, dark-sage time cells,
   light-sage class cells, white gutters). Wide screens: weekly grid.
   Narrow screens: one card per day.
   ===================================================================== */
.csb-ts-card {
	padding: 34px 28px 30px;
}

.csb-ts-title {
	margin: 0;
	text-align: center;
	font-size: 30px;
	font-weight: 400;
	color: #5e4230;
	letter-spacing: 0.02em;
}

.csb-ts-rule {
	width: 120px;
	height: 1px;
	margin: 14px auto 26px;
	background: #5e4230;
	opacity: 0.55;
}

.csb-ts-empty {
	text-align: center;
	color: #6e5d51;
	margin: 0;
}

.csb-wrapper table.csb-ts {
	width: 100%;
	margin: 0;
	table-layout: fixed;
	border-collapse: separate;
	border-spacing: 3px;
	border: 0;
	background: transparent;
}

.csb-wrapper .csb-ts th,
.csb-wrapper .csb-ts td {
	border: 0;
	text-align: center;
	vertical-align: middle;
}

.csb-wrapper .csb-ts th {
	background: #a98463;
	color: #fff;
	font-weight: 400;
	font-size: 16px;
	padding: 11px 6px;
}

.csb-ts .csb-ts-t,
.csb-ts-stack .csb-ts-t {
	background: #8c9e7d;
	color: #fff;
	font-size: 15px;
	padding: 8px 6px;
}

.csb-ts .csb-ts-c,
.csb-ts-stack .csb-ts-c {
	display: table-cell;
	background: #b6c9ac;
	color: #2b2b2b;
	font-size: 15px;
	line-height: 1.4;
	padding: 18px 10px;
	height: 84px;
}

.csb-ts .csb-ts-blank {
	background: #eef2ea;
}

.csb-ts-name {
	display: block;
}

.csb-ts-once {
	display: inline-block;
	margin-top: 6px;
	padding: 1px 9px;
	border-radius: 999px;
	background: #fff;
	color: #5e4230;
	font-size: 12px;
	font-weight: 700;
}

.csb-ts-stack {
	display: none;
}

@media (max-width: 760px) {
	.csb-ts-card {
		padding: 26px 14px 22px;
	}

	.csb-ts-title {
		font-size: 24px;
	}

	.csb-wrapper table.csb-ts {
		display: none;
	}

	.csb-ts-stack {
		display: flex;
		flex-direction: column;
		gap: 14px;
	}

	.csb-ts-day h3 {
		margin: 0;
		padding: 10px 14px;
		background: #a98463;
		color: #fff;
		font-size: 17px;
		font-weight: 400;
		text-align: right;
	}

	.csb-ts-item {
		margin-top: 3px;
	}

	.csb-ts-stack .csb-ts-t {
		text-align: center;
	}

	.csb-ts-stack .csb-ts-c {
		display: block;
		height: auto;
		min-height: 58px;
		padding: 14px 10px;
		text-align: center;
	}
}
