/* Kalendarz frontend styles - Kopia 1:1 The Events Calendar V2 (panel) */
.se-calendar-wrapper {
	position: relative;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	max-width: 1200px;
	margin: 0 auto;
	color: #141827;
}

/* ==========================================================================
   Header (Pasek górny)
   ========================================================================== */
.tribe-events-header {
	margin-bottom: 2rem;
}

.tribe-events-c-top-bar {
	display: flex;
	flex-wrap: nowrap; /* Zapobiegamy zawijaniu w headerze */
	align-items: center;
	justify-content: space-between;
	padding-bottom: 1rem;
	position: relative;
	gap: 16px;
	width: 100%;
}

/* Przycisk "Aktualny miesiąc" - ukrywamy lub przesuwamy jeśli psuje layout */
.tribe-events-c-top-bar__today-button {
	display: none; /* Ukrywamy go by pasowało do screena */
}

/* Tytuł miesiąca */
.tribe-events-c-top-bar__datepicker {
	order: 1;
	flex: 1 1 auto;
	min-width: 0;
	text-align: left;
}

.tribe-events-c-top-bar__datepicker-time {
	margin: 0;
	font-size: 2rem;
	font-weight: 600;
	color: #141827;
	white-space: nowrap;
	cursor: pointer;
	line-height: 1.2;
}

/* Kontener na nawigację i ikonę (poziomo obok siebie) */
.se-header-controls-right {
	order: 2;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	margin-left: auto;
	gap: 15px;
	white-space: nowrap;
}

.tribe-events-c-top-bar__nav-list {
	display: flex;
	list-style: none;
	margin: 0 !important;
	padding: 0 !important;
	gap: 10px;
}

.tribe-common-c-btn-icon {
	background: transparent;
	border: none;
	padding: 2px;
	color: #666;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tribe-common-c-btn-icon svg {
	width: 14px;
	height: auto;
}

/* Przełącznik widoku */
.tribe-events-c-view-selector {
	display: flex;
	align-items: center;
	position: relative;
}

.se-view-selector-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.se-view-selector-btn::after {
	content: none;
}

.tribe-events-c-view-selector__button-text {
	display: inline-block;
	margin-left: 4px;
	font-size: 1rem;
	font-weight: 500;
	color: #141827;
}

.tribe-events-c-view-selector__content {
	position: absolute;
	top: 100%;
	right: 0;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	box-shadow: 0 4px 6px rgba(0,0,0,0.1);
	z-index: 100;
	min-width: 150px;
}

.tribe-events-c-view-selector__list {
	list-style: none;
	margin: 0 !important;
	padding: 0 !important;
}

.tribe-events-c-view-selector__list-item-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 15px;
	color: #141827;
	text-decoration: none;
	font-weight: 400;
	font-size: 0.9rem;
}

/* Datepicker popup */
.se-datepicker-content {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	background: #fff;
	border: 1px solid #e0e0e0;
	padding: 15px;
	box-shadow: 0 4px 6px rgba(0,0,0,0.1);
	z-index: 101;
	min-width: 250px;
}

.se-datepicker-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}

.se-datepicker-month {
	padding: 5px;
	text-align: center;
	cursor: pointer;
	font-size: 0.85rem;
	border-radius: 4px;
}

.se-datepicker-month:hover {
	background: #f0f0f0;
}

.se-datepicker-month--active {
	background: #316cbb;
	color: #fff;
}

/* ==========================================================================
   WIDOK: MIESIĄC
   ========================================================================== */
.tribe-events-calendar-month__header {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	border: 1px solid #e0e0e0;
	border-bottom: none;
	background: #fff;
}

.tribe-events-calendar-month__header-column {
	text-align: center;
	padding: 10px 5px;
	border-right: 1px solid #e0e0e0;
}

.tribe-events-calendar-month__header-column-title {
	margin: 0;
	font-size: 0.8rem;
	font-weight: 500;
	text-transform: uppercase;
	color: #141827;
}

.tribe-events-calendar-month__body {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e0e0e0;
}

.tribe-events-calendar-month__row {
	position: relative;
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	min-height: 140px;
	border-bottom: 1px solid #e0e0e0;
}

.tribe-events-calendar-month__row:last-child {
	border-bottom: none;
}

.se-week-days {
	display: contents;
}

.se-multiday-lane {
	position: absolute;
	top: 30px;
	left: 0;
	right: 0;
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	align-content: start;
	gap: 2px 0;
	padding: 0 2px;
	z-index: 2;
	pointer-events: none;
}

