body {
	--sticky-top:72px;
	--brdr-clr: #E8E8E8;
	--th-padding: 15px;
	--td-padding: 12px 15px;
}
body.filters-open {
	--sticky-top:172px;
}
body.filters-open.active-filters-open {
	--sticky-top:211px;
}

.page-header {
	background-color:#FBFAFB;
}
:root {
	--isos-x-gap:20px;
}
.row {
	display:flex;
	margin: 0 calc(-0.5*var(--isos-x-gap));
}
.row > * {
	padding: 0 calc(0.5*var(--isos-x-gap));
}

.col {
	flex:1;
}

.btn {
	color:#fff;
	transition:opacity 0.3s;
}
.btn:hover {
	opacity:0.9;
}

.content-area {
	border-top:1px solid #ccc;
	background-color: #FBFAFB;
    padding: 30px 0 50px;
}
.page-header .row {
	align-items:center;
	justify-content:space-between;
}

.page-header .col {
	flex:unset;
	display: flex;
    gap: 8px;
}

.page-header .col-right .btn {
	display:flex;
	align-items:center;
	gap:4px;
}

.filters {
	display:none;
    padding-bottom: 20px;
	background-color:#FBFAFB;
}
.filters.open {
	display:block;
}

/* Styles for the custom dropdown filter */
.custom-dropdown-filter-title {
	font-size: 14px;
	font-weight:700;
	color:#000;
	margin-bottom:4px;
}

.custom-dropdown-filter {
    position: relative;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 20px;
    user-select: none; 
	min-width:200px;
}

.dropdown-header {
    padding: 8px 15px;
	border: 1px solid #ececec;
    background-color: #fff;
	border-radius:4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
	gap:4px;
}

.dropdown-header .selected-value {
    flex-grow: 1;
}

.custom-dropdown-filter.selected .selected-value {
	font-weight:600;
}

.dropdown-header .dropdown-arrow {
    content:url('data:image/svg+xml,<svg width="7" height="4" viewBox="0 0 7 4" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.86079 0.816411L3.83608 3.85993C3.65047 4.04669 3.34953 4.04669 3.16392 3.85993L0.139209 0.816411C-0.0464029 0.629645 -0.0464029 0.326839 0.139209 0.140074C0.32482 -0.0466913 0.625756 -0.0466913 0.811367 0.140074L3.22158 2.56527L3.77842 2.56527L6.18863 0.140074C6.37424 -0.0466913 6.67518 -0.0466913 6.86079 0.140074C7.0464 0.326839 7.0464 0.629645 6.86079 0.816411Z" fill="%231E1E1E"/></svg>');
    transition: transform 0.3s ease-in-out;
}

.custom-dropdown-filter.open .dropdown-arrow {
    transform: rotate(-180deg);
}

.dropdown-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    position: absolute;
    top: 0; 
    left: 0;
    width:100%;
    background-color: #fff;
    border: 1px solid #ececec;
	border-radius:4px;
    max-height: 300px; 
    overflow-y: auto;
	scrollbar-width:thin;
    z-index: 10; 
    opacity:0;
	visibility:hidden;	
	transition: all 0.3s ease-in-out;
}

.custom-dropdown-filter.open .dropdown-list {
    opacity:1;
	visibility:visible;	
	top:calc(100% + 4px);
}

.dropdown-list li {
    padding: 8px 15px;
    cursor: pointer;
}

.dropdown-list li.active,
.dropdown-list li:hover {
    background-color: #f0f0f0;
}

.active-filters {
	display:none;
}

.active-filters.open {
	display:block;
}

.active-filters-row {
	display:flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}

.active-filters-title {
	font-weight:600;
	width:100%;
}

.active-filter-btn {
	display:none;
	padding: 8px 10px;
    background-color: #fff;
	border-radius:4px;
    justify-content: space-between;
    align-items: center;
	gap:8px;
	color: #8cb347cc;
	background: #dee7b93d;
    border: 1px solid #8cb34738;
	cursor:pointer;
	font-weight:400;
}

.active-filter-btn:after {
	content:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M10.5 10.5L3.5 3.5M10.5 3.5L3.5 10.5" stroke="%2386AE3E" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path></svg>');
	margin-bottom: -2px;
}

.active-filter-btn.active {
	display:flex;
}

.active-filter-btn-clear {
	display:flex;
	margin-left: auto;
    border: none;
    background: none;
    color: #CF513F;
}
.active-filter-btn-clear:after {
	content:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M10.5 10.5L3.5 3.5M10.5 3.5L3.5 10.5" stroke="%23CF513F" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path></svg>');
}

/*Apply filters*/
body.active-filters-open .country,
body.active-filters-open .objective,
body.active-filters-open .activity,
body.active-filters-open .implementers__item,
body.active-filters-open .activity__period,
body.active-filters-open .periods__item {
    display: none; /* За замовчуванням приховано, якщо є активні фільтри */
}

.activities .country.show,
.activities .objective.show,
.activities .activity.show {
    display: block;
}

.activities .activity__period.show,
.activities .implementers__item.show,
.activities .periods__item.show {
	display:flex;
}

/*----Activities List-------*/

.activities {
border: 1px solid var(--brdr-clr);	border-radius:8px;
}

.activities__header {
	display:flex;
	border-bottom: 1px solid var(--brdr-clr);	background: #F3F4F6;
}

