.nosic-rez-wrapper {
	max-width: 900px;
	margin: 0 auto;
	overflow-x: hidden;
}

.nosic-rez-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin-top: 12px;
	font-size: 14px;
}

.nosic-rez-dot {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	margin-right: 5px;
	vertical-align: middle;
}

.nosic-rez-dot--free { background: #d4edda; border: 1px solid #7fbf8f; }
.nosic-rez-dot--pending { background: #ffe8a1; border: 1px solid #e0b400; }
.nosic-rez-dot--busy { background: #f5c2c7; border: 1px solid #c9414c; }

.nosic-rez-fc-event--pending {
	background: #ffe8a1 !important;
	border-color: #e0b400 !important;
	color: #000 !important;
}

.nosic-rez-fc-event--confirmed {
	background: #f5c2c7 !important;
	border-color: #c9414c !important;
	color: #000 !important;
}

/* FullCalendar nastavuje bielu farbu textu priamo na vnorenom .fc-event-main
   (nie len na vonkajšom evente), takže farbu treba prebiť aj tu. */
.nosic-rez-fc-event--pending .fc-event-main,
.nosic-rez-fc-event--confirmed .fc-event-main {
	color: #000 !important;
}

/* Vlastný titulok eventu (viď eventContent v JS) - nahrádza defaultný
   FullCalendar .fc-event-main-frame (flex kontajner s min-width:auto,
   ktorý sa vždy roztiahne na šírku textu namiesto zalomenia), takže
   pri jednodňovej (úzkej) bunke je text čitateľný na viac riadkoch. */
.nosic-rez-event-title {
	white-space: normal;
	overflow-wrap: break-word;
	word-break: break-word;
	line-height: 1.3;
	padding: 1px 2px;
}

/* Modal */
.nosic-rez-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
}

.nosic-rez-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.nosic-rez-modal__box {
	position: relative;
	background: #fff;
	max-width: 480px;
	margin: 8vh auto;
	padding: 28px;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	max-height: 80vh;
	overflow-y: auto;
}

.nosic-rez-modal__close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: #555;
}

.nosic-rez-term-display {
	font-weight: 600;
	margin-bottom: 16px;
}

#nosic-rez-form label,
#nosic-rez-admin-form label {
	display: block;
	margin-bottom: 14px;
	font-weight: 500;
}

#nosic-rez-form input,
#nosic-rez-form textarea,
#nosic-rez-admin-form input,
#nosic-rez-admin-form textarea {
	display: block;
	width: 100%;
	margin-top: 4px;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-sizing: border-box;
	font-size: 14px;
}

.nosic-rez-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.nosic-rez-submit,
#nosic-rez-admin-form button {
	background: #2271b1;
	color: #fff;
	border: none;
	padding: 10px 18px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
}

.nosic-rez-submit:disabled {
	opacity: 0.6;
	cursor: default;
}

.nosic-rez-form__msg {
	margin: 10px 0;
	font-size: 14px;
}

.nosic-rez-form__msg.is-error { color: #c9414c; }
.nosic-rez-form__msg.is-success { color: #2a7a3b; }

#nr-btn-delete {
	margin-left: 10px;
}

/* Záložky Kalendár / História dopytov */
.nosic-rez-tab {
	cursor: pointer;
}

#nosic-rez-view-calendar,
#nosic-rez-view-history {
	margin-top: 16px;
}

/* Tabuľka histórie dopytov */
#nosic-rez-history-table .nosic-rez-history-row {
	cursor: pointer;
}

#nosic-rez-history-table .nosic-rez-history-row:hover {
	background: #f0f6fc;
}

.nosic-rez-status-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 3px;
	font-size: 12px;
	font-weight: 600;
}

.nosic-rez-status-badge--pending {
	background: #ffe8a1;
	color: #6b5300;
}

.nosic-rez-status-badge--confirmed {
	background: #d4edda;
	color: #1f5c2e;
}

/* Voľné dni a klikací výber termínu v kalendári */
.fc-daygrid-day.nosic-rez-fc-day--free {
	background-color: #eafaf0;
}

.fc-daygrid-day.nosic-rez-fc-day--free .fc-daygrid-day-number {
	cursor: pointer;
}

.fc-daygrid-day.nosic-rez-fc-day--free:hover {
	background-color: #d4edda;
}

.fc-daygrid-day.nosic-rez-fc-day--selected {
	background-color: #bcdcff !important;
}

/* Lišta so súhrnom výberu a tlačidlom Potvrdiť je prilepená na spodok obrazovky,
   aby bola vždy viditeľná bez ohľadu na to, kam je stránka odscrollovaná. */
.nosic-rez-confirm-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99000;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 14px 20px;
	background: #eef4fb;
	border-top: 1px solid #bcdcff;
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
}

.nosic-rez-confirm-bar__text {
	font-weight: 600;
}

/* Keď je lišta zobrazená, obsah stránky pod kalendárom potrebuje rezervu miesta,
   aby ho lišta neprekrývala. Trieda sa prepína v JS podľa toho, či je výber aktívny. */
body.nosic-rez-has-confirm-bar {
	padding-bottom: 76px;
}

.nosic-rez-confirm-bar__btn {
	background: #2271b1;
	color: #fff;
	border: none;
	padding: 10px 18px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	white-space: nowrap;
}

.nosic-rez-select-msg {
	margin: 8px 0 0;
	font-size: 14px;
	color: #c9414c;
}

/* Cenník */
#nosic-rez-cennik-table input[type="number"] {
	width: 100px;
}

#nosic-rez-cennik-table td {
	vertical-align: middle;
}

/* Responzivita pre mobilné telefóny - FullCalendar hlavička (šípky + názov mesiaca +
   MESIAC/ROK) je defaultne jeden riadok bez zalomenia (flex-wrap: nowrap), čo pri
   veľkom nadpise (dedí veľké písmo z motívu) na úzkej obrazovke pretečie mimo viewport.
   Rozdelením na samostatné riadky sa vždy zmestí bez ohľadu na šírku textu nadpisu. */
@media (max-width: 600px) {
	.nosic-rez-wrapper .fc .fc-toolbar {
		flex-direction: column;
		gap: 10px;
	}

	.nosic-rez-wrapper .fc .fc-toolbar-chunk {
		display: flex;
		justify-content: center;
		flex-wrap: wrap;
		width: 100%;
	}

	.nosic-rez-wrapper .fc .fc-toolbar-title {
		font-size: 1.3em;
		text-align: center;
	}

	.nosic-rez-wrapper .fc-col-header-cell-cushion {
		font-size: 11px;
	}

	.nosic-rez-wrapper .fc-daygrid-day-number {
		font-size: 12px;
		padding: 2px 4px;
	}

	.nosic-rez-event-title {
		font-size: 10px;
	}

	/* Tlačidlo má dynamický text s cenou ("POTVRDIŤ (POČET DNÍ = 8, CENA = 40,00 €)"),
	   ktorý sa pri nowrap orezal mimo obrazovku - na mobile ho necháme zalomiť a
	   lištu preusporiadať pod seba. */
	.nosic-rez-confirm-bar {
		flex-direction: column;
		align-items: stretch;
		padding: 10px 14px;
	}

	.nosic-rez-confirm-bar__text {
		text-align: center;
	}

	.nosic-rez-confirm-bar__btn {
		white-space: normal;
		width: 100%;
		text-align: center;
	}

	body.nosic-rez-has-confirm-bar {
		padding-bottom: 110px;
	}
}
