/**
 * Urgenca - Tabele velikosti, front end styles.
 *
 * Every colour is exposed as a plain property so that the Elementor widget can
 * override it through its own selectors without any custom CSS.
 */

.urg-sg {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.urg-sg--align-center {
	align-items: center;
}

.urg-sg--align-right {
	align-items: flex-end;
}

.urg-sg--align-left {
	align-items: flex-start;
}

.urg-sg--align-stretch {
	align-items: stretch;
}


/* Trigger ---------------------------------------------------------------- */

.urg-sg .urg-sg__trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 9px 16px;
	border: 1px solid #d5d8dc;
	border-radius: 4px;
	background-color: transparent;
	box-shadow: none;
	color: inherit;
	font: inherit;
	line-height: 1.3;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	letter-spacing: normal;
	cursor: pointer;
	transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
	width: auto;
}

.urg-sg .urg-sg__trigger:hover,
.urg-sg .urg-sg__trigger:focus-visible {
	border-color: #1a1a1a;
	background-color: transparent;
	color: inherit;
}

.urg-sg .urg-sg__trigger:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.urg-sg__icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
}

.urg-sg__icon svg {
	display: block;
	width: 18px;
	height: 18px;
}

/* Modal ------------------------------------------------------------------ */

.urg-sg__modal {
	position: fixed;
	inset: 0;
	z-index: 999990;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	transition: opacity 0.18s ease;
}

.urg-sg__modal[hidden] {
	display: none;
}

/* While closing (or before opening) the overlay must not swallow clicks. */
.urg-sg__modal:not(.is-open) {
	pointer-events: none;
}

.urg-sg__modal.is-open {
	opacity: 1;
	pointer-events: auto;
}

.urg-sg__backdrop {
	position: absolute;
	inset: 0;
	background-color: rgba(15, 18, 22, 0.6);
	cursor: pointer;
}

.urg-sg__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 760px;
	max-height: calc(100vh - 40px);
	max-height: calc(100dvh - 40px);
	overflow: hidden;
	border-radius: 8px;
	--urg-sg-dialog-bg: #ffffff;
	background-color: #ffffff;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
	transform: translateY(10px);
	transition: transform 0.18s ease;
	text-align: left;
}

.urg-sg__modal.is-open .urg-sg__dialog {
	transform: none;
}

.urg-sg__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid #e6e8ea;
}

.urg-sg__title {
	margin: 0;
	padding: 0;
	color: #16181a;
	font-size: 20px;
	line-height: 1.25;
	font-weight: 600;
}

.urg-sg .urg-sg__close {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: transparent;
	box-shadow: none;
	color: #55595e;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.urg-sg .urg-sg__close:hover,
.urg-sg .urg-sg__close:focus-visible {
	background-color: #f0f1f3;
	color: #16181a;
}

.urg-sg .urg-sg__close:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.urg-sg__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 18px 20px 20px;
	-webkit-overflow-scrolling: touch;
}

.urg-sg__intro,
.urg-sg__note {
	margin: 0;
	color: #55595e;
	font-size: 14px;
	line-height: 1.55;
}

.urg-sg__intro {
	margin-bottom: 14px;
}

.urg-sg__intro p {
	margin: 0 0 8px;
}

.urg-sg__intro p:last-child {
	margin-bottom: 0;
}

.urg-sg__note {
	margin-top: 14px;
}

/* Table ------------------------------------------------------------------ */

.urg-sg__table-box {
	position: relative;
}

.urg-sg__table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: #b9bfc5 transparent;
}

.urg-sg__table-wrap::-webkit-scrollbar {
	height: 9px;
}

.urg-sg__table-wrap::-webkit-scrollbar-track {
	border-radius: 5px;
	background: rgba(0, 0, 0, 0.06);
}

.urg-sg__table-wrap::-webkit-scrollbar-thumb {
	border-radius: 5px;
	background: #b9bfc5;
}

.urg-sg__table-wrap:focus-visible {
	outline: 2px solid #16181a;
	outline-offset: 2px;
}

/* Visible hint that the table can be moved sideways. */
.urg-sg__fade {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 9px;
	width: 40px;
	opacity: 0;
	pointer-events: none;
	background: linear-gradient( to right, transparent, var( --urg-sg-dialog-bg, #ffffff ) );
	transition: opacity 0.15s ease;
}

.urg-sg__table-scroll.is-scrollable .urg-sg__fade {
	opacity: 1;
}

.urg-sg__table-scroll.is-scrollable.is-at-end .urg-sg__fade {
	opacity: 0;
}

.urg-sg__scroll-hint {
	display: none;
	margin: 8px 0 0;
	color: #6b7075;
	font-size: 13px;
	line-height: 1.4;
}

.urg-sg__table-scroll.is-scrollable .urg-sg__scroll-hint {
	display: block;
}

.urg-sg__table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	color: #16181a;
	font-size: 15px;
	line-height: 1.4;
}

.urg-sg__table th,
.urg-sg__table td {
	padding: 10px 14px;
	border: 1px solid #e2e5e8;
	text-align: left;
	vertical-align: middle;
	background-image: none;
	/* Short cells (sizes, measurements) stay on one line, see cell_class() in PHP. */
	white-space: nowrap;
}

.urg-sg__table th.urg-sg__cell--wrap,
.urg-sg__table td.urg-sg__cell--wrap {
	min-width: 12em;
	max-width: 24em;
	white-space: normal;
	overflow-wrap: break-word;
	word-break: normal;
	hyphens: auto;
}

.urg-sg__table thead th {
	background-color: #f4f5f7;
	color: #16181a;
	font-weight: 600;
}

.urg-sg__table tbody th {
	font-weight: 600;
}

.urg-sg__table tbody tr:nth-child(even) th,
.urg-sg__table tbody tr:nth-child(even) td {
	background-color: #fafbfc;
}

/* Scroll lock ------------------------------------------------------------ */

body.urg-sg-modal-open {
	overflow: hidden;
}

/* Small screens ---------------------------------------------------------- */

@media (max-width: 600px) {
	.urg-sg__modal {
		padding: 12px;
	}

	.urg-sg__dialog {
		max-height: calc(100vh - 24px);
		max-height: calc(100dvh - 24px);
	}

	.urg-sg__header {
		padding: 14px 16px;
	}

	.urg-sg__body {
		padding: 14px 16px 16px;
	}

	.urg-sg__title {
		font-size: 17px;
	}

	.urg-sg__table {
		font-size: 14px;
	}

	.urg-sg__table th,
	.urg-sg__table td {
		padding: 8px 10px;
	}
}

/* Reduced motion --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.urg-sg .urg-sg__trigger,
	.urg-sg .urg-sg__close,
	.urg-sg__modal,
	.urg-sg__dialog,
	.urg-sg__fade {
		transition: none;
	}

	.urg-sg__dialog {
		transform: none;
	}
}
