/*
 * Sploro Open Calls
 * Built from the Figma design "Kronis AW", node 1:4506.
 * Everything is scoped to .soc-open-calls so it does not affect the rest of the site.
 * The site is expected to load Poppins. Override the variables to restyle.
 */

.soc-open-calls {
	--soc-white: #ffffff;
	--soc-border: #d3d5ff;
	--soc-heading: #171717;
	--soc-text: #444444;
	--soc-grey: #f9f9f9;
	--soc-blue: #0a17e2;
	--soc-orange: #ff6e12;
	--soc-green: #00d574;
	--soc-red: #ff383c;
	--soc-font: "Poppins", sans-serif;
	--soc-star-font: "Inter", "Poppins", sans-serif;

	display: flex;
	flex-direction: column;
	gap: 32px;
	color: var(--soc-heading);
	font-family: var(--soc-font);
	font-style: normal;
	box-sizing: border-box;
}

.soc-open-calls *,
.soc-open-calls *::before,
.soc-open-calls *::after {
	box-sizing: border-box;
}

.soc-open-calls [hidden] {
	display: none !important;
}

.soc-open-calls p {
	margin: 0;
	padding: 0;
}

/* ---------- Tabs ---------- */
.soc-tabs {
	display: flex;
	flex-direction: column;
	gap: 32px;
	font-family: "Poppins", sans-serif;
}

.soc-tabs [hidden] {
	display: none !important;
}

.soc-tabs .soc-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
}

.soc-tabs .soc-tab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	margin: 0;
	padding: 8px 20px;
	border: 1px solid #d3d5ff;
	border-radius: 1324px;
	background-color: #ffffff;
	box-shadow: none;
	color: #0a17e2;
	font-family: inherit;
	font-size: 16px;
	font-weight: 500;
	line-height: 24px;
	text-transform: none;
	letter-spacing: 0;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.soc-tabs .soc-tab:hover,
.soc-tabs .soc-tab:focus-visible {
	border-color: #0a17e2;
	background-color: #ffffff;
	color: #0a17e2;
	outline: none;
}

.soc-tabs .soc-tab.is-active {
	border-color: #0a17e2;
	background-color: #0a17e2;
	color: #ffffff;
}

/* ---------- Filter bar ---------- */
.soc-open-calls .soc-filter {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
}

.soc-open-calls .soc-filter--4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.soc-open-calls .soc-filter-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.soc-open-calls .soc-filter-label {
	display: flex;
	align-items: flex-start;
	gap: 2px;
	margin: 0;
	padding: 0;
	color: var(--soc-heading);
	font-family: var(--soc-font);
	font-size: 14px;
	font-weight: 500;
	line-height: 22px;
	letter-spacing: 0;
	white-space: nowrap;
}

.soc-open-calls .soc-filter-star {
	color: var(--soc-green);
	font-family: var(--soc-star-font);
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
}

.soc-open-calls .soc-input {
	display: block;
	width: 100%;
	min-width: 0;
	height: 44px;
	margin: 0;
	padding: 9px 13px; /* Figma 10px 14px, minus the 1px border */
	border: 1px solid var(--soc-border);
	border-radius: 123px;
	background-color: var(--soc-white);
	background-image: none;
	box-shadow: 0 1px 2px 0 rgba(10, 13, 18, 0.05);
	color: var(--soc-text);
	font-family: var(--soc-font);
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
	letter-spacing: 0;
	text-align: left;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
	outline: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.soc-open-calls .soc-input.is-empty {
	color: rgba(68, 68, 68, 0.7);
}

.soc-open-calls .soc-input::placeholder {
	color: rgba(68, 68, 68, 0.7);
	opacity: 1;
}

.soc-open-calls .soc-input:focus,
.soc-open-calls .soc-input:focus-visible {
	border-color: var(--soc-blue);
	box-shadow: 0 1px 2px 0 rgba(10, 13, 18, 0.05), 0 0 0 3px rgba(10, 23, 226, 0.12);
}

.soc-open-calls select.soc-input option {
	color: var(--soc-text);
}

.soc-open-calls .soc-input--date {
	padding-left: 41px;
	background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.5 8.33333H2.5M13.3333 1.66667V5M6.66667 1.66667V5M6.5 18.3333H13.5C14.9001 18.3333 15.6002 18.3333 16.135 18.0608C16.6054 17.8212 16.9878 17.4387 17.2275 16.9683C17.5 16.4335 17.5 15.7335 17.5 14.3333V7.33333C17.5 5.9332 17.5 5.23314 17.2275 4.69836C16.9878 4.22795 16.6054 3.8455 16.135 3.60582C15.6002 3.33333 14.9001 3.33333 13.5 3.33333H6.5C5.09987 3.33333 4.3998 3.33333 3.86502 3.60582C3.39462 3.8455 3.01217 4.22795 2.77248 4.69836C2.5 5.23314 2.5 5.9332 2.5 7.33333V14.3333C2.5 15.7335 2.5 16.4335 2.77248 16.9683C3.01217 17.4387 3.39462 17.8212 3.86502 18.0608C4.3998 18.3333 5.09987 18.3333 6.5 18.3333Z' stroke='%23A4A7AE' stroke-width='1.66667' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 13px center;
	background-size: 20px 20px;
}

.soc-open-calls .soc-input--date::-webkit-calendar-picker-indicator {
	opacity: 0;
	cursor: pointer;
}

/* ---------- Grid ---------- */
.soc-open-calls .soc-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
}

