.mr-modal[hidden],
.mr-step[hidden],
.mr-success[hidden],
.mr-error[hidden] {
  display: none !important;
}

html.mr-modal-open {
  overflow: hidden;
}

.mr-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: rgba(234, 234, 234, 0.93);
  backdrop-filter: blur(6px);
}

.mr-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1000px;
  max-height: min(88vh, 880px);
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.25);
}

.mr-brand-header {
  position: relative;
  z-index: 2;
  margin-bottom: -8px;
}

.mr-logo-bar {
  width: 100%;
  background: #f2f2f2;
  padding: 30px 0 28px;
  display: flex;
  justify-content: center;
}

.mr-logo-wrap {
  position: relative;
  z-index: 2;
  width: 65px;
  height: 65px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.mr-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mr-wave {
  display: block;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 40px;
  margin-top: -32px;
}

.mr-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #0f172a;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.mr-close:hover {
  background: #f8fafc;
}

.mr-content {
  overflow-y: auto;
  min-height: 0;
  padding: 4px 0 40px;
}

.mr-content::-webkit-scrollbar {
  width: 0;
}

.mr-title,
.mr-question,
.mr-success h3 {
  margin: 0 auto 18px;
  width: 95%;
  max-width: 800px;
  text-align: center;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -0.2px;
  text-transform: none;
}

.mr-title {
  font-size: 32px;
  margin-bottom: 6px;
}

.mr-question,
.mr-success h3 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
}

.mr-intro {
  width: 95%;
  max-width: 680px;
  margin: 0 auto 16px;
  text-align: center;
  color: #64748b;
  font-size: 16px;
  line-height: 1.45;
}

.mr-form {
  width: 95%;
  max-width: 800px;
  margin: 0 auto;
}

.mr-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  width: 100%;
}

.mr-options-choice {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 560px;
  margin: 0 auto;
}

.mr-tile {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid #f2f2f2;
  border-radius: 15px;
  background: #f9f9f9;
  color: #0f172a;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.mr-tile:hover,
.mr-tile:focus-visible {
  background: #f5f5f5;
}

.mr-tile.is-selected {
  background: #f1f1f1;
  border-color: var(--accent, #e2460a);
}

.mr-tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 52px;
  color: #3b82c4;
  flex: 0 0 auto;
}

.mr-tile-icon svg,
.mr-tile-icon img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.mr-tile-label {
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
  text-align: center;
}

.mr-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.mr-field {
  display: block;
}

.mr-field-wide {
  grid-column: 1 / -1;
}

.mr-field > span {
  display: block;
  margin: 0 0 6px;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
}

.mr-field input,
.mr-field textarea {
  width: 100%;
  border: 1px solid #d6d6d6;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  padding: 11px 12px;
}

.mr-field input:focus,
.mr-field textarea:focus {
  outline: none;
  border-color: var(--accent, #e2460a);
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.2);
}

.mr-field textarea {
  min-height: 130px;
  resize: vertical;
}

.mr-disclaimer {
  max-width: 680px;
  margin: 14px auto 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.mr-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 20px 0 0;
}

.mr-nav .sos-button,
.mr-nav button {
  border-radius: var(--radius, 8px);
  padding: 10px 23px;
  min-width: 180px;
  width: calc(50% - 5px);
  max-width: 220px;
  min-height: 46px;
  cursor: pointer;
}

.mr-error {
  margin: 16px 0 0;
  border-radius: 10px;
  padding: 11px 13px;
  background: #fff0f0;
  color: #9c2020;
  text-align: center;
}

.mr-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.mr-success {
  width: 95%;
  max-width: 800px;
  margin: 0 auto;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 10px;
}

.mr-success p {
  max-width: 580px;
  margin: 0;
  color: #334155;
  font-size: 18px;
  line-height: 1.45;
}

.mr-submit.is-loading {
  opacity: 0.7;
  cursor: wait;
}

.mr-shake {
  animation: mr-shake 320ms ease;
}

@keyframes mr-shake {
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

@media (max-width: 873px) {
  .mr-logo-bar {
    padding: 25px 0 0;
  }

  .mr-logo-wrap {
    width: 55px;
    height: 55px;
  }

  .mr-wave {
    height: 29px;
  }
}

@media (max-width: 720px) {
  .mr-modal {
    padding: 0;
    align-items: stretch;
  }

  .mr-dialog {
    max-width: none;
    max-height: 100dvh;
    border-radius: 0;
  }

  .mr-content {
    padding: 8px 0 40px;
  }

  .mr-title {
    font-size: 25px;
  }

  .mr-question,
  .mr-success h3 {
    font-size: 22px;
  }

  .mr-options,
  .mr-options-choice {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mr-tile {
    min-height: 120px;
    gap: 10px;
  }

  .mr-fields {
    grid-template-columns: 1fr;
  }

  .mr-field-wide {
    grid-column: auto;
  }

  .mr-nav .sos-button,
  .mr-nav button {
    min-width: 0;
    max-width: none;
  }
}
