/* Centered dialogs with blurred backdrop */
.ed-dialog-root {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.ed-dialog-root.is-open {
  display: flex;
}

.ed-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 28, 40, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.ed-dialog-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  padding: 24px 24px 18px;
  animation: edDialogIn 0.18s ease-out;
}

@keyframes edDialogIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.ed-dialog-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
  color: #222;
}

.ed-dialog-message {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.55;
  color: #555;
  white-space: pre-wrap;
}

.ed-dialog-input {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 18px;
  padding: 10px 12px;
  border: 1px solid #ccd3db;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ed-dialog-input:focus {
  border-color: #5b9bd5;
  box-shadow: 0 0 0 3px rgba(91, 155, 213, 0.2);
}

.ed-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.ed-dialog-actions .btn {
  min-width: 84px;
  border-radius: 8px;
}

.ed-dialog-actions .btn-primary {
  background: #2f6fed;
  border-color: #2f6fed;
}

.ed-dialog-actions .btn-primary:hover {
  background: #2458c4;
  border-color: #2458c4;
}

/* Bootstrap modal: blur + center polish */
.modal-backdrop.in {
  background: rgba(20, 28, 40, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 1 !important;
}

.modal-dialog {
  margin: 10vh auto;
}

.modal-content {
  border: none;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.modal-header {
  border-bottom: 1px solid #eef1f4;
  padding: 16px 20px;
}

.modal-body {
  padding: 18px 20px;
}

.modal-footer {
  border-top: 1px solid #eef1f4;
  padding: 12px 20px;
}

/* In-page popups on create page */
#LoadBox,
#AddWordWindow {
  position: fixed !important;
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  margin: 0 !important;
  transform: translate(-50%, -50%);
  border: none !important;
  border-radius: 14px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  z-index: 10040 !important;
}

#ShowWordsList {
  border: none !important;
  border-radius: 14px !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  z-index: 10030 !important;
}

.mask_box {
  position: fixed !important;
  background: rgba(20, 28, 40, 0.4) !important;
  opacity: 1 !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 10020 !important;
}

.ed-popup-scrim {
  position: fixed;
  inset: 0;
  z-index: 10025;
  display: none;
  background: rgba(20, 28, 40, 0.4);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.ed-popup-scrim.is-on {
  display: block;
}
