/**
 * Schedule a Call widget styles.
 *
 * Tokenized: brand colors come from --mms-{token}, with hex fallbacks
 * inline so the modal still renders correctly even before the plugin's
 * :root style block has loaded (e.g. Elementor editor preview).
 *
 * Neutral grays (n50–n800) are kept hardcoded.
 */

/* ── ISOLATION RESET ─────────────────────────────────────────────── */
.mms-schedule, .mms-schedule *, .mms-schedule *::before, .mms-schedule *::after {
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
}
.mms-schedule .step-title,.mms-schedule .success-title,.mms-schedule .success-subhead {
	font-family: 'DM Sans', sans-serif !important;
	font-weight: 700; line-height: 1.2;
	margin: 0; padding: 0; border: none; background: none;
	color: #1f2937;
}
.mms-schedule p,.mms-schedule ul,.mms-schedule li {
	margin: 0; padding: 0; list-style: none;
	font-family: 'DM Sans', sans-serif !important;
}
.mms-schedule a { text-decoration: none; color: inherit; }
.mms-schedule input,.mms-schedule select,.mms-schedule button {
	font-family: 'DM Sans', sans-serif !important;
	-webkit-appearance: none; -moz-appearance: none; appearance: none; margin: 0;
}

/* ── ROOT (overlay) ──────────────────────────────────────────────── */
.mms-schedule {
	font-family: 'DM Sans', sans-serif !important;
	font-size: 16px; line-height: 1.5; color: #1f2937;
	background: rgba(0,0,0,0.6);
	position: fixed;
	top: 0; left: 0;
	width: 100%; height: 100%;
	z-index: 999999;
	display: flex; align-items: center; justify-content: center; padding: 16px;
	animation: mmsSchedFadeIn 0.2s ease;

	/* Local fallbacks — match the design-system defaults so the modal
	   renders correctly even before the plugin :root vars resolve. */
	--p:    var(--mms-p,   #1e3295);
	--pdk:  var(--mms-pdk, #171e3b);
	--sec:  var(--mms-sec, #0ea5c9);
	--p50:  #eff6ff; --p100: #dbeafe;
	--n50:  #f9fafb; --n100: #f3f4f6; --n200: #e5e7eb;
	--n300: #d1d5db; --n400: #9ca3af; --n500: #6b7280;
	--n600: #4b5563; --n700: #374151; --n800: #1f2937;
}
@keyframes mmsSchedFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── MODAL ───────────────────────────────────────────────────────── */
/* Flex column layout: close-btn pinned top, body scrolls, footer pinned
   bottom. max-height keeps modal inside the viewport. */
.mms-schedule .modal {
	background: white;
	border-radius: 15px;
	box-shadow: 0 25px 60px rgba(0,0,0,0.2);
	width: 100%;
	max-width: 460px;
	max-height: calc(100vh - 32px);
	display: flex;
	flex-direction: column;
	position: relative;
	animation: mmsSchedSlideIn 0.3s ease;
	overflow: hidden;
}
.mms-schedule .modal-body   { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; }
.mms-schedule .modal-footer { flex: 0 0 auto; }

/* Inline success-screen close button — pinned to top-right. */
.mms-schedule .success-screen { position: relative; }
.mms-schedule .success-close-btn {
	position: absolute;
	top: -8px;
	right: -8px;
	width: 36px;
	height: 36px;
	border-radius: 999px;
	border: none;
	background: rgba(23,30,59,0.05);
	color: #6b7280;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
	padding: 0;
	z-index: 2;
}
.mms-schedule .success-close-btn:hover,
.mms-schedule .success-close-btn:focus {
	background: rgba(23,30,59,0.12);
	color: #171E3B;
	outline: none;
}
@keyframes mmsSchedSlideIn { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.mms-schedule .close-btn {
	position: absolute; top: 14px; right: 14px; width: 34px; height: 34px;
	border-radius: 50%; border: none; background: transparent; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	color: var(--n400); transition: background 0.15s; z-index: 10;
}
.mms-schedule .close-btn:hover { background: var(--n100); color: var(--n700); }

/* ── BODY / PROGRESS ─────────────────────────────────────────────── */
.mms-schedule .modal-body { padding: 40px 40px 24px; }
@media (max-width: 480px) { .mms-schedule .modal-body { padding: 28px 20px 16px; } }

.mms-schedule .progress-wrap { margin-bottom: 28px; }
.mms-schedule .progress-labels { display: flex; justify-content: space-between; font-size: 0.82rem; margin-bottom: 8px; }
.mms-schedule .progress-labels span:first-child { color: var(--n500); }
.mms-schedule .progress-labels span:last-child { color: var(--n700); font-weight: 600; }
.mms-schedule .progress-track { height: 8px; background: var(--n100); border-radius: 99px; overflow: hidden; }
.mms-schedule .progress-bar { height: 100%; background: linear-gradient(to right, var(--p), var(--pdk)); border-radius: 99px; transition: width 0.5s cubic-bezier(0.4,0,0.2,1); }

/* ── STEP HEADER ─────────────────────────────────────────────────── */
.mms-schedule .step-header { text-align: center; margin-bottom: 28px; }
.mms-schedule .step-icon { width: 64px; height: 64px; background: linear-gradient(135deg, var(--p100), #cffafe); border-radius: 15px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.mms-schedule .step-icon svg { width: 30px; height: 30px; color: var(--p); }
.mms-schedule .step-header .step-title { font-size: 1.6rem; font-weight: 700; color: var(--n800); margin-bottom: 6px; }
.mms-schedule .step-header p { font-size: 0.95rem; color: var(--n500); }

/* ── FORM FIELDS ─────────────────────────────────────────────────── */
.mms-schedule .field-group { margin-bottom: 18px; }
.mms-schedule .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
@media (max-width: 400px) { .mms-schedule .field-row { grid-template-columns: 1fr; } }
.mms-schedule label { display: block; font-size: 0.78rem; font-weight: 700; color: var(--n600); margin-bottom: 7px; text-transform: uppercase; letter-spacing: 0.04em; font-family: 'DM Sans', sans-serif !important; }
.mms-schedule .input-wrap { position: relative; }
.mms-schedule .input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--n400); width: 18px; height: 18px; pointer-events: none; }
.mms-schedule input[type="text"],
.mms-schedule input[type="email"],
.mms-schedule input[type="tel"],
.mms-schedule input[type="date"],
.mms-schedule select {
	width: 100%; padding: 13px 14px; border: 1.5px solid var(--n200); border-radius: 15px;
	font-family: 'DM Sans', sans-serif !important; font-size: 0.95rem; color: var(--n800);
	background: white; outline: none; transition: border-color 0.15s, box-shadow 0.15s; line-height: 1.4;
}
.mms-schedule .has-icon input { padding-left: 42px; }
.mms-schedule input:focus, .mms-schedule select:focus { border-color: var(--p); box-shadow: 0 0 0 3px rgba(30, 50, 149, 0.1); }

/* ── SECURE NOTE (footer of step 3) ──────────────────────────────── */
.mms-schedule .secure-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 0.8rem; color: var(--n400); margin-top: 4px; }

/* ── SUCCESS ─────────────────────────────────────────────────────── */
.mms-schedule .success-screen { text-align: center; padding: 8px 0 12px; }
.mms-schedule .success-icon { width: 80px; height: 80px; background: linear-gradient(135deg, #d1fae5, #a7f3d0); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.mms-schedule .success-icon svg { width: 36px; height: 36px; color: #059669; }
.mms-schedule .success-screen .success-title { font-size: 1.7rem; font-weight: 700; color: var(--n800); margin-bottom: 10px; }
.mms-schedule .success-screen p { font-size: 0.95rem; color: var(--n500); line-height: 1.6; max-width: 340px; margin: 0 auto; }
.mms-schedule .success-detail { background: var(--n100); border-radius: 15px; padding: 16px 20px; margin: 20px 0; text-align: left; }
.mms-schedule .sdr { display: flex; justify-content: space-between; font-size: 0.85rem; padding: 5px 0; border-bottom: 1px solid var(--n200); }
.mms-schedule .sdr:last-child { border-bottom: none; }
.mms-schedule .sdr span { color: var(--n500); }
.mms-schedule .sdr strong { color: var(--n800); font-weight: 600; }

/* ── FOOTER NAV ──────────────────────────────────────────────────── */
.mms-schedule .modal-footer { display: flex; align-items: center; justify-content: space-between; padding: 16px 40px 28px; }
@media (max-width: 480px) { .mms-schedule .modal-footer { padding: 12px 20px 20px; } }

.mms-schedule .btn-back { display: flex; align-items: center; gap: 8px; padding: 12px 20px; border: none; background: transparent; font-family: 'DM Sans', sans-serif !important; font-size: 0.95rem; font-weight: 600; color: var(--n600); cursor: pointer; border-radius: 15px; transition: all 0.15s; line-height: 1; }
.mms-schedule .btn-back:hover:not(:disabled) { background: var(--n100); color: var(--n800); }
.mms-schedule .btn-back:disabled { opacity: 0.4; cursor: not-allowed; }

.mms-schedule .btn-next { display: flex; align-items: center; gap: 8px; padding: 12px 28px; border: none; background: linear-gradient(to right, var(--p), var(--pdk)); color: white; font-family: 'DM Sans', sans-serif !important; font-size: 0.95rem; font-weight: 700; border-radius: 15px; cursor: pointer; transition: all 0.2s; box-shadow: 0 4px 14px rgba(23, 30, 59, 0.2); line-height: 1; }
.mms-schedule .btn-next:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(23, 30, 59, 0.3); }
.mms-schedule .btn-next:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

.mms-schedule .step-content { animation: mmsSchedStep 0.25s ease; }
@keyframes mmsSchedStep { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: translateX(0); } }
