/* Karolina Rezerwacje - Frontend Styles */

:root {
	--kr-primary: #1b5e20;
	--kr-secondary: #81c784;
	--kr-light-gray: #f5f5f5;
	--kr-text: #333;
	--kr-border: #ddd;
}

.kr-oferty-container {
	padding: 40px 20px;
	background: #f9f9f9;
}

.kr-oferty-header {
	text-align: center;
	margin-bottom: 50px;
	max-width: 800px;
	margin-left: auto;
	margin-right: auto;
}

.kr-oferty-header h2 {
	font-size: 32px;
	font-weight: 700;
	color: var(--kr-text);
	margin-bottom: 15px;
}

.kr-oferty-header p {
	font-size: 16px;
	color: #666;
	line-height: 1.6;
}

/* Grid layout */
.kr-oferty-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 30px;
	max-width: 1200px;
	margin: 0 auto;
}

/* Oferta card */
.kr-oferta-card {
	background: white;
	border-radius: 12px;
	padding: 30px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s, box-shadow 0.3s;
	display: flex;
	flex-direction: column;
	position: relative;
}

.kr-oferta-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.kr-oferta-card.najczesciej {
	border: 2px solid var(--kr-primary);
	transform: scale(1.02);
}

/* Badge */
.kr-badge-najczesciej {
	position: absolute;
	top: -12px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--kr-primary);
	color: white;
	padding: 6px 16px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

/* Header */
.kr-oferta-header {
	margin-bottom: 20px;
	border-bottom: 2px solid var(--kr-light-gray);
	padding-bottom: 20px;
}

.kr-oferta-header h3 {
	font-size: 22px;
	font-weight: 700;
	color: var(--kr-text);
	margin: 0 0 10px 0;
}

.kr-oferta-cena {
	font-size: 28px;
	font-weight: 700;
	color: var(--kr-primary);
	margin-bottom: 5px;
}

.kr-oferta-sub {
	font-size: 13px;
	color: #999;
	font-style: italic;
}

/* Details */
.kr-oferta-details {
	margin-bottom: 20px;
	padding: 15px;
	background: var(--kr-light-gray);
	border-radius: 8px;
}

.kr-oferta-typ {
	display: flex;
	gap: 10px;
	margin-bottom: 8px;
	font-size: 14px;
}

.kr-oferta-czas,
.kr-oferta-wizyt {
	font-size: 14px;
	color: var(--kr-text);
	margin-bottom: 5px;
}

/* Includes/Excludes */
.kr-oferta-includes,
.kr-oferta-nie-zawiera {
	margin-bottom: 20px;
}

.kr-oferta-includes h4,
.kr-oferta-nie-zawiera h4 {
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--kr-primary);
	margin: 0 0 10px 0;
}

.kr-oferta-includes ul,
.kr-oferta-nie-zawiera ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.kr-oferta-includes li {
	padding: 6px 0;
	padding-left: 20px;
	font-size: 13px;
	color: #555;
	line-height: 1.5;
	position: relative;
}

.kr-oferta-includes li:before {
	content: '✓';
	position: absolute;
	left: 0;
	color: var(--kr-primary);
	font-weight: bold;
}

.kr-oferta-nie-zawiera li {
	padding: 6px 0;
	padding-left: 20px;
	font-size: 13px;
	color: #999;
	line-height: 1.5;
	position: relative;
}

.kr-oferta-nie-zawiera li:before {
	content: '✗';
	position: absolute;
	left: 0;
	color: #ccc;
}

/* Button */
.kr-btn-umow {
	background: var(--kr-primary);
	color: white;
	border: none;
	padding: 14px 24px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.3s, transform 0.2s;
	margin-top: auto;
	width: 100%;
}

.kr-btn-umow:hover {
	background: #145a1f;
	transform: scale(1.02);
}

.kr-btn-umow:active {
	transform: scale(0.98);
}

/* Modal */
.kr-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	animation: fadeIn 0.3s;
}

.kr-modal-content {
	background: white;
	border-radius: 12px;
	max-width: 600px;
	width: 90%;
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
	animation: slideUp 0.3s;
}

.kr-modal-close {
	position: absolute;
	top: 20px;
	right: 20px;
	background: none;
	border: none;
	font-size: 28px;
	color: #999;
	cursor: pointer;
	z-index: 10;
}

.kr-modal-close:hover {
	color: var(--kr-text);
}

/* Form styles */
.kr-form-container {
	padding: 40px 30px;
}

.kr-form-title {
	font-size: 24px;
	font-weight: 700;
	color: var(--kr-text);
	margin-bottom: 10px;
}

