/**
 * Styles of the widget jutso_team_contact (Team-Kontakt)
 *
 * @package JutSo\Team
 */

.jutso-team-contact {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
}

.jutso-team-contact-list{
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
	gap: 40px;
}

.jutso-team-contact__image {
	margin: 0;
}

.jutso-team-contact__image img {
	display: block;
	width: 150px;
	height: 150px;
	border-radius: 100%;
	object-fit: cover;
}

.jutso-team-contact__credentials {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0px;
}

.jutso-team-contact__name {
	margin: 0;
	font-weight: 700 !important;
}

.site-color .jutso-team-contact__name {
	color: var(--site-contrast-color) !important;
}

.jutso-team-contact__position {
	margin: 0;
	text-align: center;
}

.jutso-team-contact__organisation {
	margin: 0;
	text-align: center;
}

/* NNL's card: the organisation sits 4px under name and position, not a full gap (24px) below
   them (2.2.2, migration-fixes-c8 F8; NNL set this with the custom CSS of its Team loop item). */
.jutso-team-contact__credentials + .jutso-team-contact__organisation {
	margin-top: -20px;
}

.jutso-team-contact__quote {
	margin: 0;
	font-weight: var(--blockquote-font-weight);
	font-size: var(--blockquote-font-size);
	line-height: var(--blockquote-line-height);
	letter-spacing: var(--blockquote-letter-spacing);
}

.jutso-team-contact__quote-mark {
	font-size: 1.5em;
	line-height: 0;
}

.jutso-team-contact__buttons {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
	max-width: 100%;
}

/* Side by side while both fit; the phone button wraps below the e-mail button when the column
   is too narrow, and a button wider than the column breaks its text instead of sticking out. */
.jutso-team-contact__buttons .jutso-widgets-btn {
	max-width: 100%;
	text-align: center;
}

.jutso-team-contact__buttons--desktop-vertical {
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	margin-top: auto;
}

.jutso-team-contact__buttons--desktop-vertical .jutso-widgets-btn {
	width: 100%;
	justify-content: center;
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
	.jutso-team-contact__buttons--tablet-vertical {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
	}

	.jutso-team-contact__buttons--tablet-vertical .jutso-widgets-btn {
		width: 100%;
		justify-content: center;
	}
}

@media screen and (max-width: 767px) {
	.jutso-team-contact__buttons--mobile-vertical {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
	}

	.jutso-team-contact__buttons--mobile-vertical .jutso-widgets-btn {
		width: 100%;
		justify-content: center;
	}
}

/* ============================================
   Style "Kompakt mit Icons" (contact_style compact, since 1.1.0):
   the card of NNL's person_widget (widgets/person-widget/person-widget.css).
   ============================================ */

.jutso-team-contact-list--compact {
	flex-wrap: wrap;
	justify-content: flex-start;
	align-items: flex-start;
	gap: 2rem;
}

.jutso-team-contact--compact {
	align-items: stretch;
	gap: 16px;
	color: inherit;
}

.jutso-team-contact--compact .jutso-team-contact__header {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 16px;
}

.jutso-team-contact--compact .jutso-team-contact__image {
	flex-shrink: 0;
}

.jutso-team-contact--compact .jutso-team-contact__image img {
	width: 64px;
	height: 64px;
	border-radius: 10px;
	object-fit: cover;
}