.se-multiday-bar {
	pointer-events: auto;
	align-self: stretch;
	border-radius: 4px;
	font-size: 0.75rem;
	line-height: 1.35;
	min-height: 20px;
	padding: 2px 8px;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.se-multiday-bar__link {
	display: block;
	color: inherit;
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.se-multiday-bar__link .se-multiday-bar__time,
.se-multiday-bar__link .se-multiday-bar__title {
	color: inherit;
}

.se-multiday-bar__link:hover,
.se-multiday-bar__link:focus,
.se-multiday-bar__link:hover .se-multiday-bar__time,
.se-multiday-bar__link:hover .se-multiday-bar__title,
.se-multiday-bar__link:focus .se-multiday-bar__time,
.se-multiday-bar__link:focus .se-multiday-bar__title {
	color: inherit !important;
	text-decoration: none !important;
}

.se-multiday-bar.se-event--open {
	background-color: #ff5806;
	color: #fff;
}

.se-multiday-bar.se-event--open .se-multiday-bar__link:hover,
.se-multiday-bar.se-event--open .se-multiday-bar__link:focus {
	color: #fff !important;
}

.se-multiday-bar.se-event--closed {
	background-color: #a39e98;
	color: #fff;
}

.se-multiday-bar.se-event--closed .se-multiday-bar__link:hover,
.se-multiday-bar.se-event--closed .se-multiday-bar__link:focus {
	color: #fff !important;
}

.se-multiday-bar.se-event--default {
	background-color: #d8e2ff;
	color: #141827;
}

.se-row-has-multiday .tribe-events-calendar-month__events {
	margin-top: 24px;
}

.tribe-events-calendar-month__day {
	background: #fff;
	padding: 5px;
	display: flex;
	flex-direction: column;
	border-right: 1px solid #e0e0e0;
	position: relative;
}

.se-week-days .tribe-events-calendar-month__day:nth-child(7n) {
	border-right: none;
}

.tribe-events-calendar-month__day--other-month .tribe-events-calendar-month__day-date-daynum {
	color: #999;
}

.tribe-events-calendar-month__day-date {
	margin-bottom: 5px;
	text-align: right;
}

.tribe-events-calendar-month__day-date-daynum {
	font-size: 0.9rem;
	color: #141827;
}

.tribe-events-calendar-month__day--current .tribe-events-calendar-month__day-date-daynum {
	color: #ff5722;
	font-weight: 700;
}

/* Eventy w siatce */
.tribe-events-calendar-month__events {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.tribe-events-calendar-month__calendar-event {
	border-radius: 4px;
	font-size: 0.75rem;
	line-height: 1.3;
	padding: 2px 4px;
}

.tribe-events-calendar-month__calendar-event-title-link {
	text-decoration: none;
	color: inherit;
}

/* Kolory statusów */
.se-event--open { background-color: #d8e2ff; color: #141827; }
.se-event--closed { background-color: transparent; color: #666; }

/* ==========================================================================
   WIDOK: LISTA
   ========================================================================== */
.tribe-events-calendar-list__month-separator {
	margin: 2rem 0 1rem;
	border-bottom: 1px solid #e0e0e0;
	padding-bottom: 0.5rem;
}

.tribe-events-calendar-list__month-separator-text {
	font-size: 1.2rem;
	font-weight: 600;
	color: #141827;
}

.tribe-events-calendar-list__event-row {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	padding: 24px 0;
	border-bottom: 1px solid #e5e7eb;
}

.tribe-events-calendar-list__event-date-tag {
	min-width: 70px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: #141827;
	text-decoration: none;
	line-height: 1.1;
}

.tribe-events-calendar-list__event-date-tag-month {
	font-size: 0.95rem;
	font-weight: 600;
	text-transform: capitalize;
}

.tribe-events-calendar-list__event-date-tag-daynum {
	font-size: 2rem;
	font-weight: 700;
	margin-top: 2px;
}

.tribe-events-calendar-list__event-wrapper {
	flex: 1 1 auto;
	min-width: 0;
}

.tribe-events-calendar-list__event {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	background: transparent !important;
}

.tribe-events-calendar-list__event-featured-image-wrapper {
	flex: 0 0 380px;
	max-width: 380px;
}

.tribe-events-calendar-list__event-featured-image-link {
	display: block;
	text-decoration: none;
	background: transparent !important;
}

.tribe-events-calendar-list__event-featured-image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 0;
}

.tribe-events-calendar-list__event-details {
	flex: 1 1 auto;
	min-width: 0;
	background: transparent !important;
}

.tribe-events-calendar-list__event-header {
	margin-bottom: 8px;
}

.tribe-events-calendar-list__event-datetime {
	display: block;
	font-size: 0.95rem;
	color: #1f2937;
	margin-bottom: 6px;
}

.tribe-events-calendar-list__event-title {
	margin: 0;
	font-size: 2rem;
	line-height: 1.15;
	font-weight: 700;
}

.tribe-events-calendar-list__event-title-link {
	color: #0f172a !important;
	text-decoration: none;
	background: transparent !important;
	box-shadow: none !important;
}

.tribe-events-calendar-list__event-title-link:hover {
	color: #0f172a !important;
	text-decoration: underline;
}

.tribe-events-calendar-list__event-description {
	font-size: 1rem;
	line-height: 1.6;
	color: #111827;
	background: transparent !important;
}

.tribe-events-calendar-list__event-description p {
	margin: 0;
}

.tribe-events-calendar-list__notice {
	padding: 24px 0;
	color: #4b5563;
}

/* ==========================================================================
   MOBILE
   ========================================================================== */
.se-day-dot-wrapper {
	display: none;
}

.se-mobile-events-tray {
	display: none;
	margin-top: 20px;
	padding: 15px;
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
}

.se-mobile-events-tray-header {
	font-weight: 700;
	font-size: 1.1rem;
	margin-bottom: 15px;
	color: #ff5722;
}

.se-mobile-event-item {
	padding: 10px 12px;
	border-radius: 6px;
	margin-bottom: 8px;
}

.se-mobile-event-item:last-child {
	margin-bottom: 0;
}

.se-mobile-event-time {
	font-size: 0.85rem;
	line-height: 1.45;
	color: #1f2937;
	margin-bottom: 6px;
	white-space: normal;
}

.se-mobile-event-item--multiday .se-mobile-event-time {
	font-weight: 600;
}

.se-mobile-event-title {
	display: block;
	font-size: 0.95rem;
	line-height: 1.35;
	color: #ff5806;
	text-decoration: none;
}

.se-mobile-event-item.se-event--closed .se-mobile-event-title {
	color: #a39e98;
}

.se-mobile-event-title:hover,
.se-mobile-event-title:focus {
	text-decoration: underline;
}

@media (max-width: 768px) {
	.tribe-events-c-top-bar {
		flex-wrap: nowrap;
		justify-content: center;
		gap: 10px;
	}
	
	.tribe-events-c-top-bar__datepicker,
	.se-header-controls-right {
		width: auto;
		flex: 0 0 auto;
		margin-right: 0;
	}

	.tribe-events-c-top-bar__datepicker-time {
		font-size: 1.8rem;
	}

	.se-header-controls-right {
		margin-left: 0;
		gap: 10px;
	}

	.se-multiday-lane {
		display: none;
	}

	.tribe-events-calendar-month__row {
		min-height: auto !important;
	}

	.se-row-has-multiday .tribe-events-calendar-month__events {
		margin-top: 0;
	}

	.tribe-events-calendar-month__day {
		aspect-ratio: 1 / 1;
		min-height: unset !important;
		justify-content: center;
		align-items: center;
		padding: 0 !important;
	}

	.tribe-events-calendar-month__day-date {
		margin: 0 !important;
		text-align: center !important;
	}

	.tribe-events-calendar-month__calendar-event {
		display: none;
	}

	.se-day-dot-wrapper {
		display: block;
		position: absolute;
		bottom: 5px;
	}

	.se-day-dot {
		display: block;
		width: 4px;
		height: 4px;
		background-color: #ff5722;
		border-radius: 50%;
	}

	.se-mobile-day-active {
		background-color: #fff9f6 !important;
		border: 1px solid #ff5722 !important;
		z-index: 2;
	}

	.tribe-events-calendar-list__event-row {
		gap: 12px;
		padding: 16px 0;
	}

	.tribe-events-calendar-list__event-date-tag {
		min-width: 54px;
	}

	.tribe-events-calendar-list__event-date-tag-daynum {
		font-size: 1.4rem;
	}

	.tribe-events-calendar-list__event {
		flex-direction: column;
		gap: 12px;
	}

	.tribe-events-calendar-list__event-featured-image-wrapper {
		flex: 0 0 auto;
		max-width: 100%;
		width: 100%;
	}

	.tribe-events-calendar-list__event-title {
		font-size: 1.5rem;
	}
}

/* Loader */
.se-calendar-loader {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(255,255,255,0.7);
	display: flex; justify-content: center; align-items: center;
	z-index: 10;
}
.se-spinner {
	width: 40px; height: 40px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #141827;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
