/* Cićkiewicz Clinic - formularz rezerwacji */

.cb-wrap {
	/* Paleta marki Cićkiewicz Clinic */
	--cb-accent: #5F4431;   /* Brown */
	--cb-accent-2: #937A68; /* Medium beige */
	--cb-sand: #C1AEA0;     /* Dark beige */
	--cb-cream: #E9E4E0;    /* Beige light */
	--cb-text: #33261C;
	--cb-muted: #8A7566;
	--cb-border: #DED5CD;
	--cb-bg: #fff;
	--cb-radius: 12px;
	--cb-danger: #b3453c;
	box-sizing: border-box;
	max-width: 760px;
	margin: 0 auto;
	color: var(--cb-text);
	font-size: 15px;
	line-height: 1.5;
	text-align: left;
}

.cb-wrap *,
.cb-wrap *::before,
.cb-wrap *::after {
	box-sizing: border-box;
}

.cb-title {
	margin: 0 0 6px;
	font-size: 24px;
	line-height: 1.25;
}

.cb-subtitle {
	margin: 0 0 22px;
	color: var(--cb-muted);
}

.cb-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

@media (max-width: 640px) {
	.cb-row {
		grid-template-columns: 1fr;
	}
}

.cb-field {
	margin-bottom: 16px;
	position: relative;
	min-width: 0;
}

.cb-row .cb-field {
	margin-bottom: 0;
}

.cb-row + .cb-field,
.cb-row + .cb-row {
	margin-top: 16px;
}

.cb-field > label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .01em;
	color: var(--cb-text);
}

.cb-req {
	color: var(--cb-accent);
}

.cb-hint {
	margin: -2px 0 7px;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--cb-muted);
}

.cb-wrap input[type="text"],
.cb-wrap input[type="tel"],
.cb-wrap input[type="email"],
.cb-wrap select,
.cb-wrap textarea,
.cb-datebtn {
	width: 100%;
	padding: 12px 14px;
	font: inherit;
	color: var(--cb-text);
	background: var(--cb-bg);
	border: 1px solid var(--cb-border);
	border-radius: var(--cb-radius);
	outline: none;
	transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
	-webkit-appearance: none;
	appearance: none;
}

.cb-wrap textarea {
	resize: vertical;
	min-height: 110px;
}

.cb-wrap input:focus,
.cb-wrap select:focus,
.cb-wrap textarea:focus,
.cb-datebtn:focus-visible {
	border-color: var(--cb-accent);
	box-shadow: 0 0 0 3px rgba(95, 68, 49, .16);
}

.cb-wrap select:disabled,
.cb-wrap input:disabled {
	background: var(--cb-cream);
	color: var(--cb-muted);
	cursor: not-allowed;
}

.cb-wrap ::placeholder {
	color: var(--cb-sand);
	opacity: 1;
}

/* Select ze strzałką */
.cb-select-wrap {
	position: relative;
}

.cb-select-wrap::after {
	content: "";
	position: absolute;
	right: 16px;
	top: 50%;
	width: 9px;
	height: 9px;
	margin-top: -6px;
	border-right: 2px solid var(--cb-muted);
	border-bottom: 2px solid var(--cb-muted);
	transform: rotate(45deg);
	pointer-events: none;
}

.cb-select-wrap select {
	padding-right: 40px;
}

/* Przycisk daty */
.cb-datebtn {
	display: flex;
	align-items: center;
	gap: 10px;
	text-align: left;
	cursor: pointer;
	line-height: 1.4;
}

.cb-datebtn__icon svg {
	width: 18px;
	height: 18px;
	display: block;
	color: var(--cb-accent);
}

.cb-datebtn__text {
	color: var(--cb-sand);
}

.cb-datebtn.is-filled .cb-datebtn__text {
	color: var(--cb-text);
	font-weight: 500;
}

/* Przycisk daty nie może przejmować kolorów przycisków z motywu. */
.cb-wrap .cb-datebtn:hover,
.cb-wrap .cb-datebtn:focus,
.cb-wrap .cb-datebtn:active {
	color: var(--cb-text);
	background: var(--cb-bg);
	border-color: var(--cb-accent-2);
}

