/* SRNiKC Calendar – frontend styles */

:root {
	--srnikc-primary: #003366;
	--srnikc-primary-hover: #004d99;
	--srnikc-accent: #e8b923;
	--srnikc-border: #d9e2ec;
	--srnikc-bg: #f7f9fc;
	--srnikc-text: #1a202c;
	--srnikc-muted: #64748b;
	--srnikc-radius: 10px !important;
	--srnikc-shadow: 0 8px 24px rgba(0, 51, 102, 0.08);
}

.srnikc-calendar-wrap {
	width: 100%;
	max-width: 100%;
	margin: 0 auto 3rem;
	font-family: inherit;
	color: var(--srnikc-text);
}

/* Filtry */
.srnikc-filters {
	background: #fff;
	border: 1px solid var(--srnikc-border);
	border-radius: var(--srnikc-radius);
	padding: 1.25rem 1.5rem;
	margin-bottom: 1.5rem;
	box-shadow: var(--srnikc-shadow);
}

.srnikc-filters__row {
	display: grid;
	grid-template-columns: 2fr repeat(4, 1fr) auto;
	gap: 1rem;
	align-items: end;
}

.srnikc-filters__field label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	margin-bottom: 0.35rem;
	color: var(--srnikc-muted);
}

.srnikc-filters__field input[type="search"] {
	width: 100%;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--srnikc-border);
	border-radius: 6px;
	font-size: 0.95rem;
	background: #fff;
}

.srnikc-filters__actions {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

/* Custom select */
.srnikc-custom-select {
	position: relative;
	width: 100%;
}

.srnikc-custom-select__label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	margin-bottom: 0.35rem;
	color: var(--srnikc-muted);
}

.srnikc-custom-select__wrap {
	position: relative;
}

.srnikc-custom-select__native {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.srnikc-custom-select__trigger {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.6rem 0.85rem;
	border: 1px solid var(--srnikc-border);
	border-radius: 8px;
	background: #fff;
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--srnikc-text);
	cursor: pointer;
	text-align: left;
	transition: border-color 0.2s, box-shadow 0.2s;
	min-height: 44px;
}

.srnikc-custom-select__trigger:hover {
	border-color: #b8c9d9;
}

.srnikc-custom-select.is-open .srnikc-custom-select__trigger,
.srnikc-custom-select__trigger:focus {
	outline: none;
	border-color: var(--srnikc-primary);
	box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.12);
}

.srnikc-custom-select__swatch,
.srnikc-custom-select__option-swatch {
	width: 12px;
	height: 12px;
	border-radius: 3px;
	flex-shrink: 0;
	border: 1px solid rgba(0, 0, 0, 0.12);
}

