/* Kálvária – saját dátumválasztó (datum.js).
   A kijelző a környezet szövegmező-stílusát örökli; ez csak az ikont, a
   panelt és a naptárt adja. Paletta: papír #FFFDF9, tinta #131110,
   sárgaréz #C19D6C / #8A6D42. */

.kvd {
	position: relative;
	display: block;
	width: 100%;
	min-width: 0;
}
.kvd--inline { display: inline-block; width: auto; vertical-align: middle; }

input.kvd-kijelzo {
	cursor: pointer !important;
	padding-right: 40px !important;
	text-overflow: ellipsis;
	caret-color: transparent;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A6D42' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2.5'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 12px center !important;
	background-size: 18px 18px !important;
	-webkit-user-select: none;
	user-select: none;
}
.kvd--inline input.kvd-kijelzo { width: 10.5em !important; min-width: 0 !important; }
.kvd.is-nyitva input.kvd-kijelzo { border-color: #C19D6C !important; box-shadow: 0 0 0 3px rgba(193, 157, 108, .2) !important; }
.kvd.is-hibas input.kvd-kijelzo { border-color: #A8452F !important; box-shadow: 0 0 0 3px rgba(168, 69, 47, .15) !important; }
input.kvd-kijelzo::placeholder { color: #9C9387 !important; opacity: 1 !important; }

/* A tárolt mező: megvan, érvényesíthető, de nem látszik és nem kattintható. */
input.kvd-tarolt {
	position: absolute !important;
	left: 12px !important;
	bottom: 0 !important;
	width: 1px !important;
	height: 1px !important;
	min-height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* ---------------------------------------------------------------- panel */

.kvd-hatter {
	position: fixed;
	inset: 0;
	z-index: 9998;
	background: transparent;
}
.kvd-hatter.is-latszik { background: rgba(19, 17, 16, .38); }

.kvd-panel {
	position: absolute;
	z-index: 9999;
	width: 304px;
	box-sizing: border-box;
	padding: 14px 14px 10px;
	background: #FFFDF9;
	color: #131110;
	border: 1px solid #E5DFD4;
	border-radius: 16px;
	box-shadow: 0 2px 4px rgba(19, 17, 16, .06), 0 18px 44px rgba(19, 17, 16, .18);
	font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 14px;
	line-height: 1.2;
	-webkit-font-smoothing: antialiased;
	animation: kvd-be .14s ease-out;
}
.kvd-panel *, .kvd-panel *::before, .kvd-panel *::after { box-sizing: border-box; }
@keyframes kvd-be { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.kvd-fej {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 0 0 10px;
}
.kvd-cim {
	font-family: 'Fraunces', Georgia, serif;
	font-size: 19px;
	font-weight: 500;
	letter-spacing: -.01em;
	white-space: nowrap;
}
.kvd-cim span { color: #8A6D42; }
.kvd-lep {
	appearance: none;
	-webkit-appearance: none;
	width: 34px;
	height: 34px;
	padding: 0;
	margin: 0;
	border: 1px solid #E5DFD4;
	border-radius: 50%;
	background: #FFFDF9;
	color: #131110;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}
.kvd-lep:hover { border-color: #C19D6C; background: #F6F1E8; }
.kvd-lep span {
	width: 8px;
	height: 8px;
	border-left: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateX(1px) rotate(45deg);
}
.kvd-lep--kov span { transform: translateX(-1px) rotate(-135deg); }

.kvd-racs {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
}
.kvd-hetnap {
	text-align: center;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #8C8377;
	padding: 4px 0 6px;
}
.kvd-hetnap--hetvege { color: #A8452F; opacity: .75; }

.kvd-nap {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	height: 38px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #131110;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
	transition: background-color .1s ease;
}
.kvd-nap:hover { background: #F1ECE3; }
.kvd-nap:focus { outline: none; }
.kvd-nap:focus-visible { box-shadow: inset 0 0 0 2px #C19D6C; }
.kvd-nap.is-hetvege { color: #7A3A28; }
.kvd-nap.is-mas { color: #B9B1A5; }
.kvd-nap.is-ma { font-weight: 800; }
.kvd-nap.is-ma::after {
	content: '';
	position: absolute;
	left: 50%;
	bottom: 5px;
	width: 4px;
	height: 4px;
	margin-left: -2px;
	border-radius: 50%;
	background: #C19D6C;
}
.kvd-nap.is-sav,
.kvd-nap.is-sav-eleje,
.kvd-nap.is-sav-vege { background: #F3EADB; border-radius: 0; }
.kvd-nap.is-sav-eleje { border-radius: 10px 0 0 10px; }
.kvd-nap.is-sav-vege { border-radius: 0 10px 10px 0; }
.kvd-nap.is-sav-eleje:not(.is-valasztott) { box-shadow: inset 0 0 0 1.5px #C19D6C; }
.kvd-nap.is-valasztott,
.kvd-nap.is-valasztott:hover {
	background: #131110;
	color: #FFFDF9;
	font-weight: 700;
}
.kvd-nap.is-valasztott.is-sav-vege { border-radius: 10px; }
.kvd-nap.is-valasztott::after { background: #C19D6C; }
.kvd-nap.is-tiltott,
.kvd-nap.is-tiltott:hover {
	background: transparent;
	color: #CFC8BD;
	cursor: not-allowed;
}
/* Zárva (ünnep, zárvatartás): áthúzva, halvány piros sávval. */
.kvd-nap.is-zarva,
.kvd-nap.is-zarva:hover {
	background: #FBF1EE;
	color: #C08A7E;
	text-decoration: line-through;
	text-decoration-color: rgba(168, 69, 47, .55);
}

.kvd-lab {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid #EFE9DF;
}
.kvd-szoveg {
	appearance: none;
	-webkit-appearance: none;
	padding: 8px 10px;
	margin: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #8A6D42;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}
.kvd-szoveg:hover { background: #F6F1E8; }
.kvd-szoveg:disabled { color: #C9C1B5; cursor: default; background: transparent; }
.kvd-szoveg--zar { margin-left: auto; color: #6B6359; }

/* Telefonon alulról becsúszó lap, nagyobb célpontokkal. */
.kvd-panel--lap {
	position: fixed;
	left: 0 !important;
	right: 0;
	bottom: 0;
	top: auto !important;
	width: auto;
	border-radius: 20px 20px 0 0;
	border-bottom: 0;
	padding: 18px 16px calc(12px + env(safe-area-inset-bottom));
	animation: kvd-fel .18s ease-out;
}
@keyframes kvd-fel { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.kvd-panel--lap .kvd-nap { height: 46px; font-size: 16px; }
.kvd-panel--lap .kvd-cim { font-size: 21px; }
.kvd-panel--lap .kvd-lep { width: 40px; height: 40px; }
.kvd-panel--lap .kvd-szoveg { font-size: 15px; padding: 10px 12px; }

@media print {
	.kvd-panel, .kvd-hatter { display: none !important; }
	input.kvd-kijelzo { background-image: none !important; }
}