.soc-open-calls .soc-cols-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.soc-open-calls .soc-cols-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.soc-open-calls .soc-col {
	display: flex;
	min-width: 0;
}

/* ---------- Card ---------- */
.soc-open-calls .soc-card {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 23px; /* Figma 24px, minus the 1px border */
	border: 1px solid var(--soc-border);
	border-radius: 24px;
	background-color: var(--soc-white);
	box-shadow: none;
}

.soc-open-calls .soc-card-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
}

.soc-open-calls .soc-card-logo {
	display: flex;
	align-items: center;
	height: 48px;
	min-width: 0;
}

.soc-open-calls .soc-card-logo img {
	display: block;
	width: auto;
	height: 48px;
	max-width: 160px;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: contain;
	object-position: left center;
}

.soc-open-calls .soc-badge {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	gap: 4px;
	padding: 6px 12px;
	border-radius: 50000px;
	background-color: var(--soc-red);
	color: var(--soc-white);
	font-size: 12px;
	font-weight: 500;
	line-height: 20px;
	white-space: nowrap;
}

.soc-open-calls .soc-badge--opens {
	background-color: var(--soc-orange);
}

.soc-open-calls .soc-detail-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.soc-open-calls .soc-detail-badges:not(:has(.soc-badge:not([hidden]))) {
	display: none;
}

.soc-open-calls .soc-card-body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	width: 100%;
	word-break: break-word;
}

.soc-open-calls .soc-title {
	width: 100%;
	margin: 0;
	padding: 0;
	color: var(--soc-heading);
	font-family: var(--soc-font);
	font-size: 20px;
	font-weight: 500;
	line-height: 28px;
	letter-spacing: 0;
	text-transform: capitalize;
}

/* Link colours carry !important, because site-wide rules such as
   ".elementor-element a { color: ... }" would otherwise win. */
.soc-open-calls .soc-title a,
.soc-open-calls .soc-title a:visited {
	color: var(--soc-heading) !important;
	text-decoration: none !important;
}

.soc-open-calls .soc-title a:hover,
.soc-open-calls .soc-title a:focus {
	color: var(--soc-blue) !important;
}

.soc-open-calls .soc-summary {
	width: 100%;
	color: var(--soc-heading);
	font-size: 14px;
	font-weight: 400;
	line-height: 22px;
}

.soc-open-calls .soc-who {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 4px;
	width: 100%;
}

.soc-open-calls .soc-label {
	color: var(--soc-text);
	font-size: 12px;
	font-weight: 500;
	line-height: 20px;
	letter-spacing: 0;
}

.soc-open-calls .soc-label--green {
	color: var(--soc-green);
}

.soc-open-calls .soc-value {
	color: var(--soc-heading);
	font-size: 14px;
	font-weight: 400;
	line-height: 22px;
}

/* ---------- Funding and deadline ---------- */
.soc-open-calls .soc-stats {
	display: flex;
	flex-wrap: wrap; /* the two boxes stack when the card is too narrow for both */
	align-items: stretch;
	gap: 8px;
	width: 100%;
	margin-top: auto;
}

.soc-open-calls .soc-stat {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 4px;
	min-width: min-content;
	padding: 12px;
	border-radius: 12px;
	background-color: var(--soc-grey);
}

.soc-open-calls .soc-stat .soc-label {
	white-space: nowrap;
}