.jutso-team-contact--compact .jutso-team-contact__info {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.jutso-team-contact--compact .jutso-team-contact__title {
	margin: 0 !important;
	font-size: var(--paragraph-font-size, 1rem) !important;
	line-height: var(--paragraph-line-height, 1.5) !important;
	font-weight: 700 !important;
	color: inherit;
}

.jutso-team-contact--compact .jutso-team-contact__position {
	font-size: 1rem;
	line-height: 1.4;
	text-align: left;
}

.jutso-team-contact--compact .jutso-team-contact__email,
.jutso-team-contact--compact .jutso-team-contact__phone {
	font-size: 1rem;
	line-height: 1.5;
}

/*
 * E-mail and phone: icon (mask, currentColor) before the underlined text.
 * As NNL's person widget (2.2.2, F12): the icon sits out of flow in the
 * link's 24px left margin, so the text starts 24px in and the line is one
 * text line high (an in-flow empty flex item has no baseline and grew it).
 */
.jutso-team-contact__email-link,
.jutso-team-contact__phone-link {
	display: inline-flex;
	align-items: center;
	position: relative;
	margin-left: 24px;
	color: inherit;
	transition: opacity 0.2s ease;
}

.jutso-team-contact__email-link::before,
.jutso-team-contact__phone-link::before {
	content: "";
	display: inline-block;
	position: absolute;
	top: 0;
	left: 0;
	transform: translateX(-100%);
	width: 24px;
	height: 24px;
	background-color: currentColor;
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
}

.jutso-team-contact__email-link::before {
	-webkit-mask-image: url(../icons/email.svg);
	mask-image: url(../icons/email.svg);
}

.jutso-team-contact__phone-link::before {
	-webkit-mask-image: url(../icons/phone.svg);
	mask-image: url(../icons/phone.svg);
}

.jutso-team-contact__email-text,
.jutso-team-contact__phone-text {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.jutso-team-contact__email-link:hover,
.jutso-team-contact__phone-link:hover {
	opacity: 0.7;
}

.jutso-team-contact__email-link:hover .jutso-team-contact__email-text,
.jutso-team-contact__phone-link:hover .jutso-team-contact__phone-text {
	text-decoration-thickness: 2px;
}

.jutso-team-contact--compact a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.jutso-team-contact--compact .jutso-team-contact__organisation {
	margin-top: 32px;
	display: flex;
	flex-direction: column;
	text-align: left;
}

.jutso-team-contact--compact .jutso-team-contact__organisation-title {
	margin: 0;
	font-size: var(--paragraph-font-size, 1rem) !important;
	line-height: var(--paragraph-line-height, 1.5) !important;
	font-weight: 700 !important;
}

.jutso-team-contact--compact .jutso-team-contact__organisation-description {
	font-size: var(--paragraph-font-size, 1rem) !important;
	line-height: var(--paragraph-line-height, 1.5) !important;
}

/* Paragraphs of the term description .9rem apart, the last without margin, as NNL's card (2.2.2, F12). */
.jutso-team-contact--compact .jutso-team-contact__organisation-description p {
	margin: 0 0 0.9rem;
}

.jutso-team-contact--compact .jutso-team-contact__organisation-description p:last-child {
	margin-bottom: 0;
}

.jutso-team-contact--compact .jutso-team-contact__button {
	margin-top: 32px;
}

/* The same shape as jutso-widgets' CTA button, so the button looks alike without that plugin. */
.jutso-team-contact--compact .jutso-team-contact__button .jutso-widgets-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	width: fit-content;
	max-width: 100%;
	padding: 16px 24px;
	border: 2px solid currentColor;
	border-radius: 96px;
	color: inherit;
	text-decoration: none;
}

.jutso-team-contact--compact .jutso-team-contact__button .jutso-widgets-btn__icon {
	display: flex;
}

.jutso-team-contact--compact .jutso-team-contact__button .jutso-widgets-btn__icon svg {
	width: 20px;
	height: 20px;
	display: block;
}

@media screen and (max-width: 767px) {
	.jutso-team-contact--compact .jutso-team-contact__button .jutso-widgets-btn {
		width: 100%;
		justify-content: center;
	}
}

/* On the site-colour band the whole card takes the contrast colour, as NNL did with the
   widget's custom CSS "selector * { color: var(--site-contrast-color) !important; }". */
.site-color .jutso-team-contact--compact,
.site-color .jutso-team-contact--compact * {
	color: var(--site-contrast-color) !important;
}

.site-color .jutso-team-contact--compact .jutso-team-contact__button .jutso-widgets-btn {
	border-color: var(--site-contrast-color) !important;
}

.site-color .jutso-team-contact--compact .jutso-team-contact__button svg path {
	fill: var(--site-contrast-color) !important;
}

/* Image in its original shape (`image_shape` `original`, 2.3.0): width of the mask, own aspect ratio, no rounding or crop. */
.jutso-team-contact--image-original .jutso-team-contact__image img {
	height: auto;
	border-radius: 0;
	object-fit: initial;
}
