/* Frontend styles owned by the plugin (lightbox, floating contact, form).
   Theme owns layout, typography, and tokens via theme.json. */

/* Lightbox */
.emma-lb { padding: 0; border: 0; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; background: rgba(244, 240, 232, .96); color: var(--emma-charcoal, #2a2620); }
.emma-lb::backdrop { background: rgba(20, 18, 14, .8); }
.emma-lb-bd { position: relative; width: 100%; height: 100%; display: grid; grid-template-rows: auto 1fr; align-items: center; }
.emma-lb-fig { margin: 0; display: grid; place-items: center; height: 100%; padding: 24px; }
.emma-lb-fig img { max-width: 100%; max-height: 90vh; height: auto; width: auto; object-fit: contain; }
.emma-lb-fig figcaption { font-family: var(--emma-font-display, Georgia, serif); font-style: italic; font-size: 14px; margin-top: 16px; opacity: .8; text-align: center; }
.emma-lb-counter { position: absolute; top: 16px; left: 24px; font-family: var(--emma-font-display, Georgia, serif); font-style: italic; font-size: 14px; }
.emma-lb-close { position: absolute; top: 12px; right: 24px; background: transparent; border: 0; font-size: 32px; line-height: 1; cursor: pointer; color: inherit; }
.emma-lb-prev, .emma-lb-next { position: absolute; top: 50%; transform: translateY(-50%); background: transparent; border: 0; font-size: 48px; line-height: 1; cursor: pointer; color: inherit; padding: 12px 16px; opacity: .5; transition: opacity .15s; }
.emma-lb-prev:hover, .emma-lb-next:hover { opacity: 1; }
.emma-lb-prev { left: 8px; }
.emma-lb-next { right: 8px; }
@media (max-width: 640px) {
	.emma-lb-prev, .emma-lb-next { display: none; }
	.emma-lb-counter { font-size: 12px; }
}
@media (prefers-reduced-motion: no-preference) {
	.emma-lb[open] .emma-lb-fig img { animation: emma-fade .2s ease-out; }
}
@keyframes emma-fade { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: scale(1); } }

/* Inquiry form */
.emma-form { display: grid; gap: 12px; }
.emma-form > * { transition: opacity .22s ease, filter .22s ease, max-height .22s ease, margin .22s ease, padding .22s ease; }
.emma-form-grid { display: grid; align-items: start; gap: 12px; grid-template-columns: 1fr 1fr; }
.emma-form label { display: grid; grid-template-rows: auto minmax(2.75rem, auto) minmax(1rem, auto); align-content: start; gap: 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.emma-form input, .emma-form textarea { padding: 10px 12px; border: 1px solid var(--emma-line, #d2d2d2); background: transparent; font: inherit; color: inherit; border-radius: 0; }
.emma-form input::placeholder,
.emma-form textarea::placeholder { color: color-mix(in srgb, currentColor 56%, transparent); opacity: 1; }
.emma-form input:focus, .emma-form textarea:focus { outline: 1px solid var(--emma-charcoal, #2a2620); outline-offset: -1px; }
.emma-form input:-webkit-autofill,
.emma-form textarea:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px var(--emma-cream, #f4f0e8) inset !important; -webkit-text-fill-color: var(--emma-charcoal, #2a2620); caret-color: var(--emma-charcoal, #2a2620); transition: background-color 9999s ease-out; }
.emma-form input:autofill,
.emma-form textarea:autofill { box-shadow: 0 0 0 1000px var(--emma-cream, #f4f0e8) inset; }
.emma-form [aria-invalid="true"] { border-color: var(--emma-error, #8a2f24); background: color-mix(in srgb, var(--emma-error, #8a2f24) 3%, transparent); box-shadow: none; }
.emma-form [aria-invalid="true"]:focus { outline-color: color-mix(in srgb, var(--emma-error, #8a2f24) 72%, var(--emma-charcoal, #2a2620)); }
.emma-form label.has-error { color: inherit; }
.emma-form-field-error { display: block; min-height: 1rem; margin-top: 2px; color: color-mix(in srgb, var(--emma-error, #8a2f24) 82%, var(--emma-charcoal, #2a2620)); font-size: 12px; line-height: 1.25; letter-spacing: 0; text-transform: none; }
.emma-form-field-error.is-empty { visibility: hidden; }
.emma-form textarea { resize: vertical; min-height: 100px; }
.emma-form button[type="submit"] { background: var(--emma-charcoal, #2a2620); color: var(--emma-cream, #f4f0e8); border: 0; padding: 12px 24px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }
.emma-form button[type="submit"]:disabled { opacity: .78; cursor: progress; }
.emma-form button[type="submit"].is-loading::after { content: ""; display: inline-block; width: .8em; height: .8em; margin-left: .75em; border: 1px solid currentColor; border-top-color: transparent; border-radius: 999px; vertical-align: -.08em; animation: emma-spin .75s linear infinite; }
.emma-form-hp { position: absolute; left: -9999px; }
.emma-form-status { display: flex; align-items: center; gap: .55rem; margin: 0; font-size: 13px; min-height: 2.5rem; opacity: 0; transform: translateY(-2px); transition: opacity .16s ease, transform .16s ease, color .16s ease; }
.emma-form-status:not(:empty) { opacity: 1; transform: translateY(0); }
.emma-form-status[data-state="success"] { color: var(--emma-charcoal, #2a2620); }
.emma-form-status[data-state="success"]::before { content: ""; width: 1.75rem; height: 1px; border-radius: 0; background: currentColor; flex: 0 0 auto; }
.emma-form-status[data-state="error"] { color: color-mix(in srgb, var(--emma-error, #8a2f24) 78%, var(--emma-charcoal, #2a2620)); }
.emma-form-status[data-state="submitting"] { color: var(--emma-muted, #6b655d); }
.emma-form-actions { display: grid; gap: 10px; align-items: center; }
.emma-form[data-state="submitting"] > :not(.emma-form-actions) { opacity: .68; pointer-events: none; }
.emma-form[data-state="success"] { gap: 0; }
.emma-form[data-state="success"] > :not(.emma-form-actions) { max-height: 0 !important; margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; opacity: 0; filter: blur(2px); overflow: hidden; pointer-events: none; }
.emma-form[data-state="success"] button[type="submit"] { display: none; }
.emma-form[data-state="success"] .emma-form-actions { gap: 0; }
.emma-form[data-state="success"] .emma-form-status { min-height: 0; padding: .35rem 0 0; }
@keyframes emma-spin { to { transform: rotate(360deg); } }

.emma-contact-card {
	border: 1px solid var(--emma-line, #d2d2d2);
	padding: 18px;
	background: rgba(255, 255, 255, 0.36);
}

.emma-contact-card-title {
	margin: 0 0 6px;
	font-family: var(--emma-font-display, Georgia, serif);
	font-size: 1.3rem;
	font-weight: 400;
}

.emma-contact-card-lead {
	margin: 0 0 18px;
	color: var(--emma-muted, #6b655d);
	font-size: 14px;
	line-height: 1.6;
	max-width: 48ch;
}

.emma-contact-card--compact {
	border: 0;
	padding: 0;
	background: transparent;
}

.emma-contact-card--compact .emma-contact-card-lead {
	font-size: 13px;
	margin-bottom: 14px;
}

.emma-contact-card--landing {
	max-width: 640px;
	margin: 0 auto;
	text-align: left;
}

@media (max-width: 700px) {
	.emma-form-grid { grid-template-columns: 1fr; }
}

/* Gallery LQIP blur-up */
.emma-img-lqip { background-size: cover; background-position: center; filter: blur(0); transition: filter .3s; }
.emma-img-lqip[data-loaded="true"] { background-image: none; }
.emma-img-lqip img { display: block; opacity: 0; transition: opacity .3s; }
.emma-img-lqip[data-loaded="true"] img { opacity: 1; }

/* Sticky info column (desktop) */
@media (min-width: 960px) {
	.emma-prop-info { position: sticky; top: 24px; align-self: start; }
}

/* Mobile hero carousel */
.emma-hero-mobile { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-snap-stop: always; gap: 0; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.emma-hero-mobile::-webkit-scrollbar { display: none; }
.emma-hero-mobile > * { flex: 0 0 100%; scroll-snap-align: start; }
.emma-hero-counter { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); background: rgba(244, 240, 232, .85); backdrop-filter: blur(8px); padding: 4px 12px; font-family: var(--emma-font-display, Georgia, serif); font-style: italic; font-size: 13px; border-radius: 999px; }
@media (min-width: 960px) {
	.emma-hero-mobile { display: block; }
	.emma-hero-mobile > * { flex: none; }
	.emma-hero-counter { display: none; }
}