.soc-open-calls .soc-stat-value {
	color: var(--soc-heading);
	font-size: 18px;
	font-weight: 500;
	line-height: 28px;
	white-space: nowrap;
}

.soc-open-calls .soc-stat-value--text {
	font-size: 14px;
	line-height: 22px;
	white-space: normal;
}

/* ---------- Tags ---------- */
.soc-open-calls .soc-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 8px;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.soc-open-calls .soc-tag {
	display: inline-flex;
	align-items: center;
	height: 28px;
	margin: 0;
	padding: 3px 7px; /* Figma 4px 8px, minus the 1px border */
	border: 1px solid var(--soc-border);
	border-radius: 50000px;
	background-color: var(--soc-white);
	color: var(--soc-blue);
	font-size: 12px;
	font-weight: 500;
	line-height: 20px;
	white-space: nowrap;
	list-style: none;
}

.soc-open-calls .soc-tag::before,
.soc-open-calls .soc-tag::marker {
	content: none;
}

/* ---------- Button ---------- */
.soc-open-calls .soc-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 8px 16px;
	border: 0;
	border-radius: 1324px;
	background-color: var(--soc-blue);
	color: var(--soc-white) !important;
	font-family: var(--soc-font);
	font-size: 16px;
	font-weight: 500;
	line-height: 24px;
	text-align: center;
	text-decoration: none !important;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.soc-open-calls .soc-button:visited {
	color: var(--soc-white) !important;
}

.soc-open-calls .soc-button:hover,
.soc-open-calls .soc-button:focus,
.soc-open-calls .soc-button:focus-visible {
	background-color: var(--soc-orange);
	color: var(--soc-white) !important;
}

.soc-open-calls .soc-button--outline,
.soc-open-calls .soc-button--outline:visited {
	border: 1px solid var(--soc-border);
	background-color: var(--soc-white);
	color: var(--soc-blue) !important;
}

.soc-open-calls .soc-button--outline:hover,
.soc-open-calls .soc-button--outline:focus,
.soc-open-calls .soc-button--outline:focus-visible {
	border-color: var(--soc-orange);
	background-color: var(--soc-orange);
	color: var(--soc-white) !important;
}

/* ---------- Empty state ---------- */
.soc-open-calls .soc-empty {
	padding: 24px;
	border: 1px solid var(--soc-border);
	border-radius: 24px;
	background-color: var(--soc-grey);
	color: var(--soc-heading);
	font-size: 16px;
	line-height: 24px;
	text-align: center;
}

/* ---------- Detail page ---------- */
.soc-open-calls.soc-detail {
	padding-bottom: 48px;
}

.soc-open-calls .soc-detail-grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	gap: 32px;
	align-items: start;
}

