/**
 * Card listing view styles.
 *
 * @package Tobalt_Renginiai
 * @author  Tobalt — https://tobalt.lt
 *
 * Site palette (Sava Platforma):
 *   Primary:   var(--tr-color-heading, #003333)  (dark teal)
 *   Secondary: var(--tr-color-primary, #008E67)  (green)
 *   Accent:    var(--tr-color-primary-light, #45B389)  (light green)
 *   Gray:      #54595F
 *   Text:      #000000
 *   Font: "Poppins", sans-serif
 */

/* ==========================================================================
   Reset — override theme globals inside plugin scope
   ========================================================================== */

.tcv-wrapper,
.tcv-wrapper *,
.tcv-wrapper *::before,
.tcv-wrapper *::after {
	box-sizing: border-box;
	font-family: "Inter", system-ui, -apple-system, sans-serif !important;
}

.tcv-wrapper a,
.tcv-wrapper a:visited,
.tcv-wrapper a:hover,
.tcv-wrapper a:focus,
.tcv-wrapper a:active {
	text-decoration: none;
	color: inherit;
	outline-offset: 2px;
}

.tcv-wrapper button,
.tcv-wrapper input[type="button"],
.tcv-wrapper input[type="submit"],
.tcv-wrapper input[type="reset"] {
	background: none !important;
	border: none !important;
	color: inherit;
	padding: 0 !important;
	margin: 0 !important;
	font-family: inherit !important;
	font-size: inherit !important;
	line-height: inherit !important;
	height: auto !important;
	min-height: 0 !important;
	cursor: pointer;
	border-radius: 0 !important;
	white-space: normal;
	text-align: left;
	-webkit-appearance: none !important;
	appearance: none !important;
}

.tcv-wrapper h1,
.tcv-wrapper h2,
.tcv-wrapper h3,
.tcv-wrapper h4,
.tcv-wrapper h5,
.tcv-wrapper h6 {
	margin: 0;
	padding: 0;
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
	line-height: inherit;
	border: none;
}

.tcv-wrapper p {
	margin: 0;
	padding: 0;
}

.tcv-wrapper ul,
.tcv-wrapper ol {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tcv-wrapper input,
.tcv-wrapper textarea,
.tcv-wrapper select {
	font-family: inherit !important;
	font-size: inherit;
	color: inherit;
	line-height: inherit;
	margin: 0;
}

.tcv-wrapper input::placeholder,
.tcv-wrapper textarea::placeholder {
	color: #9CA3AF;
	opacity: 1;
}

.tcv-wrapper label {
	font-family: inherit !important;
	font-size: inherit;
	color: inherit;
}

.tcv-wrapper img {
	max-width: 100%;
	height: auto;
	border: none;
}

/* ==========================================================================
   Base / Wrapper
   ========================================================================== */

.tcv-wrapper {
	max-width: 1200px;
	margin: 0 auto;
	font-family: "Inter", system-ui, -apple-system, sans-serif !important;
	font-size: 15px;
	color: #000;
	line-height: 1.5;
}

/* ==========================================================================
   Top Bar
   ========================================================================== */

.tcv-wrapper .tcv-topbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin-bottom: 24px;
}

/* ==========================================================================
   Search
   ========================================================================== */

.tcv-wrapper .tcv-search {
	position: relative;
	align-self: center;
}

.tcv-wrapper .tcv-search br {
	display: none !important;
}

.tcv-wrapper .tcv-search__icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: #54595F;
	pointer-events: none;
}

.tcv-wrapper input.tcv-search__input {
	width: 100%;
	padding: 10px 12px 10px 40px !important;
	border: 1px solid #E5E7EB !important;
	border-radius: 8px !important;
	height: auto !important;
	min-height: 0 !important;
	font-family: inherit !important;
	font-size: 14px;
	color: #000;
	background: #fff;
	outline: none;
	transition: border-color 0.15s ease;
}

.tcv-wrapper input.tcv-search__input::placeholder {
	color: #54595F;
}