/* Kalendarz */
.cb-cal {
	position: absolute;
	z-index: 40;
	top: calc(100% + 8px);
	left: 0;
	width: 330px;
	max-width: 100%;
	padding: 14px;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--cb-border);
	border-radius: 14px;
	box-shadow: 0 18px 40px rgba(51, 38, 28, .18);
}

/* Na wąskich ekranach kalendarz nie może wyjść poza prawą krawędź formularza. */
@media (max-width: 400px) {
	.cb-cal {
		left: 0;
		right: 0;
		width: auto;
	}
}

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

.cb-cal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.cb-cal__month {
	font-weight: 600;
	font-size: 15px;
	text-transform: capitalize;
}

.cb-wrap .cb-cal__nav {
	flex: 0 0 auto;
	width: 32px;
	min-width: 0;
	height: 32px;
	margin: 0;
	padding: 0;
	font-size: 20px;
	line-height: 1;
	color: var(--cb-text);
	background: transparent;
	border: 1px solid var(--cb-border);
	border-radius: 8px;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease;
}

.cb-cal__nav:hover:not(:disabled) {
	border-color: var(--cb-accent);
	background: rgba(95, 68, 49, .08);
}

.cb-cal__nav:disabled {
	opacity: .35;
	cursor: not-allowed;
}

.cb-cal__dow,
.cb-cal__grid {
	display: grid;
	/* minmax(0, 1fr) - bez tego min-content przycisku rozpycha siatkę poza kalendarz. */
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 3px;
	width: 100%;
	max-width: 100%;
}

.cb-cal__dow {
	margin-bottom: 4px;
}

.cb-cal__dow span {
	min-width: 0;
	text-align: center;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--cb-muted);
	padding: 4px 0;
	overflow: hidden;
}

/* Motyw stylujący <button> nie może narzucać tu szerokości ani marginesów. */
.cb-wrap .cb-cal__day {
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	min-height: 34px;
	margin: 0;
	padding: 0;
	font: inherit;
	font-size: 14px;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	color: var(--cb-text);
	background: transparent;
	border: 0;
	border-radius: 9px;
	box-shadow: none;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}

.cb-cal__day:hover:not(:disabled) {
	color: var(--cb-text);
	background: rgba(95, 68, 49, .14);
}

/* Dni niedostępne i zaznaczony dzień - bez podświetleń z motywu. */
.cb-wrap .cb-cal__day:disabled,
.cb-wrap .cb-cal__day:disabled:hover,
.cb-wrap .cb-cal__day:disabled:focus {
	color: #C9BDB3;
	background: transparent;
	cursor: not-allowed;
	text-decoration: line-through;
	text-decoration-thickness: 1px;
}

.cb-wrap .cb-cal__nav:disabled:hover,
.cb-wrap .cb-cal__nav:disabled:focus {
	background: transparent;
	border-color: var(--cb-border);
}

.cb-cal__day.is-empty {
	visibility: hidden;
}

.cb-cal__day.is-today {
	box-shadow: inset 0 0 0 1px var(--cb-border);
}

.cb-cal__day.is-selected {
	background: var(--cb-accent);
	color: #fff;
	font-weight: 600;
}

.cb-cal__note {
	margin: 12px 0 0;
	font-size: 12px;
	color: var(--cb-muted);
	text-align: center;
}

/* Zgody - obok siebie na desktopie, jedna pod drugą na telefonie */
.cb-consents {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px 20px;
	margin: 20px 0 4px;
}

@media (max-width: 640px) {
	.cb-consents {
		grid-template-columns: 1fr;
	}
}

.cb-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 0;
	font-size: 13.5px;
	line-height: 1.45;
	color: var(--cb-muted);
	cursor: pointer;
}

.cb-check input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.cb-check__box {
	flex: 0 0 auto;
	width: 19px;
	height: 19px;
	margin-top: 1px;
	border: 1px solid var(--cb-border);
	border-radius: 5px;
	background: #fff;
	position: relative;
	transition: background-color .15s ease, border-color .15s ease;
}

.cb-check__box::after {
	content: "";
	position: absolute;
	left: 6px;
	top: 2px;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg) scale(0);
	transition: transform .15s ease;
}

.cb-check input:checked + .cb-check__box {
	background: var(--cb-accent);
	border-color: var(--cb-accent);
}

