/* EZM Manager frontend. Loaded only on pages that use a shortcode or floating button. */

.ezm-icon {
	display: block;
	width: 1.25em;
	height: 1.25em;
}

/* Social icons */

ul.ezm-social {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ezm-social__item {
	margin: 0;
	padding: 0;
}

a.ezm-social__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	background: var(--ezm-social-bg, #1d2327);
	color: var(--ezm-social-fg, #fff);
	text-decoration: none;
	transition: transform 0.15s ease;
}

a.ezm-social__link:hover {
	color: var(--ezm-social-fg, #fff);
	transform: translateY(-2px);
}

a.ezm-social__link:focus-visible,
a.ezm-floating__action:focus-visible {
	outline: 3px solid #1d2327;
	outline-offset: 2px;
	box-shadow: 0 0 0 2px #fff;
}

/* Floating actions */

.ezm-floating {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	position: fixed;
	z-index: 9990;
	bottom: calc(var(--ezm-float-bottom, 20px) + env(safe-area-inset-bottom, 0px));
}

.ezm-floating--ltr {
	right: var(--ezm-float-side, 20px);
}

.ezm-floating--rtl {
	left: var(--ezm-float-side, 20px);
}

a.ezm-floating__action {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3.25rem;
	height: 3.25rem;
	border-radius: 50%;
	background: var(--ezm-action-bg);
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
	color: var(--ezm-action-fg);
	font-size: 1.25rem;
	text-decoration: none;
}

/* Sizes */
.ezm-floating--small {
	gap: 0.5rem;
}

.ezm-floating--small a.ezm-floating__action {
	width: 2.75rem;
	height: 2.75rem;
	font-size: 1.05rem;
}

.ezm-floating--big a.ezm-floating__action {
	width: 3.5rem;
	height: 3.5rem;
	font-size: 1.4rem;
}

/* Labels sit on the inner side of the buttons. */
.ezm-floating__label {
	position: absolute;
	top: 50%;
	padding: 0.3em 0.75em;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
	color: #1d2327;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.4;
	white-space: nowrap;
	transform: translateY(-50%);
	pointer-events: none;
}

.ezm-floating--ltr .ezm-floating__label {
	right: calc(100% + 0.625rem);
}

.ezm-floating--rtl .ezm-floating__label {
	left: calc(100% + 0.625rem);
}

.ezm-floating--small .ezm-floating__label {
	font-size: 0.8125rem;
}

a.ezm-floating__action:hover {
	color: var(--ezm-action-fg);
}

/* Hover-only labels, after the visitor's first hover. */
.ezm-floating--hover-labels .ezm-floating__label,
.ezm-floating--hover-labels a.ezm-floating__action.is-quiet .ezm-floating__label {
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.15s ease, visibility 0s linear 0.15s;
}

.ezm-floating--hover-labels a.ezm-floating__action:not(.is-quiet):hover .ezm-floating__label,
.ezm-floating--hover-labels a.ezm-floating__action:focus-visible .ezm-floating__label {
	visibility: visible;
	opacity: 1;
	transition: opacity 0.15s ease, visibility 0s;
}

/* Contact details */

ul.ezm-contact {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ezm-contact__item {
	margin: 0;
	padding: 0;
}

.ezm-contact-link {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	text-decoration: none;
}

a.ezm-contact-link:hover .ezm-contact-text {
	text-decoration: underline;
}

a.ezm-contact-link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.ezm-contact-icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 2.25em;
	height: 2.25em;
	border-radius: 50%;
	background: var(--ezm-contact-bg, #1b3a63);
	color: var(--ezm-contact-fg, #fff);
}

.ezm-contact-icon .ezm-icon {
	width: 1.1em;
	height: 1.1em;
}

/* Icon above the text. Inline, so the surrounding text alignment (for example
   an Elementor widget set to centre) places it. */
.ezm-contact-link--top {
	flex-direction: column;
	gap: 0.5rem;
	text-align: center;
}

.ezm-contact-link--top .ezm-contact-icon {
	width: 2.75em;
	height: 2.75em;
}

.ezm-contact-link--top .ezm-contact-icon .ezm-icon {
	width: 1.3em;
	height: 1.3em;
}

/* A phone label such as "Sales" gets its own line above the number. */
.ezm-contact-link--top .ezm-contact-label {
	display: block;
	font-weight: 600;
}

.ezm-contact-link--top .ezm-contact-sep {
	display: none;
}

/* With icons above, the list becomes a row of details that wraps. */
ul.ezm-contact--top {
	display: inline-flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 1.5rem 2.5rem;
	max-width: 100%;
}

/* Post lists */

.ezm-posts__title {
	margin-block-end: 0.75em;
}

ul.ezm-posts {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
	gap: 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ezm-posts__item {
	margin: 0;
	padding: 0;
}

.ezm-posts__link {
	display: block;
	text-decoration: none;
}

.ezm-posts__image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	margin-block-end: 0.5rem;
	object-fit: cover;
}

.ezm-posts__name {
	display: block;
	font-weight: 600;
	line-height: 1.35;
}

.ezm-posts__link:hover .ezm-posts__name {
	text-decoration: underline;
}

.ezm-posts__date {
	display: block;
	margin-block-start: 0.25rem;
	font-size: 0.875em;
	opacity: 0.75;
}

/* Tags */

ul.ezm-tags {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ezm-tags__item {
	margin: 0;
	padding: 0;
}

.ezm-tags--cloud {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.375rem 0.875rem;
}

.ezm-tags--list .ezm-tags__item + .ezm-tags__item {
	margin-block-start: 0.375rem;
}

@media (prefers-reduced-motion: reduce) {
	a.ezm-social__link,
	.ezm-floating__label {
		transition: none !important;
	}

	a.ezm-social__link:hover {
		transform: none;
	}
}
