/* ═══════════════════════════════════════════════════════════
   LEAD CAPTURE — Popup Modal + Slider Lateral
   Elevate Dynamics 365
   ═══════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════
   POPUP MODAL (mc- prefix)
   ══════════════════════════════════════ */

.mc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.mc-overlay.mc-active {
  opacity: 1;
  visibility: visible;
}

.mc-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 44px 40px 36px 40px;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  font-family: 'DM Sans', system-ui, sans-serif;
  transform: scale(0.95);
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
}
.mc-overlay.mc-active .mc-modal {
  transform: scale(1);
}

.mc-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: #f5f5f5;
  border-radius: 50%;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.mc-close:hover { background: #e8e8e8; color: #333; }
.mc-close:focus-visible { outline: 2px solid #263FC9; outline-offset: 2px; }
.mc-close svg { width: 18px; height: 18px; }

.mc-title {
  font-size: 22px;
  font-weight: 700;
  color: #0D0F1A;
  margin: 0 0 8px 0;
  padding-right: 40px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.mc-subtitle {
  font-size: 15px;
  color: #6B7199;
  margin: 0 0 36px 0;
  line-height: 1.5;
}

.mc-form { display: flex; flex-direction: column; }

.mc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.mc-field { display: flex; flex-direction: column; gap: 6px; }
.mc-field label { font-size: 13px; font-weight: 600; color: #3A3F5C; }
.mc-field label span,
.mc-field label .mc-optional { font-weight: 400; color: #8890B5; font-size: 12px; }

.mc-field input,
.mc-field select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font-size: 15px;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #0D0F1A;
  background: #F4F5FB;
  border: 1.5px solid #E8EAF6;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.mc-field select {
  padding-right: 36px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238890B5' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-color: #F4F5FB;
}
.mc-field input:focus,
.mc-field select:focus { border-color: #263FC9; box-shadow: 0 0 0 3px rgba(38, 63, 201, 0.12); }
.mc-field input::placeholder { color: #8890B5; }
.mc-field input.mc-input-error,
.mc-field select.mc-input-error { border-color: #e53e3e; box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1); }

.mc-error-msg { font-size: 12px; color: #e53e3e; margin: 2px 0 0 0; display: none; }
.mc-error-msg.mc-visible { display: block; }

.mc-checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
  margin-bottom: 28px;
}
.mc-checkbox-wrap input[type="checkbox"] { width: 18px; height: 18px; min-width: 18px; margin-top: 2px; accent-color: #263FC9; cursor: pointer; }
.mc-checkbox-label { font-size: 13px; color: #6B7199; line-height: 1.5; cursor: pointer; }
.mc-checkbox-label a { color: #263FC9; text-decoration: underline; text-underline-offset: 2px; }
.mc-checkbox-label a:hover { color: #1F3297; }
.mc-terms-error { margin-top: -18px; margin-bottom: 16px; }

/* ====== PHONE WITH PREFIX ====== */
.mc-phone-wrapper {
  display: flex;
  align-items: center;
  height: 48px;
  background: #F4F5FB;
  border: 1.5px solid #E8EAF6;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.mc-phone-wrapper:focus-within {
  border-color: #263FC9;
  box-shadow: 0 0 0 3px rgba(38, 63, 201, 0.12);
}
.mc-phone-prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 500;
  color: #3A3F5C;
  background: #E8EAF6;
  height: 100%;
  border-right: 1.5px solid #E8EAF6;
  user-select: none;
  white-space: nowrap;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.mc-phone-wrapper input {
  flex: 1;
  height: 100%;
  padding: 0 14px;
  font-size: 15px;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #0D0F1A;
  background: transparent;
  border: none;
  outline: none;
  box-sizing: border-box;
}
.mc-phone-wrapper input::placeholder {
  color: #8890B5;
}

.mc-submit {
  width: 100%;
  height: 52px;
  background: #263FC9;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  font-family: 'DM Sans', system-ui, sans-serif;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.mc-submit:hover { background: #1F3297; box-shadow: 0 8px 28px rgba(38, 63, 201, 0.32); transform: translateY(-1px); }
.mc-submit:active { transform: translateY(0); }
.mc-submit:focus-visible { outline: 2px solid #263FC9; outline-offset: 3px; }
.mc-submit:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

.mc-spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: mc-spin 0.6s linear infinite; display: none; }
.mc-submit.mc-loading .mc-spinner { display: block; }
.mc-submit.mc-loading .mc-submit-text { display: none; }
.mc-submit.mc-loading .mc-submit-loading { display: inline; }
.mc-submit-loading { display: none; }
@keyframes mc-spin { to { transform: rotate(360deg); } }

.mc-security { text-align: center; font-size: 12px; color: #8890B5; margin: 20px 0 0 0; }

.mc-success-view { display: none; text-align: center; padding: 32px 0 8px; }
.mc-success-view.mc-visible { display: block; }
.mc-success-icon { width: 64px; height: 64px; border-radius: 50%; background: rgba(74, 222, 128, 0.1); margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; }
.mc-success-icon svg { width: 32px; height: 32px; stroke: #4ade80; }
.mc-success-title { font-size: 20px; font-weight: 700; color: #0D0F1A; margin: 0 0 8px; }
.mc-success-msg { font-size: 15px; color: #6B7199; line-height: 1.6; margin: 0 0 24px; }
.mc-success-close { display: inline-flex; padding: 12px 32px; border-radius: 10px; border: 1.5px solid #E8EAF6; background: #F4F5FB; color: #0D0F1A; font-family: 'DM Sans', system-ui, sans-serif; font-size: 15px; font-weight: 500; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.mc-success-close:hover { background: #e8eaf6; border-color: #ccc; }
.mc-success-close:focus-visible { outline: 2px solid #263FC9; outline-offset: 3px; }

@media (max-width: 600px) {
  .mc-modal { padding: 28px 20px 24px 20px; }
  .mc-title { font-size: 21px; }
  .mc-row { grid-template-columns: 1fr; gap: 0; }
  .mc-row .mc-field { margin-bottom: 16px; }
  .mc-row .mc-field:last-child { margin-bottom: 0; }
}


/* ══════════════════════════════════════
   SLIDER LATERAL (sl- prefix)
   ══════════════════════════════════════ */

.sl-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
}
.sl-overlay.active { pointer-events: auto; }
.sl-overlay.active::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  animation: slFadeIn 0.3s ease forwards;
}

.sl-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  height: 100vh;
  background: #ffffff;
  box-shadow: -12px 0 50px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.sl-overlay.active .sl-panel { transform: translateX(0); }

.sl-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  background: #F4F5FB;
  border-radius: 50%;
  font-size: 22px;
  color: #8890B5;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  z-index: 1;
  line-height: 1;
}
.sl-close:hover { background: #E8EAF6; color: #0D0F1A; }
.sl-close:focus-visible { outline: 2px solid #263FC9; outline-offset: 2px; }

.sl-content { padding: 80px 32px 40px 32px; flex: 1; display: flex; flex-direction: column; }

.sl-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #263FC9; margin-bottom: 20px; }
.sl-title { font-size: 26px; font-weight: 700; color: #0D0F1A; line-height: 1.3; margin: 0 0 14px 0; }
.sl-subtitle { font-size: 15px; color: #6B7199; line-height: 1.6; margin: 0 0 16px 0; }
.sl-proof { font-size: 14px; color: #263FC9; font-weight: 500; margin: 0 0 32px 0; padding-bottom: 28px; border-bottom: 1px solid #E8EAF6; line-height: 1.5; }

.sl-form { display: flex; flex-direction: column; }
.sl-field { margin-bottom: 18px; }
.sl-field label { display: block; font-size: 13px; font-weight: 600; color: #3A3F5C; margin-bottom: 8px; }
.sl-field input {
  width: 100%; height: 48px; padding: 0 14px; font-size: 15px;
  font-family: 'DM Sans', system-ui, sans-serif; color: #0D0F1A;
  background: #F4F5FB; border: 1.5px solid #E8EAF6; border-radius: 10px;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box; -webkit-appearance: none;
}
.sl-field input::placeholder { color: #8890B5; }
.sl-field input:focus { border-color: #263FC9; box-shadow: 0 0 0 3px rgba(38, 63, 201, 0.12); }
.sl-field input.sl-input-error { border-color: #e53e3e; box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1); }

.sl-error-msg { font-size: 12px; color: #e53e3e; margin: 6px 0 0 0; display: none; }
.sl-error-msg.sl-visible { display: block; }

.sl-submit {
  width: 100%; height: 52px; margin-top: 8px;
  background: #263FC9; color: #ffffff;
  font-size: 16px; font-weight: 600; font-family: 'DM Sans', system-ui, sans-serif;
  border: none; border-radius: 10px; cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.sl-submit:hover { background: #1F3297; box-shadow: 0 8px 28px rgba(38, 63, 201, 0.32); transform: translateY(-1px); }
.sl-submit:active { transform: translateY(0); }
.sl-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.sl-submit:focus-visible { outline: 2px solid #263FC9; outline-offset: 3px; }

.sl-spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: sl-spin 0.6s linear infinite; display: none; }
.sl-submit.sl-loading .sl-spinner { display: block; }
.sl-submit.sl-loading .sl-submit-text { display: none; }
.sl-submit.sl-loading .sl-submit-loading { display: inline; }
.sl-submit-loading { display: none; }
@keyframes sl-spin { to { transform: rotate(360deg); } }

.sl-legal { margin-top: 20px; }
.sl-checkbox-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.sl-checkbox-label input[type="checkbox"] { width: 16px; height: 16px; min-width: 16px; margin-top: 1px; accent-color: #263FC9; cursor: pointer; }
.sl-checkbox-label span { font-size: 12px; color: #8890B5; line-height: 1.5; }
.sl-checkbox-label a { color: #263FC9; text-decoration: underline; text-underline-offset: 2px; }
.sl-checkbox-label a:hover { color: #1F3297; }
.sl-spam-note { font-size: 11px; color: #8890B5; margin: 12px 0 0 0; text-align: center; }

.sl-success { display: none; text-align: center; padding: 40px 0; }
.sl-success.sl-visible { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; animation: slSuccessFade 0.4s ease; }
.sl-success-icon { width: 64px; height: 64px; border-radius: 50%; background: rgba(74, 222, 128, 0.1); margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; }
.sl-success-icon svg { width: 32px; height: 32px; }
.sl-success-title { font-size: 20px; font-weight: 700; color: #0D0F1A; margin: 0 0 8px 0; }
.sl-success-text { font-size: 14px; color: #6B7199; margin: 0; }

@keyframes slFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slSuccessFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 600px) {
  .sl-panel { width: 100%; height: auto; max-height: 85vh; top: auto; bottom: 0; right: 0; border-radius: 20px 20px 0 0; transform: translateY(100%); box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15); }
  .sl-overlay.active .sl-panel { transform: translateY(0); }
  .sl-content { padding: 60px 24px 32px 24px; }
  .sl-title { font-size: 22px; }
}