.cb-check input:checked + .cb-check__box::after {
	transform: rotate(45deg) scale(1);
}

.cb-check input:focus-visible + .cb-check__box {
	box-shadow: 0 0 0 3px rgba(95, 68, 49, .2);
}

.cb-check a {
	color: var(--cb-accent);
	text-decoration: underline;
}

/* Niezaznaczona wymagana zgoda - wyróżniamy sam checkbox, nie całą kolumnę. */
.cb-consent.has-error .cb-check__box {
	border-color: var(--cb-danger);
	box-shadow: 0 0 0 3px rgba(179, 69, 60, .12);
}

.cb-consent .cb-error {
	margin-left: 29px;
}

/* Dopisek o wstępnej rezerwacji */
.cb-notice {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 16px 0 0;
	padding: 13px 15px;
	font-size: 13px;
	line-height: 1.5;
	color: #6E5A4B;
	background: rgba(95, 68, 49, .06);
	border-left: 3px solid var(--cb-accent);
	border-radius: 0 10px 10px 0;
}

.cb-notice__icon svg {
	width: 17px;
	height: 17px;
	display: block;
	margin-top: 1px;
	color: var(--cb-accent);
}

/* Honeypot */
.cb-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Przycisk wyślij */
.cb-actions {
	margin-top: 18px;
}

.cb-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 200px;
	padding: 14px 30px;
	font: inherit;
	font-weight: 600;
	letter-spacing: .02em;
	color: #fff;
	background: var(--cb-accent);
	border: 0;
	border-radius: var(--cb-radius);
	cursor: pointer;
	transition: filter .18s ease, transform .12s ease;
}

.cb-submit:hover:not(:disabled) {
	background: var(--cb-accent-2);
}

.cb-submit:active:not(:disabled) {
	transform: translateY(1px);
}

.cb-submit:disabled {
	opacity: .65;
	cursor: not-allowed;
}

/* Hello Elementor (assets/css/reset.css) ustawia wszystkim przyciskom
   `button:focus, button:hover { background-color: #c36 }` - stąd różowe mignięcie
   przy trzymaniu LPM. Trzymamy brąz we wszystkich stanach, także bez .cb-wrap,
   gdyby przycisk trafił kiedyś poza wrapper. */
.cb-submit,
.cb-submit:focus,
.cb-submit:focus-visible,
.cb-submit:active,
.cb-submit:visited,
.cb-wrap .cb-submit,
.cb-wrap .cb-submit:focus,
.cb-wrap .cb-submit:focus-visible,
.cb-wrap .cb-submit:active,
.cb-wrap .cb-submit:disabled,
.cb-wrap .cb-submit[disabled],
.cb-wrap .cb-submit:visited {
	background-color: var(--cb-accent) !important;
	background-image: none !important;
	color: #fff !important;
	border-color: var(--cb-accent) !important;
	box-shadow: none !important;
	-webkit-tap-highlight-color: transparent;
}

.cb-submit:hover:not(:disabled),
.cb-wrap .cb-submit:hover:not(:disabled) {
	background-color: var(--cb-accent-2) !important;
}

.cb-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, .4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: cb-spin .7s linear infinite;
}

.cb-form.is-sending .cb-spinner {
	display: block;
}

@keyframes cb-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.cb-wrap * {
		transition: none !important;
		animation: none !important;
	}
}

/* Błędy i komunikaty */
.cb-error {
	display: none;
	margin-top: 5px;
	font-size: 12.5px;
	color: var(--cb-danger);
}

.cb-error.is-visible {
	display: block;
}

.cb-field.has-error input,
.cb-field.has-error select,
.cb-field.has-error textarea,
.cb-field.has-error .cb-datebtn {
	border-color: var(--cb-danger);
}

.cb-alert {
	margin-top: 16px;
	padding: 14px 16px;
	border-radius: var(--cb-radius);
	font-size: 14px;
}

.cb-alert[hidden] {
	display: none;
}

.cb-alert.is-success {
	background: #EEF5EF;
	color: #2F6B43;
	border: 1px solid #CBE0D2;
}

.cb-alert.is-error {
	background: #FBEEEC;
	color: #8E3229;
	border: 1px solid #EFCFC9;
}
