/* ==========================================================================
   ebg contact - opc split: ported from e-Business.gr template-parts/home/contact.php
   and its sections.css rules (.ebg-contact, .ebg-form). Business details are
   bound to ebg/site (Customizer > Στοιχεία επιχείρησης); the icon discs draw
   Lucide icons (ISC licence) as CSS masks, one per item modifier. The form is
   the shared [ebg_contact_form] shortcode, look "boxed" (_core/elements/form.css);
   the legacy form posted nowhere, this one mails the business address.
   The extra bottom padding leaves room for the footer CTA band pulled over it.
   ========================================================================== */

@layer components {

	.ebg-cot {
		inline-size: 100%;
		margin-block: 0;
		padding-block: var(--section-py) calc(var(--section-py) + clamp(2.5rem, 5vw, 4rem));
		border-block-start: 1px solid var(--ebg-hairline);
		background-color: var(--ebg-surface-3);

		& > .ebg-shell { margin-block: 0; } /* Blocksy flow spacing */
		& :where(p, h3) { margin: 0; }
	}

	/* Paler band, for pages where the section above already uses surface-3. */
	.ebg-cot.ebg-cot--base {
		background: radial-gradient(circle at 12% 20%, color-mix(in srgb, var(--ebg-accent) 4%, transparent) 0%, transparent 50%),
		            radial-gradient(circle at 88% 80%, color-mix(in srgb, var(--ebg-accent) 3%, transparent) 0%, transparent 45%),
		            var(--ebg-surface-0);
	}

	.ebg-cot__grid {
		display: grid;
		grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
		align-items: start;
		gap: clamp(2rem, 5vw, 4rem);

		& > * { margin-block: 0; }
	}

	.ebg-cot__info > * { margin-block-end: 0; }

	.ebg-cot .ebg-section-title { margin-block: var(--space-xs) var(--space-s); } /* legacy; the reset above took its bottom margin */

	.ebg-cot .ebg-cot__lead {
		max-inline-size: 70ch;
		margin-block: var(--space-xs) var(--space-l);
		color: var(--ebg-ink-2);
		font-size: var(--text-base);
		line-height: var(--lh-body);
	}

	.ebg-cot__list {
		display: flex;
		flex-direction: column;
		gap: var(--space-m);

		& > * { margin-block: 0; }
	}

	/* Item: 44px icon disc in the first column, label over value in the second. */
	.ebg-cot__item {
		display: grid;
		grid-template-columns: 44px minmax(0, 1fr);
		column-gap: var(--space-s);
		align-items: center;
		padding: 8px 0px;

		& > * { grid-column: 2; margin-block: 0; }

		/* Disc on ::before, accent icon on ::after (the icon masks its own box only).
		   Both sit in the same grid cell. A colour is valid only in the last layer of a
		   background shorthand: a colour in an earlier layer drops the whole declaration. */
		&::before,
		&::after {
			content: "";
			box-sizing: border-box;
			grid-row: 1 / span 2;
			grid-column: 1;
			inline-size: 44px;
			block-size: 44px;
		}

		&::before {
			border: 1px solid rgb(30 138 138 / 0.22);
			border-radius: var(--radius-pill);
			background: linear-gradient(-45deg, rgb(30 138 138 / 0.18) 0%, rgb(30 138 138 / 0.04) 100%);
		}

		&::after {
			background-color: var(--ebg-accent);
			mask: var(--ebg-cot-icon) center / 20px no-repeat;
		}

		&.ebg-cot__item--phone { --ebg-cot-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233a14 14 0 0 0 6.392 6.384'/%3E%3C/svg%3E"); }
		&.ebg-cot__item--mobile { --ebg-cot-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='14' height='20' x='5' y='2' rx='2' ry='2'/%3E%3Cpath d='M12 18h.01'/%3E%3C/svg%3E"); }
		&.ebg-cot__item--email { --ebg-cot-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7'/%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3C/svg%3E"); }
		&.ebg-cot__item--address { --ebg-cot-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E"); }
		&.ebg-cot__item--hours { --ebg-cot-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E"); }
	}

	.ebg-cot .ebg-cot__label {
		margin-block-end: 2px;
		color: var(--ebg-ink-3);
		font-family: var(--font-mono);
		font-size: var(--fs-12);
		letter-spacing: var(--tr-eyebrow);
		text-transform: uppercase;
	}

	.ebg-cot .ebg-cot__val {
		color: var(--ebg-ink);
		font-size: var(--text-base);
		font-weight: 600;

		& .wp-block-button__link {
			display: inline;
			min-block-size: 0;
			padding: 11px 0; /* inline box: no layout change, 44px tap height */
			border: 0;
			border-radius: 0;
			background: none;
			color: inherit;
			font: inherit;
			text-decoration: none;

			&::before { content: none; }
			&:is(:hover, :focus-visible) { color: var(--ebg-accent); }
		}
	}

	.ebg-cot .ebg-cot__val.wp-block-buttons { display: block; margin: 0; }
	.ebg-cot .ebg-cot__val .wp-block-button { display: inline; margin: 0; }

	/* Form panel */
	.ebg-cot__panel {
		padding: clamp(2rem, 4vw, 3rem);
		border: 1px solid color-mix(in srgb, var(--ebg-heading-ink) 8%, rgb(255 255 255 / 0.6));
		border-radius: var(--radius-md, 12px);
		background: color-mix(in srgb, var(--ebg-surface-1) 85%, transparent);
		backdrop-filter: blur(16px);
		box-shadow: 0 20px 48px -10px rgb(0 0 0 / 0.08), 0 0 0 1px rgb(255 255 255 / 0.7) inset;

		& > * { margin-block: 0; }
	}

	.ebg-cot .ebg-cot__form-title {
		margin-block-end: var(--space-3xs);
		color: var(--ebg-heading-ink);
		font-family: var(--font-display);
		font-size: var(--text-xl);
		font-weight: 700;
	}

	.ebg-cot .ebg-cot__form-desc {
		margin-block-end: var(--space-m);
		color: var(--ebg-ink-2);
		font-size: var(--text-sm);
		line-height: var(--lh-body);
	}

	@media (max-width: 980px) {
		.ebg-cot__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
	}

	@media (max-width: 820px) {
		.ebg-cot .ebg-cf__row { grid-template-columns: minmax(0, 1fr); }
	}
}