.srnikc-custom-select__value {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.srnikc-custom-select__chevron {
	display: flex;
	align-items: center;
	color: var(--srnikc-muted);
	transition: transform 0.2s;
}

.srnikc-custom-select.is-open .srnikc-custom-select__chevron {
	transform: rotate(180deg);
}

.srnikc-custom-select__dropdown {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: 50;
	margin: 0;
	padding: 0.4rem;
	list-style: none;
	background: #fff;
	border: 1px solid var(--srnikc-border);
	border-radius: 10px;
	box-shadow: 0 12px 32px rgba(0, 51, 102, 0.14);
	max-height: 280px;
	overflow-y: auto;
	animation: srnikcDropdownIn 0.18s ease;
}

@keyframes srnikcDropdownIn {
	from { opacity: 0; transform: translateY(-6px); }
	to { opacity: 1; transform: translateY(0); }
}

.srnikc-custom-select__dropdown[hidden] {
	display: none;
}

.srnikc-custom-select__option {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.6rem 0.75rem;
	border-radius: 7px;
	font-size: 0.92rem;
	font-weight: 500;
	color: var(--srnikc-text);
	cursor: pointer;
	transition: background 0.15s;
}

.srnikc-custom-select__option.has-swatch .srnikc-custom-select__option-swatch {
	background-color: var(--srnikc-swatch-color, var(--srnikc-primary));
}

.srnikc-custom-select__option:hover,
.srnikc-custom-select__option:focus {
	background: var(--srnikc-bg);
	outline: none;
}

.srnikc-custom-select__option.is-selected {
	background: rgba(0, 51, 102, 0.08);
	color: var(--srnikc-primary);
	font-weight: 700;
}

.srnikc-custom-select__option-text {
	flex: 1;
	min-width: 0;
}

/* Przyciski */
.srnikc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.6rem 1.25rem;
	border-radius: 6px;
	border: 1px solid transparent;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.srnikc-btn--primary {
	background: var(--srnikc-primary);
	color: #fff;
}

.srnikc-btn--primary:hover {
	background: var(--srnikc-primary-hover);
	color: #fff;
}

.srnikc-btn--ghost {
	background: transparent;
	border-color: var(--srnikc-border);
	color: var(--srnikc-text);
}

.srnikc-btn--ghost:hover {
	border-color: var(--srnikc-primary);
	color: var(--srnikc-primary);
}

.srnikc-btn--lg {
	padding: 0.85rem 2rem;
	font-size: 1rem;
}

/* Toolbar widoków */
.srnikc-calendar-toolbar {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 1rem;
}

.srnikc-view-switch {
	display: inline-flex;
	border: 1px solid var(--srnikc-border);
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.srnikc-view-btn {
	padding: 0.55rem 1.1rem;
	border: none;
	background: transparent;
	cursor: pointer;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--srnikc-muted);
	border-radius: 6px !important;
}

.srnikc-view-btn.is-active {
	background: var(--srnikc-primary);
	color: #fff;
}

/* Kalendarz FullCalendar */
.srnikc-calendar {
	background: #fff;
	border: 1px solid var(--srnikc-border);
	border-radius: var(--srnikc-radius);
	padding: 1rem;
	min-height: 650px;
	box-shadow: var(--srnikc-shadow);
}

.srnikc-calendar .fc {
	font-size: 1rem;
}

.srnikc-calendar .fc-toolbar-title {
	font-size: 1.5rem !important;
	font-weight: 700;
	color: var(--srnikc-primary);
}

.srnikc-calendar .fc-button-primary {
	background: var(--srnikc-primary) !important;
	border-color: var(--srnikc-primary) !important;
}

.srnikc-calendar .fc-event {
	cursor: pointer;
	font-size: 0.85rem;
	padding: 2px 4px;
	border-radius: 4px;
	border-width: 1px;
	border-style: solid;
}

.srnikc-calendar .fc-event:hover {
	filter: brightness(1.08);
}

.srnikc-calendar .fc-daygrid-event-dot {
	display: none;
}

/* Nadchodzące wydarzenia */
.srnikc-upcoming {
	margin-top: 3rem;
}

.srnikc-upcoming__title {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--srnikc-primary);
	margin-bottom: 1.5rem;
	padding-bottom: 0.75rem;
	border-bottom: 3px solid var(--srnikc-accent);
}

.srnikc-upcoming__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.5rem;
}

.srnikc-upcoming-card {
	background: #fff;
	border: 1px solid var(--srnikc-border);
	border-radius: var(--srnikc-radius);
	overflow: hidden;
	box-shadow: var(--srnikc-shadow);
	transition: transform 0.2s, box-shadow 0.2s;
	cursor: pointer;
	border-top: 4px solid var(--srnikc-card-accent, var(--srnikc-primary));
}

.srnikc-upcoming-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 32px rgba(0, 51, 102, 0.12);
}

.srnikc-upcoming-card__image {
	width: 100%;
	height: 180px;
	object-fit: cover;
	background: var(--srnikc-bg);
}

.srnikc-upcoming-card__body {
	padding: 1.25rem;
}

.srnikc-upcoming-card__date {
	font-size: 0.8rem;
	color: var(--srnikc-card-accent, var(--srnikc-accent));
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	margin-bottom: 0.5rem;
}

.srnikc-upcoming-card__title {
	font-size: 1.15rem;
	font-weight: 700;
	margin: 0 0 0.5rem;
	color: var(--srnikc-primary);
	line-height: 1.3;
}

.srnikc-upcoming-card__excerpt {
	font-size: 0.9rem;
	color: var(--srnikc-muted);
	line-height: 1.5;
	margin: 0;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.srnikc-upcoming__empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 2rem;
	color: var(--srnikc-muted);
	font-style: italic;
}

/* Modal */
.srnikc-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.srnikc-modal[hidden] {
	display: none;
}

.srnikc-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 20, 40, 0.6);
	backdrop-filter: blur(2px);
}

.srnikc-modal__dialog {
	position: relative;
	background: #fff;
	border-radius: var(--srnikc-radius);
	max-width: 560px;
	width: 100%;
	max-height: 90vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	animation: srnikcModalIn 0.25s ease;
}

@keyframes srnikcModalIn {
	from { opacity: 0; transform: scale(0.95) translateY(10px); }
	to { opacity: 1; transform: scale(1) translateY(0); }
}

.srnikc-modal__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	width: 36px;
	height: 36px;
	border: none;
	background: rgba(255, 255, 255, 0.9);
	border-radius: 50%;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	color: var(--srnikc-text);
}

.srnikc-modal__image-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f8fafc;
	padding: 1rem;
	min-height: 120px;
}

