/* DoorForce Feedback — premium dialogs, toasts, loading (Office + Technician) */

.df-feedback-root {
  position: relative;
  z-index: 12000;
}

.df-feedback-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 35, 66, 0.48);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: dfFbFade 0.16s ease;
}

.df-feedback-dialog {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  overflow: hidden;
  animation: dfFbRise 0.18s ease;
}

.df-feedback-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 8px;
}

.df-feedback-dialog-head h2 {
  margin: 4px 0 0 !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  color: #0a2342 !important;
  line-height: 1.25 !important;
}

.df-feedback-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #f1f5f9;
  color: #334155;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.df-feedback-close:hover {
  background: #e2e8f0;
}

.df-feedback-dialog-body {
  padding: 4px 20px 8px;
}

.df-feedback-message {
  margin: 0 0 12px !important;
  color: #334155 !important;
  font-size: 0.95rem !important;
  line-height: 1.5 !important;
  white-space: pre-wrap;
}

.df-feedback-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 650;
  color: #475569;
}

.df-feedback-input {
  width: 100%;
  margin-bottom: 4px;
}

.df-feedback-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 18px;
}

.df-feedback-dialog-actions .btn {
  min-height: 40px !important;
  padding: 0 14px !important;
  border-radius: 10px !important;
}

.df-feedback-dialog-actions .btn-danger,
.df-feedback-dialog-actions .btn.btn-danger {
  background: #bf0a30 !important;
  border-color: #bf0a30 !important;
  color: #fff !important;
}

.df-feedback-toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 12010;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.df-feedback-toast {
  padding: 12px 14px;
  border-radius: 12px;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 650;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.df-feedback-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.df-feedback-toast-info { background: #0a2342; }
.df-feedback-toast-success { background: #15803d; }
.df-feedback-toast-warning { background: #c2410c; }
.df-feedback-toast-error { background: #bf0a30; }

.df-feedback-loading {
  position: fixed;
  inset: 0;
  z-index: 12020;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(244, 246, 249, 0.55);
  backdrop-filter: blur(2px);
}

.df-feedback-loading[hidden] {
  display: none !important;
}

.df-feedback-loading-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
}

.df-feedback-loading-card p {
  margin: 0 !important;
  font-size: 0.92rem !important;
  font-weight: 650 !important;
  color: #0a2342 !important;
}

.df-feedback-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid #dbe3ee;
  border-top-color: #0a2342;
  animation: dfFbSpin 0.7s linear infinite;
}

html.df-feedback-busy,
html.df-feedback-busy body {
  cursor: progress;
}

/* Unify legacy modal chrome with feedback system */
html.df-ux-v2 .df-modal-backdrop,
html.df-ux-v2 .modal-backdrop {
  background: rgba(10, 35, 66, 0.48) !important;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
}

html.df-ux-v2 .df-modal-card,
html.df-ux-v2 .modal-content {
  border-radius: 16px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22) !important;
  max-height: min(88vh, 900px);
  overflow: auto;
}

html.df-ux-v2 .df-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 8px !important;
  border-bottom: 0 !important;
}

html.df-ux-v2 .df-modal-close {
  width: 36px !important;
  height: 36px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #f1f5f9 !important;
  color: #334155 !important;
  font-size: 1.25rem !important;
  line-height: 1 !important;
}

html.df-ux-v2 .df-modal-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0 0;
}

@keyframes dfFbFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes dfFbSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .df-feedback-backdrop {
    padding: 12px;
    align-items: flex-end;
  }

  .df-feedback-dialog {
    width: 100%;
    border-radius: 16px 16px 12px 12px;
  }

  .df-feedback-toasts {
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
  }
}