.tcv-wrapper input.tcv-search__input:focus {
	border-color: var(--tr-color-heading, #003333);
	outline: 2px solid var(--tr-color-heading, #003333);
	outline-offset: 2px;
}

/* ==========================================================================
   Category Pills
   ========================================================================== */

.tcv-wrapper .tcv-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
	align-items: center;
	align-self: center;
}

.tcv-wrapper button.tcv-pills__item {
	display: inline-flex !important;
	align-items: center !important;
	border-radius: 9999px !important;
	padding: 8px 16px !important;
	height: auto !important;
	min-height: 0 !important;
	line-height: 1.4 !important;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
	font-family: inherit !important;
	font-size: 14px !important;
	border: 1px solid #E5E7EB !important;
	background: #fff !important;
	color: #000 !important;
}

.tcv-wrapper button.tcv-pills__item:hover {
	background: #F3F4F6;
	color: #000;
}

.tcv-wrapper button.tcv-pills__item:focus {
	outline: 2px solid var(--tr-color-heading, #003333);
	outline-offset: 2px;
}

.tcv-wrapper button.tcv-pills__item.tcv-pills__item--active {
	background: var(--tr-color-heading, #003333) !important;
	color: #fff !important;
	border-color: var(--tr-color-heading, #003333) !important;
}

.tcv-wrapper button.tcv-pills__item.tcv-pills__item--active:hover {
	background: var(--tr-color-heading-hover, #002626);
	color: #fff;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.tcv-wrapper .tcv-layout {
	display: grid;
	grid-template-columns: 300px 1fr;
	gap: 24px;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.tcv-wrapper .tcv-sidebar {
	position: sticky;
	top: 100px;
	align-self: start;
}

/* ==========================================================================
   Content
   ========================================================================== */

.tcv-wrapper .tcv-content {
	flex-grow: 1;
	min-width: 0;
}

/* ==========================================================================
   Calendar
   ========================================================================== */

.tcv-wrapper .tcv-calendar {
	border: 1px solid #E5E7EB;
	border-radius: 12px;
	padding: 16px;
	background: #fff;
}

.tcv-wrapper .tcv-calendar__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
}

.tcv-wrapper button.tcv-calendar__nav {
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px 8px;
	color: #000;
	font-size: 16px;
	border-radius: 4px;
}

.tcv-wrapper button.tcv-calendar__nav:hover {
	background: #F3F4F6;
	color: #000;
}

.tcv-wrapper button.tcv-calendar__nav:focus {
	outline: 2px solid var(--tr-color-heading, #003333);
	outline-offset: 2px;
}

.tcv-wrapper .tcv-calendar__title {
	font-weight: 600;
	font-size: 16px;
}

.tcv-wrapper .tcv-calendar__weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	margin-bottom: 4px;
}

.tcv-wrapper .tcv-calendar__weekday {
	text-align: center;
	color: #54595F;
	font-size: 12px;
	padding: 4px 0;
}

.tcv-wrapper .tcv-calendar__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
}

.tcv-wrapper button.tcv-calendar__day {
	background: none;
	border: none;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	cursor: pointer;
	font-family: inherit !important;
	font-size: 14px;
	color: #000;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto;
	padding: 0;
	transition: background-color 0.15s ease;
}

.tcv-wrapper button.tcv-calendar__day:hover {
	background: #F3F4F6;
	color: #000;
}

.tcv-wrapper button.tcv-calendar__day:focus {
	outline: 2px solid var(--tr-color-heading, #003333);
	outline-offset: 2px;
}

.tcv-wrapper button.tcv-calendar__day.tcv-calendar__day--today {
	background: var(--tr-color-primary, #008E67);
	color: #fff;
}

.tcv-wrapper button.tcv-calendar__day.tcv-calendar__day--today:hover {
	background: var(--tr-color-primary-hover, #007A58);
	color: #fff;
}

.tcv-wrapper button.tcv-calendar__day.tcv-calendar__day--has-event {
	font-weight: 700;
}

.tcv-wrapper button.tcv-calendar__day.tcv-calendar__day--selected {
	background: #d4efe5;
}

.tcv-wrapper button.tcv-calendar__day.tcv-calendar__day--other-month {
	color: #D1D5DB;
}

/* ==========================================================================
   Filters
   ========================================================================== */

.tcv-wrapper .tcv-filter {
	margin-top: 24px;
	border: none;
	padding: 0;
}

.tcv-wrapper .tcv-filter__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.tcv-wrapper .tcv-filter__title {
	font-weight: 600;
	font-size: 14px;
	color: #000;
}

.tcv-wrapper button.tcv-filter__clear {
	color: var(--tr-color-heading, #003333);
	cursor: pointer;
	font-size: 13px;
	background: none;
	border: none;
	font-family: inherit !important;
	padding: 0;
}

.tcv-wrapper button.tcv-filter__clear:hover {
	text-decoration: underline;
	color: var(--tr-color-heading, #003333);
}

.tcv-wrapper button.tcv-filter__clear:focus {
	outline: 2px solid var(--tr-color-heading, #003333);
	outline-offset: 2px;
}

.tcv-wrapper button.tcv-filter__toggle {
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	color: #000;
	transition: transform 0.2s ease;
}

.tcv-wrapper button.tcv-filter__toggle:focus {
	outline: 2px solid var(--tr-color-heading, #003333);
	outline-offset: 2px;
}

.tcv-wrapper .tcv-filter--collapsed .tcv-filter__toggle {
	transform: rotate(-90deg);
}

.tcv-wrapper .tcv-filter--collapsed .tcv-filter__list {
	display: none;
}

.tcv-wrapper .tcv-filter__list {
	margin-top: 8px;
	list-style: none;
	padding: 0;
}

.tcv-wrapper .tcv-filter__item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 8px;
	cursor: pointer;
	font-size: 14px;
	color: #000;
	border-radius: 6px;
	transition: background 0.15s;
}

.tcv-wrapper .tcv-filter__item:hover {
	background: #F3F4F6;
}

.tcv-wrapper .tcv-filter__item:has(input:checked) {
	background: #E8F5EF;
	font-weight: 600;
}

.tcv-wrapper .tcv-filter__item:focus-within {
	outline: 2px solid var(--tr-color-heading, #003333);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Custom Checkbox */
.tcv-wrapper input.tcv-filter__checkbox {
	appearance: none;
	-webkit-appearance: none;
	width: 20px;
	height: 20px;
	border: 2px solid #9CA3AF;
	border-radius: 4px;
	cursor: pointer;
	position: relative;
	flex-shrink: 0;
	background: #fff;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.tcv-wrapper input.tcv-filter__checkbox:hover {
	border-color: var(--tr-color-heading, #003333);
}

.tcv-wrapper input.tcv-filter__checkbox:checked {
	background: var(--tr-color-primary, #008E67);
	border-color: var(--tr-color-primary, #008E67);
}

.tcv-wrapper input.tcv-filter__checkbox:checked::after {
	content: "";
	position: absolute;
	left: 6px;
	top: 2px;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.tcv-wrapper input.tcv-filter__checkbox:focus {
	outline: 2px solid var(--tr-color-heading, #003333);
	outline-offset: 2px;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.tcv-wrapper .tcv-cards {
	display: flex;
	flex-direction: column;
	gap: 16px;
	transition: opacity 0.2s ease;
}

.tcv-wrapper .tcv-cards--loading {
	opacity: 0.5;
}

.tcv-wrapper .tcv-card {
	display: flex;
	border-radius: 10px;
	overflow: hidden;
	background: #f7f7f7;
	transition: box-shadow 0.15s ease;
}

.tcv-wrapper .tcv-card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* ── Date Column ────────────────────────────────────── */

.tcv-wrapper .tcv-card__date-col {
	flex: 0 0 140px;
	background: var(--tr-color-primary, #003333);
	border-radius: 5px;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0 20px 20px;
	gap: 2px;
}

.tcv-wrapper .tcv-card__date-category {
	background: var(--tr-color-primary, #008E67);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	padding: 5px 14px;
	border-radius: 0 0 4px 4px;
	margin-bottom: 8px;
	white-space: nowrap;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tcv-wrapper .tcv-card__date-day {
	font-size: 52px;
	font-weight: 700;
	line-height: 1.1;
	color: #f7f7f7;
}

.tcv-wrapper .tcv-card__date-month {
	font-size: 18px;
	font-weight: 700;
	color: #f7f7f7;
	text-transform: capitalize;
}

.tcv-wrapper .tcv-card__date-year {
	font-size: 18px;
	font-weight: 700;
	color: #f7f7f7;
}

/* ── Image Column (hidden by default, shown by skin) ── */

.tcv-wrapper .tcv-card__image {
	display: none;
}

.tcv-wrapper .tcv-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tcv-wrapper .tcv-card__image--placeholder {
	display: none;
	background: #F3F4F6;
	align-items: center;
	justify-content: center;
}

.tcv-wrapper .tcv-card__image--placeholder svg {
	width: 40px;
	height: 40px;
	color: #D1D5DB;
}

/* ── Category Pills ────────────────────────────────── */

.tcv-wrapper .tcv-card__category-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 8px;
}

.tcv-wrapper .tcv-card__category-pill {
	font-size: 12px;
	font-weight: 500;
	padding: 4px 12px;
	border-radius: 20px;
	background: #fff;
	color: #1a1a1a;
	border: 1px solid #E5E7EB;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
	text-align: center;
}

.tcv-wrapper .tcv-card__category-pill:hover {
	text-decoration: underline;
}

/* ── Content Column ─────────────────────────────────── */

.tcv-wrapper .tcv-card__content {
	flex: 1;
	padding: 20px 24px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
}

.tcv-wrapper .tcv-card__title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 8px;
	line-height: 1.3;
}

.tcv-wrapper .tcv-card__title a {
	color: var(--tr-color-heading, #003333);
	text-decoration: none;
}

.tcv-wrapper .tcv-card__title a:hover {
	color: var(--tr-color-heading-hover, #002626);
	text-decoration: underline;
}

.tcv-wrapper .tcv-card__title a:focus {
	outline: 2px solid var(--tr-color-heading, #003333);
	outline-offset: 2px;
}

/* ── Meta (time, location) ──────────────────────────── */

.tcv-wrapper .tcv-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 12px;
}

.tcv-wrapper .tcv-card__meta-item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	color: #54595F;
}

.tcv-wrapper .tcv-card__meta-item svg {
	flex-shrink: 0;
	color: var(--tr-color-heading, #003333);
}

/* ── Actions ────────────────────────────────────────── */

.tcv-wrapper .tcv-card__actions {
	margin-top: auto;
	display: flex;
	gap: 12px;
	align-items: center;
}

.tcv-wrapper a.tcv-card__link {
	color: var(--tr-color-heading, #003333);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.tcv-wrapper a.tcv-card__link:hover {
	text-decoration: underline;
	color: var(--tr-color-heading, #003333);
}

.tcv-wrapper a.tcv-card__link:focus {
	outline: 2px solid var(--tr-color-heading, #003333);
	outline-offset: 2px;
}

.tcv-wrapper .tcv-card__button,
.tcv-wrapper a.tcv-card__button,
.tcv-wrapper button.tcv-card__button {
	display: inline-block !important;
	padding: 8px 20px !important;
	background: var(--tr-color-primary, #008E67) !important;
	color: #fff !important;
	border-radius: 9999px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	font-family: inherit !important;
	cursor: pointer;
	border: none !important;
	text-decoration: none !important;
	transition: background-color 0.15s ease;
	height: auto !important;
	min-height: 0 !important;
	line-height: 1.5 !important;
}

.tcv-wrapper .tcv-card__button:hover,
.tcv-wrapper a.tcv-card__button:hover,
.tcv-wrapper button.tcv-card__button:hover {
	background: var(--tr-color-primary-hover, #007A58) !important;
	color: #fff !important;
	text-decoration: none !important;
}

.tcv-wrapper .tcv-card__button:focus,
.tcv-wrapper a.tcv-card__button:focus,
.tcv-wrapper button.tcv-card__button:focus {
	outline: 2px solid var(--tr-color-heading, #003333);
	outline-offset: 2px;
}

.tcv-wrapper .tcv-card__button.tcv-card__button--full,
.tcv-wrapper span.tcv-card__button.tcv-card__button--full {
	background: #6B7280;
	color: #fff;
	cursor: default;
}

.tcv-wrapper .tcv-card__button.tcv-card__button--full:hover {
	background: #6B7280;
	color: #fff;
}

.tcv-wrapper .tcv-card__button.tcv-card__button--cancel,
.tcv-wrapper button.tcv-card__button.tcv-card__button--cancel {
	background: #DC2626;
}

.tcv-wrapper .tcv-card__button.tcv-card__button--cancel:hover,
.tcv-wrapper button.tcv-card__button.tcv-card__button--cancel:hover {
	background: #B91C1C;
	color: #fff;
}

/* ==========================================================================
   No Results
   ========================================================================== */

.tcv-wrapper .tcv-no-results {
	text-align: center;
	padding: 48px;
	color: #54595F;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.tcv-wrapper .tcv-pagination {
	text-align: center;
	margin-top: 24px;
}

.tcv-wrapper button.tcv-pagination__btn {
	background: #fff;
	border: 1px solid #E5E7EB;
	padding: 10px 24px;
	border-radius: 9999px;
	cursor: pointer;
	font-family: inherit !important;
	font-size: 14px;
	color: #000;
	transition: background-color 0.15s ease;
}

.tcv-wrapper button.tcv-pagination__btn:hover {
	background: #F3F4F6;
	color: #000;
}

.tcv-wrapper button.tcv-pagination__btn:focus {
	outline: 2px solid var(--tr-color-heading, #003333);
	outline-offset: 2px;
}

/* ==========================================================================
   Responsive — Tablet (max-width: 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
	.tcv-wrapper .tcv-layout {
		grid-template-columns: 1fr;
	}

	.tcv-wrapper .tcv-sidebar {
		position: static;
	}
}

/* ==========================================================================
   Responsive — Mobile (max-width: 768px)
   ========================================================================== */

@media (max-width: 768px) {
	.tcv-wrapper .tcv-card__date-col {
		flex: 0 0 100px;
		padding: 0 12px 14px;
	}

	.tcv-wrapper .tcv-card__date-day {
		font-size: 40px;
	}

	.tcv-wrapper .tcv-card__date-month,
	.tcv-wrapper .tcv-card__date-year {
		font-size: 14px;
	}

	.tcv-wrapper .tcv-card__date-category {
		font-size: 11px;
		padding: 3px 8px;
	}

	.tcv-wrapper .tcv-card__content {
		padding: 14px 16px;
	}

	.tcv-wrapper .tcv-card__title {
		font-size: 16px;
	}

	.tcv-wrapper .tcv-card__actions {
		flex-wrap: wrap;
	}
}