.srnikc-modal__image {
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 220px;
	object-fit: contain;
	display: block;
}

.srnikc-modal__image[src=""] {
	display: none;
}

.srnikc-modal__layout {
	padding: 0;
	overflow-y: auto;
	flex: 1 1 auto;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.srnikc-modal__zone {
	padding: 0 1.5rem;
}

.srnikc-modal__zone--header {
	padding-top: 1.25rem;
}

.srnikc-modal__zone--intro,
.srnikc-modal__zone--content,
.srnikc-modal__zone--tags {
	padding-bottom: 0.25rem;
}

.srnikc-modal__zone + .srnikc-modal__zone,
.srnikc-modal__zone + .srnikc-modal__public-fields,
.srnikc-modal__public-fields {
	margin-top: 0.5rem;
}

.srnikc-modal__meta-line {
	margin: 0 0 0.4rem;
	font-size: 0.92rem;
	line-height: 1.5;
	color: var(--srnikc-text);
}

.srnikc-modal__zone--header .srnikc-modal__meta-line:last-child {
	margin-bottom: 0;
}

.srnikc-modal__zone--header .srnikc-modal__meta-line strong {
	display: block;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--srnikc-muted);
	margin-bottom: 0.15rem;
}

.srnikc-modal__badge {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
	background: var(--srnikc-event-accent, var(--srnikc-primary));
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	margin-bottom: 0.75rem;
}

.srnikc-modal__tags-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	align-items: center;
	margin-bottom: 0.75rem;
}

.srnikc-modal__tag-label {
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--srnikc-muted);
	margin-right: 0.25rem;
}

.srnikc-modal__tag {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
	background: var(--srnikc-bg);
	color: var(--srnikc-text);
	font-size: 0.78rem;
	font-weight: 600;
}

.srnikc-modal__description {
	font-size: 0.95rem;
	line-height: 1.65;
	color: var(--srnikc-text);
}

.srnikc-modal__description p {
	margin: 0 0 0.75rem;
}

.srnikc-modal__inline-figure {
	margin: 0 0 1rem;
}

.srnikc-modal__zone--hero {
	margin: 0;
	padding: 0;
}

.srnikc-modal__zone--hero .srnikc-modal__image-wrap {
	margin: 0;
	border-bottom: 1px solid var(--srnikc-border, #e2e8f0);
}

.srnikc-modal__zone--hero .srnikc-modal__image {
	border-radius: 0;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.srnikc-modal__body {
	padding: 1.5rem;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.srnikc-modal__title {
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--srnikc-primary);
	margin: 0 0 0.85rem;
	overflow-wrap: anywhere;
	word-break: break-word;
	line-height: 1.3;
}

.srnikc-modal__zone--header .srnikc-modal__title {
	margin-bottom: 0.75rem;
}

.srnikc-modal__meta {
	list-style: none;
	padding: 0;
	margin: 0 0 1rem;
}

.srnikc-modal__meta li {
	padding: 0.35rem 0;
	font-size: 0.95rem;
}

.srnikc-modal__excerpt {
	font-size: 0.95rem;
	color: var(--srnikc-text);
	line-height: 1.65;
	margin: 0 0 1rem;
	padding-top: 0.25rem;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.srnikc-modal__public-fields {
	display: grid;
	gap: 0.75rem;
	margin: 0 0 1rem;
	padding: 1rem 1.5rem 0;
	border-top: 1px solid var(--srnikc-border, #d9e2ec);
}

.srnikc-modal__public-field dt {
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--srnikc-muted);
	margin-bottom: 0.2rem;
}

.srnikc-modal__public-field dd {
	margin: 0;
	font-size: 0.92rem;
	color: var(--srnikc-text, #1e293b);
	line-height: 1.5;
	overflow-wrap: anywhere;
	word-break: break-word;
	white-space: pre-wrap;
}

.srnikc-modal__public-field dd a {
	color: var(--srnikc-primary, #003366);
	font-weight: 600;
}

.srnikc-modal__public-image {
	display: block;
	max-width: 100%;
	max-height: 16rem;
	width: auto;
	margin: 0.25rem 0 0;
	border-radius: 0.75rem;
	border: 1px solid var(--srnikc-border, #d9e2ec);
	object-fit: contain;
	background: #f8fafc;
}

/* Responsywność */
@media (max-width: 1100px) {
	.srnikc-filters__row {
		grid-template-columns: 1fr 1fr;
	}
}

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

	.srnikc-calendar {
		min-height: 500px;
		padding: 0.5rem;
	}

	.srnikc-upcoming__grid {
		grid-template-columns: 1fr;
	}
}