.soc-open-calls .soc-detail-main,
.soc-open-calls .soc-detail-side {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

.soc-open-calls .soc-detail-side {
	padding: 23px;
	border: 1px solid var(--soc-border);
	border-radius: 24px;
	background-color: var(--soc-white);
}

.soc-open-calls .soc-detail-head {
	display: flex;
	align-items: center;
	gap: 20px;
}

.soc-open-calls .soc-detail-logo {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	min-width: 96px;
	max-width: 184px;
	height: 80px;
	padding: 12px 16px;
	border: 1px solid var(--soc-border);
	border-radius: 16px;
	background-color: var(--soc-white);
}

.soc-open-calls .soc-detail-logo img {
	display: block;
	width: auto;
	height: auto;
	max-width: 150px;
	max-height: 54px;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: contain;
}

.soc-open-calls .soc-detail-head .soc-tagline {
	flex: 1 1 0;
	min-width: 0;
}

.soc-open-calls .soc-tagline {
	color: var(--soc-heading);
	font-size: 18px;
	font-weight: 500;
	line-height: 28px;
}

.soc-open-calls .soc-long p {
	margin: 0 0 16px;
	color: var(--soc-text);
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
}

.soc-open-calls .soc-long p:last-child {
	margin-bottom: 0;
}

.soc-open-calls .soc-long b,
.soc-open-calls .soc-long strong {
	color: var(--soc-heading);
	font-weight: 600;
}

.soc-open-calls .soc-long ul,
.soc-open-calls .soc-long ol {
	margin: 0 0 16px;
	padding-left: 20px;
	color: var(--soc-text);
	font-size: 16px;
	line-height: 24px;
}

.soc-open-calls .soc-long a,
.soc-open-calls .soc-long a:visited {
	color: var(--soc-blue) !important;
	text-decoration: underline !important;
	word-break: break-word;
}

.soc-open-calls .soc-long a:hover {
	color: var(--soc-orange) !important;
}

/* Facts at the end of the description */
.soc-open-calls .soc-facts {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
	padding: 24px 0 0;
	border-top: 1px solid var(--soc-border);
}

.soc-open-calls .soc-fact {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
}

.soc-open-calls .soc-fact dt {
	margin: 0;
	padding: 0;
	color: var(--soc-heading);
	font-size: 16px;
	font-weight: 600;
	line-height: 24px;
}

.soc-open-calls .soc-fact dd {
	margin: 0;
	padding: 0;
	color: var(--soc-text);
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
}

.soc-open-calls .soc-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.soc-open-calls .soc-buttons .soc-button {
	width: auto;
	min-width: 160px;
}

.soc-open-calls .soc-stats--stacked {
	margin-top: 0;
}

.soc-open-calls .soc-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

/* ---------- Call to action on the detail page ---------- */
.soc-open-calls.soc-cta {
	display: block;
	margin-top: 32px;
	padding: 24px;
	border-radius: 24px;
	background-color: var(--soc-grey);
	text-align: center;
}

.soc-open-calls.soc-cta p {
	color: var(--soc-heading);
	font-size: 18px;
	font-weight: 500;
	line-height: 28px;
}

.soc-open-calls.soc-cta a,
.soc-open-calls.soc-cta a:visited {
	color: var(--soc-blue) !important;
	text-decoration: underline !important;
	text-underline-offset: 3px;
}

.soc-open-calls.soc-cta a:hover,
.soc-open-calls.soc-cta a:focus {
	color: var(--soc-orange) !important;
}

.soc-related {
	margin-top: 48px;
}

.soc-open-calls.soc-related-more {
	flex-direction: row;
	justify-content: center;
	margin-top: 32px;
}

.soc-open-calls.soc-related-more .soc-button {
	width: auto;
	min-width: 220px;
	padding-left: 24px;
	padding-right: 24px;
}

.soc-related > h2 {
	margin-bottom: 32px;
}

/* ---------- Single value shortcodes ---------- */
.soc-open-calls.soc-field-output {
	display: block;
}

.soc-field-logo {
	display: block;
	width: auto;
	height: 48px;
	max-width: 100%;
	object-fit: contain;
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
	.soc-open-calls .soc-filter {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.soc-open-calls .soc-filter--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.soc-open-calls .soc-cols-4 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 1023px) {
	.soc-open-calls .soc-grid,
	.soc-open-calls .soc-cols-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.soc-open-calls .soc-detail-grid {
		grid-template-columns: minmax(0, 1fr);
	}
	/* Stacked layout: the summary card comes first, the description below it. */
	.soc-open-calls .soc-detail-side {
		order: -1;
	}
}

@media (max-width: 767px) {
	.soc-open-calls,
	.soc-tabs {
		gap: 24px;
	}
	.soc-open-calls .soc-detail-head {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}
	.soc-open-calls .soc-detail-head .soc-tagline {
		flex: 0 0 auto;
		width: 100%;
	}
	/* Tags printed by [open_call_technology] and [open_call_field] are centred on phones. */
	.soc-open-calls.soc-field-output .soc-tags {
		justify-content: center;
	}
	.soc-tabs .soc-tabs-nav {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}
	.soc-tabs .soc-tabs-nav::-webkit-scrollbar {
		display: none;
	}
	.soc-tabs .soc-tab {
		flex: 0 0 auto;
		height: 40px;
		padding: 8px 16px;
		font-size: 14px;
	}
	.soc-open-calls .soc-filter {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}
}

@media (max-width: 599px) {
	.soc-open-calls .soc-filter,
	.soc-open-calls .soc-filter--4,
	.soc-open-calls .soc-grid,
	.soc-open-calls .soc-cols-2,
	.soc-open-calls .soc-cols-4 {
		grid-template-columns: minmax(0, 1fr);
	}
	.soc-open-calls .soc-card {
		padding: 19px;
	}
	.soc-open-calls .soc-stat-value {
		font-size: 16px;
		line-height: 24px;
	}
	.soc-open-calls .soc-buttons .soc-button,
	.soc-open-calls.soc-related-more .soc-button {
		width: 100%;
	}
	.soc-open-calls.soc-cta {
		padding: 20px;
	}
	.soc-open-calls.soc-cta p {
		font-size: 16px;
		line-height: 24px;
	}
}