.kr-form-subtitle {
	font-size: 14px;
	color: #999;
	margin-bottom: 30px;
}

.kr-form-group {
	margin-bottom: 20px;
}

.kr-form-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	font-size: 14px;
	color: var(--kr-text);
}

.kr-form-group input[type="text"],
.kr-form-group input[type="email"],
.kr-form-group input[type="tel"],
.kr-form-group input[type="date"],
.kr-form-group select {
	width: 100%;
	padding: 12px;
	border: 1px solid var(--kr-border);
	border-radius: 6px;
	font-size: 14px;
	font-family: inherit;
	transition: border-color 0.3s;
}

.kr-form-group input:focus,
.kr-form-group select:focus {
	outline: none;
	border-color: var(--kr-primary);
	box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.1);
}

.kr-form-group textarea {
	width: 100%;
	padding: 12px;
	border: 1px solid var(--kr-border);
	border-radius: 6px;
	font-size: 14px;
	font-family: inherit;
	resize: vertical;
	min-height: 100px;
}

/* Checkbox */
.kr-checkbox-group {
	display: flex;
	align-items: center;
	gap: 10px;
}

.kr-checkbox-group input[type="checkbox"] {
	width: 18px;
	height: 18px;
	cursor: pointer;
}

.kr-checkbox-group label {
	margin: 0;
	cursor: pointer;
	font-weight: normal;
}

/* Steps */
.kr-form-steps {
	margin-bottom: 30px;
	display: flex;
	justify-content: space-between;
	position: relative;
}

.kr-form-steps::before {
	content: '';
	position: absolute;
	top: 20px;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--kr-border);
	z-index: -1;
}

.kr-form-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1;
}

.kr-form-step-number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--kr-border);
	color: #999;
	font-weight: 700;
	margin-bottom: 8px;
	transition: all 0.3s;
}

.kr-form-step.active .kr-form-step-number {
	background: var(--kr-primary);
	color: white;
}

.kr-form-step.completed .kr-form-step-number {
	background: var(--kr-secondary);
	color: white;
}

.kr-form-step-label {
	font-size: 12px;
	color: #999;
	text-align: center;
}

.kr-form-step.active .kr-form-step-label {
	color: var(--kr-primary);
	font-weight: 600;
}

/* Buttons */
.kr-form-buttons {
	display: flex;
	gap: 10px;
	justify-content: space-between;
	margin-top: 30px;
}

.kr-btn-prev,
.kr-btn-next,
.kr-btn-submit {
	padding: 12px 24px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	border: none;
	cursor: pointer;
	transition: all 0.3s;
}

.kr-btn-prev {
	background: var(--kr-light-gray);
	color: var(--kr-text);
}

.kr-btn-prev:hover {
	background: #e0e0e0;
}

.kr-btn-next,
.kr-btn-submit {
	background: var(--kr-primary);
	color: white;
	flex: 1;
}

.kr-btn-next:hover,
.kr-btn-submit:hover {
	background: #145a1f;
}

