/* MagiHelena Astro Engine — frontend styles (brand styling lives in the Divi child theme) */

.mhae-drawer { margin: 0 0 1.25em; }
.mhae-section { border: 1px solid #e2e2e2; padding: 1em 1.25em; margin: 0 0 1em; background: #fff; }
.mhae-section legend { font-weight: 600; padding: 0 .5em; }
.mhae-field-wrap { margin: 0 0 .75em; }
.mhae-field-wrap > label { display: block; font-weight: 500; margin-bottom: .25em; }
.mhae-field-wrap .required { color: #b32d2e; }
.mhae-radio { display: inline-block; margin-right: 1em; font-weight: 400; }
.mhae-hidden { display: none !important; }

.mhae-profile-picker { margin: 0 0 1em; }

/* autocomplete dropdown */
.mhae-field-wrap { position: relative; }
.mhae-suggest {
	position: absolute; z-index: 100; left: 0; right: 0; margin: 0; padding: 0;
	list-style: none; background: #fff; border: 1px solid #ccc; max-height: 220px; overflow-y: auto;
}
.mhae-suggest li { padding: .4em .75em; cursor: pointer; margin: 0; }
.mhae-suggest li:hover { background: #f2f2f2; }

/* inline edit inside slide-in cart */
.mhae-inline-edit { margin-top: .5em; padding: .75em; background: #fafafa; border: 1px solid #e2e2e2; }
.mhae-inline-edit .button { margin-right: .5em; }

/* "Your Astro-Data" panel (product page) */
.mhae-panel {
	display: flex; align-items: center; gap: 14px;
	border: 1px solid #000; background: #faf9fc;
	padding: 16px 18px; margin: 0 0 1.25em;
}
.mhae-panel-icon {
	flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
	background: #111; color: #fff; display: inline-flex;
	align-items: center; justify-content: center; font-size: 16px;
}
.mhae-panel-text { flex: 1 1 auto; display: flex; flex-direction: column; line-height: 1.35; }
.mhae-panel-text strong { font-size: 15px; }
.mhae-panel-sub { font-size: 13px; color: #555; }
.mhae-open-drawer {
	flex: 0 0 auto; background: #fff; color: #111;
	border: 1px solid #111; padding: 10px 16px;
	font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
	cursor: pointer; transition: all .15s;
}
.mhae-open-drawer:hover { background: #111; color: #fff; }
.mhae-panel-status { flex: 0 0 auto; font-size: 13px; color: #0a7d24; font-weight: 600; }

/* slide-in sidebar (desktop) / bottom sheet (mobile) */
.mhae-modal {
	position: fixed; inset: 0; z-index: 99999;
	background: rgba(0,0,0,.45);
	display: flex; align-items: stretch; justify-content: flex-end;
}
.mhae-modal[hidden] { display: none; }
.mhae-modal-box {
	position: relative; background: #fff;
	box-sizing: border-box; /* padding must not push the box past the viewport */
	width: 100%; max-width: 480px; height: 100%;
	overflow-y: auto; -webkit-overflow-scrolling: touch;
	padding: 28px 32px 24px;
	animation: mhae-slide-in .25s ease-out;
}
.mhae-modal-box *, .mhae-modal-box *::before, .mhae-modal-box *::after { box-sizing: border-box; }
@keyframes mhae-slide-in {
	from { transform: translateX(100%); }
	to   { transform: translateX(0); }
}
.mhae-modal-box h4 { margin: 0 0 1em; }
.mhae-modal-close {
	position: absolute; top: 10px; right: 14px;
	background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: #111;
}
.mhae-modal-done {
	position: sticky; bottom: 0; left: 0; right: 0;
	display: block; width: 100%; margin-top: 1em; padding: 16px 0;
	background: #111 !important; color: #fff !important;
	text-transform: uppercase; letter-spacing: .08em;
}
body.mhae-modal-open { overflow: hidden; }
.mhae-field-wrap.mhae-error .mhae-input { border-color: #b32d2e; }
.mhae-field-wrap.mhae-error > label { color: #b32d2e; }

@media (max-width: 600px) {
	.mhae-panel { flex-wrap: wrap; }
	.mhae-open-drawer { width: 100%; }
	/* bottom sheet on phones */
	.mhae-modal { align-items: flex-end; justify-content: center; }
	.mhae-modal-box {
		max-width: none; height: auto; max-height: 92vh;
		border-radius: 14px 14px 0 0; padding: 24px 20px 20px;
		animation: mhae-slide-up .25s ease-out;
	}
	@keyframes mhae-slide-up {
		from { transform: translateY(100%); }
		to   { transform: translateY(0); }
	}
}

/* checkout confirmation */
.mhae-checkout-confirm { margin: 1em 0; font-weight: 600; }

/* ---------- combined date/time pickers ---------- */
.mhae-native-part { display: none !important; } /* real named fields, JS-synced */
.mhae-drawer input[type="date"].mhae-date-picker,
.mhae-drawer input[type="time"].mhae-time-picker {
	width: 100%; max-width: 240px; padding: 9px 10px;
	border: 1px solid #ccc; border-radius: 0; font: inherit; background: #fff;
}

/* ---------- per-section tools (profiles / cross-fill) ---------- */
.mhae-section-tools {
	display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
	margin: 0 0 12px; font-size: 12px;
}
.mhae-section-tools .mhae-profile-picker { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.mhae-section-tools select.mhae-profile-select { padding: 4px 6px; font-size: 12px; max-width: 180px; }
.mhae-copy-person, .mhae-save-profile {
	background: none; border: 0; padding: 0; cursor: pointer;
	font-size: 12px; color: #6b4e8f; text-decoration: underline;
}
.mhae-copy-person:hover, .mhae-save-profile:hover { color: #4a3466; }

/* ---------- region (state/country) select ---------- */
.mhae-region-lookup select.mhae-input { width: 100%; padding: 9px 10px; border: 1px solid #ccc; background: #fff; font: inherit; }

/* ---------- My Account: Birth Profiles ---------- */
.mhae-profile-form {
	border: 1px solid #e6e6e6; padding: 18px; margin: 0 0 18px; max-width: 560px;
}
.mhae-profile-form h4 { margin: 0 0 10px; }
.mhae-profile-form input[type="text"],
.mhae-profile-form input[type="date"],
.mhae-profile-form input[type="time"] { width: 100%; max-width: 320px; padding: 8px 10px; border: 1px solid #ccc; }
.mhae-profile-form .mhae-profile-delete { margin-left: 10px; background: #fff; color: #a00; border: 1px solid #a00; }
.mhae-profile-add summary { cursor: pointer; font-weight: 600; margin: 8px 0 14px; }