.activities__th {
	padding:var(--th-padding);
	border-right: 1px solid var(--brdr-clr);	font-weight:600;
	color:#5A5E61;
}
.activities__th:last-child {
	border:none;
}
.period-title {
	width:100px;
	flex-shrink: 0;
}

.progress-title {
	flex:1;
}

.imp-title {
	width:130px;
	flex-shrink: 0;
}

.contacts-title {
	width:220px;
	flex-shrink: 0;
}

.country__title {
	color: #31334B;
    font-weight: 700;
    font-size: 20px;
    background: #EAEFE0;
    border-bottom: 1px solid var(--brdr-clr);
    padding: var(--th-padding);
    margin: 0;
}

.objective__header {
	border-bottom: 1px solid var(--brdr-clr);    background: #EAEBF4;
	padding: var(--td-padding);

}

.objective__title {
	margin:0;
	text-transform: uppercase;
    margin-bottom: 4px;
    font-weight: 500;
	font-size:18px;
	color: #1E1E1E;
}

.objective__desc {
	font-weight: 400;
    color: #1E1E1E;
	max-width:500px;
}

.activity:last-child > div:last-child {
	/*border-bottom:none;*/
}

.activity__header {
	display:flex;
	border-bottom: 1px solid var(--brdr-clr);}

.activity.show.last-visible .activity__header:last-child {
	border-bottom:none;
}

.activity__periods {
	border-right: 1px solid var(--brdr-clr);	display: flex;
    flex-direction: column;
}

.activity__period {
	padding: var(--td-padding);
	flex:1;
}

.activity__period:not(:last-child) {
	border-bottom: 1px solid var(--brdr-clr);}
.activity__period.show.last-visible {
	border-bottom:none;
}

.activity__content {
	flex:1;
	border-right: 1px solid var(--brdr-clr);	padding: var(--td-padding);
	position:relative;
}

.implementers {
	width:350px;
	display: flex;
    flex-direction: column;
}
.implementers__item {
	display:flex;
	flex:1;
}
.implementers__item:not(:last-child) {
	border-bottom: 1px solid var(--brdr-clr);}

.implementers__title {
	border-right: 1px solid var(--brdr-clr);	padding: var(--td-padding);
}

.implementers__title .row {
	display:flex;
	align-items:center;
	gap:4px;
	margin: 0;
}

.implementers__img {
	height:28px;
	display:block;
	padding:0;
}

.contacts__item {
	padding: var(--td-padding);
}
.contacts__item:not(:last-child) {
	border-bottom: 1px solid var(--brdr-clr);}

.contacts__name {
	font-weight:600;
}
.contacts__email {
	font-size:0.8em;
	word-break: break-word!important;
	overflow-wrap:break-word!important;
}

.periods {
	background:#e1f0ff;
}

.periods:not(:last-child) {
	border-bottom: 1px solid var(--brdr-clr);}

.periods__item {
	display:flex;
	border-bottom: 1px solid var(--brdr-clr);}

.periods__title {
	padding: var(--td-padding);
	border-right: 1px solid var(--brdr-clr);}
.progress {
	flex: 1;
}
.progress__item {
	padding: var(--td-padding);
	position:relative;
}

.progress__item:not(:last-child) {
	border-bottom: 1px solid var(--brdr-clr);}

.edit-btns {
	position:absolute;
	top:0;
	right:0;
	display:flex;
	flex-direction:column;
	gap:4px;
}
.post-edit-link .dashicons {
	color: #ccc; 
}
.post-edit-link:hover .dashicons{
	color:var(--e-global-color-accent);
	opacity:1;
}
/*--------mobile---------*/
.activities {
		overflow-x:auto;
	}
.activities__wrapper {
	min-width:700px;
}
.filters .row {
	flex-wrap:wrap;
}
.filters .col {
	width:100%;
	flex:unset;
}
@media (min-width:576px) {
	#primary {
		padding-left: 5%;
		padding-right: 5%;
	}
	#main {
		max-width: min(100%,1140px);
		margin:0 auto;
	}
	.filters .col {
		width:50%;
	}
}

@media (min-width:768px) {
	.page-header {
		position: sticky;
		top: 0;
		z-index: 4;
	}
	.filters {
		position: sticky;
		z-index: 3;
		top: 72px;
	}
	.activities {
		overflow-x:unset;
	}
	.activities__header {
		position: sticky;
		top: var(--sticky-top);
		z-index:2;
	}
	.country__title {
		position: sticky;
		top: calc(var(--sticky-top) + 52px);
		z-index:1;
	}
}

@media (min-width:992px) {
	.filters .col {
		width:25%;
	}
	.active-filters-title {
		width:auto;
	}
}

@media (min-width:1025px) {
	#primary {
		padding-left: 8%;
		padding-right: 8%;
	}
}

@media print{
	body {
		--brdr-clr: #000;
		--th-padding: 10px;
		--td-padding: 5px 10px;
		color: #000;
		font-weight: 400;
	}
	#wpadminbar,
	.elementor-location-header,
	.page-header .col-right,
	#filters,
	.post-edit-link,
	.elementor-location-footer,
	#talking-head	{
		display:none!important; 
	}
	.activities {
		border-radius: 0;
	}
	a[href]:after {
		content:none!important;
	}
}