.ued-modal-open { overflow: hidden; }
.ued-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.58);
  box-sizing: border-box;
}
.ued-overlay.ued-open { display: flex; }
.ued-modal {
  position: relative;
  width: min(680px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: #fff;
  color: #222;
  border-radius: 10px;
  padding: 26px 28px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  font-family: inherit;
}
.ued-modal h2 {
  margin: 0 38px 20px 0;
  color: #9c0000;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
}
.ued-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f2f2f2;
  color: #333;
  font-size: 25px;
  line-height: 32px;
  cursor: pointer;
}
.ued-close:hover, .ued-close:focus { background: #e0e0e0; }
.ued-field { margin-bottom: 14px; }
.ued-field label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 700;
  color: #333;
}
.ued-field label span, .ued-consent strong { color: #9c0000; }
.ued-field input,
.ued-field select,
.ued-field textarea {
  width: 100%;
  border: 1px solid #cfcfcf;
  border-radius: 6px;
  padding: 9px 10px;
  box-sizing: border-box;
  font: inherit;
  font-size: 15px;
  background: #fff;
  color: #222;
}
.ued-field textarea { resize: vertical; min-height: 150px; }
.ued-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ued-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 14px;
  font-size: 14px;
  line-height: 1.35;
  color: #333;
}
.ued-consent input { margin-top: 2px; }
.ued-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}
.ued-captcha-row { margin-top: 4px; }
.ued-captcha { min-height: 0; }
.ued-status {
  min-height: 21px;
  margin: 8px 0 14px;
  font-size: 14px;
  font-weight: 600;
}
.ued-status-success { color: #187b2e; }
.ued-status-error { color: #9c0000; }
.ued-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.ued-actions button,
.ustarch-email-dialog-button {
  border: 0;
  border-radius: 6px;
  padding: 10px 18px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.ued-submit {
  background: #9c0000;
  color: #fff;
}
.ued-submit:hover, .ued-submit:focus { background: #7e0000; }
.ued-submit:disabled { opacity: 0.65; cursor: wait; }
.ued-cancel {
  background: #e7e7e7;
  color: #222;
}
.ued-cancel:hover, .ued-cancel:focus { background: #d4d4d4; }
.ustarch-email-dialog-button {
  background: #9c0000;
  color: #fff;
}
@media (max-width: 640px) {
  .ued-overlay { padding: 10px; align-items: flex-start; }
  .ued-modal { width: 100%; max-height: calc(100vh - 20px); padding: 22px 16px 18px; border-radius: 8px; }
  .ued-modal h2 { font-size: 22px; margin-bottom: 16px; }
  .ued-grid { grid-template-columns: 1fr; gap: 0; }
  .ued-actions { flex-direction: column-reverse; }
  .ued-actions button { width: 100%; }
}