.kr-btn-next:disabled,
.kr-btn-submit:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Animations */
@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes slideUp {
	from {
		transform: translateY(50px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

/* Responsive */
@media (max-width: 768px) {
	.kr-oferty-container {
		padding: 20px 15px;
	}

	.kr-oferty-header h2 {
		font-size: 24px;
	}

	.kr-oferty-grid {
		gap: 20px;
	}

	.kr-oferta-card {
		padding: 20px;
	}

	.kr-modal-content {
		width: 95%;
		padding: 0;
	}

	.kr-form-container {
		padding: 30px 20px;
	}

	.kr-form-steps {
		gap: 5px;
	}

	.kr-form-step-label {
		font-size: 11px;
	}

	.kr-form-buttons {
		flex-direction: column;
	}

	.kr-btn-prev {
		order: 2;
	}

	.kr-btn-next,
	.kr-btn-submit {
		order: 1;
	}
}

/* ==========================================================================
   Popup "Umów wizytę" – wybór rodzaju konsultacji (radio jak w projekcie)
   ========================================================================== */
.kr-radio-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0 0 28px 0;
	width: 100%;
	flex: 1 1 100%;
	align-self: stretch;
	box-sizing: border-box;
}

.kr-radio-option {
	display: flex;
	align-items: center;
	width: 100%;
	box-sizing: border-box;
	gap: 10px;
	margin: 0;
	padding: 13px 14px;
	border: 1px solid #d9dcd8;
	border-radius: 8px;
	background: #ffffff;
	cursor: pointer;
	font-size: 13px;
	line-height: 1.2;
	color: #1b1b1b;
	font-weight: 500;
	transition: border-color 0.2s, background-color 0.2s;
	-webkit-user-select: none;
	user-select: none;
}

.kr-radio-option:hover {
	border-color: #b9c2ba;
}

.kr-radio-option.is-selected {
	border: 1.5px solid #0f3d2e;
	background: #f2f4f0;
	padding: 12.5px 13.5px; /* kompensacja grubszej ramki */
}

/* natywny input schowany, ale dostępny (focus / klawiatura) */
.kr-radio-option input[type="radio"] {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	padding: 0;
	opacity: 0;
	pointer-events: none;
}

.kr-radio-circle {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 1.5px solid #cfd3cf;
	background: #ffffff;
	position: relative;
	box-sizing: border-box;
	transition: border-color 0.2s;
}

.kr-radio-option.is-selected .kr-radio-circle {
	border-color: #0f3d2e;
}

.kr-radio-option.is-selected .kr-radio-circle::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #0f3d2e;
	transform: translate(-50%, -50%);
}

.kr-radio-option input[type="radio"]:focus-visible + .kr-radio-circle {
	box-shadow: 0 0 0 3px rgba(15, 61, 46, 0.2);
}

.kr-radio-label {
	flex: 1 1 auto;
}

/* Układ diva z opcjami: opcje na górze, "Dalej" pod nimi po prawej */
.bde-popup-3081-100 .bde-div-3081-106 {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	width: 100%;
}

.bde-popup-3081-100 .bde-div-3081-106 > .bde-button {
	align-self: flex-end;
	margin-top: 8px;
}

/* ==========================================================================
   Wizard rezerwacji w popupie "Umów wizytę"
   ========================================================================== */
.kr-wizard { width: 100%; box-sizing: border-box; }
.kr-wizard * { box-sizing: border-box; }
.kr-wizard .kr-step-title { margin: 0 0 4px 0; }
.kr-step-sub { margin: 0 0 18px 0; font-size: 12px; color: #6b7370; }
.kr-step-body { width: 100%; }

.kr-step-actions {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 10px;
	margin-top: 22px;
}
.kr-step-actions .kr-btn-back { margin-right: auto; }
.kr-step-actions .bde-button { margin: 0; }
.kr-step-actions button[disabled] { opacity: 0.6; cursor: wait; }

.kr-req { color: #b3261e; }
.kr-muted { font-size: 12px; color: #6b7370; }
.kr-error { min-height: 16px; margin-top: 8px; font-size: 12px; color: #b3261e; }
.kr-error:empty { display: none; }
.kr-hint { margin-top: 6px; font-size: 12px; min-height: 14px; color: #6b7370; }
.kr-hint.is-ok { color: #0f3d2e; }
.kr-hint.is-error { color: #b3261e; }

/* Pola */
.kr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.kr-field { display: flex; flex-direction: column; gap: 6px; }
.kr-field.is-full { grid-column: 1 / -1; }
.kr-field label { font-size: 12px; font-weight: 600; color: #1b1b1b; }
.kr-field input, .kr-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d9dcd8;
	border-radius: 8px;
	background: #fff;
	font: inherit;
	font-size: 13px;
	color: #1b1b1b;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.kr-field textarea { resize: vertical; min-height: 72px; }
.kr-field input:focus, .kr-field textarea:focus {
	outline: none;
	border-color: #0f3d2e;
	box-shadow: 0 0 0 3px rgba(15, 61, 46, 0.12);
}
.kr-field input::placeholder, .kr-field textarea::placeholder { color: #9aa19d; }

/* Checkboxy */
.kr-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 14px 0 0 0;
	font-size: 12px;
	line-height: 1.4;
	color: #1b1b1b;
	cursor: pointer;
}
.kr-check input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.kr-check-box {
	flex: 0 0 auto;
	width: 16px; height: 16px;
	margin-top: 1px;
	border: 1.5px solid #cfd3cf;
	border-radius: 4px;
	background: #fff;
	position: relative;
}
.kr-check input:checked + .kr-check-box { border-color: #0f3d2e; background: #0f3d2e; }
.kr-check input:checked + .kr-check-box::after {
	content: '';
	position: absolute; left: 4px; top: 1px;
	width: 5px; height: 9px;
	border: solid #fff; border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
.kr-check input:focus-visible + .kr-check-box { box-shadow: 0 0 0 3px rgba(15, 61, 46, 0.2); }
.kr-check a { color: #0f3d2e; text-decoration: underline; }
.kr-faktura { margin-top: 14px; padding-top: 14px; border-top: 1px solid #e6e9e6; }

/* Kalendarz */
.kr-cal { width: 100%; }
.kr-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.kr-cal-month { font-size: 13px; font-weight: 600; color: #1b1b1b; text-transform: capitalize; }
.kr-cal-nav {
	width: 30px; height: 30px;
	border: 1px solid #d9dcd8; border-radius: 8px; background: #fff;
	font-size: 18px; line-height: 1; color: #1b1b1b; cursor: pointer;
}
.kr-cal-nav[disabled] { opacity: 0.35; cursor: default; }
.kr-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.kr-cal-days span { text-align: center; font-size: 11px; color: #6b7370; padding: 4px 0; }
.kr-cal-cell {
	height: 36px;
	border: 1px solid transparent; border-radius: 8px; background: transparent;
	font: inherit; font-size: 13px; color: #1b1b1b; cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s;
}
.kr-cal-cell:not([disabled]):hover { background: #f2f4f0; border-color: #d9dcd8; }
.kr-cal-cell.is-today { font-weight: 700; }
.kr-cal-cell.is-selected { background: #0f3d2e; color: #fff; border-color: #0f3d2e; }
.kr-cal-cell.is-disabled { color: #c3c8c4; cursor: default; }
.kr-cal-cell.is-empty { pointer-events: none; }

/* Godziny */
.kr-slots-title { margin: 16px 0 8px; font-size: 12px; font-weight: 600; color: #1b1b1b; }
.kr-slots { display: flex; flex-wrap: wrap; gap: 8px; }
.kr-slot {
	padding: 8px 14px;
	border: 1px solid #d9dcd8; border-radius: 8px; background: #fff;
	font: inherit; font-size: 13px; color: #1b1b1b; cursor: pointer;
}
.kr-slot:hover { border-color: #b9c2ba; }
.kr-slot.is-selected { background: #0f3d2e; border-color: #0f3d2e; color: #fff; }

/* Podsumowanie */
.kr-summary { border: 1px solid #e6e9e6; border-radius: 10px; background: #f7f8f6; padding: 6px 14px; }
.kr-summary-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid #e6e9e6; font-size: 13px; }
.kr-summary-row:last-child { border-bottom: 0; }
.kr-summary-k { color: #6b7370; }
.kr-summary-v { color: #1b1b1b; font-weight: 500; text-align: right; }
.kr-summary-total { margin-top: 2px; padding-top: 12px; border-top: 1px solid #d9dcd8; }
.kr-summary-total .kr-summary-k { color: #1b1b1b; font-weight: 600; }
.kr-summary-total .kr-summary-v { font-size: 16px; font-weight: 700; color: #0f3d2e; }

/* Płatność */
.kr-badge {
	display: inline-block; margin-left: 8px; padding: 2px 8px;
	border-radius: 999px; background: #e3ede6; color: #0f3d2e;
	font-size: 10px; font-weight: 600; vertical-align: middle;
}
.kr-blik { padding: 10px 14px 14px 40px; }
.kr-blik label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.kr-blik input {
	width: 100%; max-width: 260px; padding: 10px 12px;
	border: 1px solid #d9dcd8; border-radius: 8px; font: inherit; font-size: 14px; letter-spacing: 3px;
}
.kr-blik input:focus { outline: none; border-color: #0f3d2e; box-shadow: 0 0 0 3px rgba(15, 61, 46, 0.12); }
.kr-pay-total { margin-top: 6px; font-size: 13px; color: #1b1b1b; text-align: right; }
.kr-pay-total strong { color: #0f3d2e; font-size: 15px; }

/* Potwierdzenie */
.kr-done { text-align: center; padding: 18px 8px 6px; }
.kr-done-icon {
	width: 72px; height: 72px; margin: 0 auto 14px;
	display: flex; align-items: center; justify-content: center;
	border-radius: 50%; background: #e3ede6; color: #0f3d2e;
}
.kr-done-title { margin: 0 0 8px; font-size: 20px; font-weight: 700; color: #0f3d2e; }
.kr-done-text { margin: 0; font-size: 13px; line-height: 1.5; color: #4a524e; }
.kr-wizard[data-step="potwierdzenie"] .kr-step-actions { justify-content: center; }

@media (max-width: 600px) {
	.kr-grid { grid-template-columns: 1fr; }
	.kr-step-actions { flex-wrap: wrap; }
}

/* Odstęp między tytułem kroku a treścią */
.kr-wizard .kr-step-title { margin-bottom: 20px !important; }
.kr-wizard .kr-step-title + .kr-step-sub { margin-top: -14px; }
