/* Dialog/Modal Styles */
#dialog-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  pointer-events: none; /* container never captures events */
}

.dialog-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  backdrop-filter: blur(2px);
}

.dialog-modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none; /* do not capture clicks when hidden */
}

.dialog-modal.show {
  transform: scale(1);
  opacity: 1;
  pointer-events: all; /* only interactive when shown */
}

.dialog-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
}

.dialog-title {
  font-size: 20px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
  display: flex;
  align-items: center;
}

.dialog-close {
  background: transparent;
  border: none;
  font-size: 20px;
  color: #6c757d;
  cursor: pointer;
  padding: 4px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.dialog-close:hover {
  background: #f8f9fa;
  color: #2c3e50;
}

.dialog-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.dialog-body p {
  margin: 0;
  font-size: 16px;
  color: #2c3e50;
  line-height: 1.6;
}

.dialog-footer {
  padding: 16px 24px;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  background: #f8f9fa;
}

.dialog-footer .btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 80px;
}

.dialog-footer .btn-primary {
  background: #20c997;
  color: #fff;
}

.dialog-footer .btn-primary:hover {
  background: #1a9b77;
}

.dialog-footer .btn-secondary {
  background: #6c757d;
  color: #fff;
}

.dialog-footer .btn-secondary:hover {
  background: #5a6268;
}

.dialog-footer .btn-danger {
  background: #dc3545;
  color: #fff;
}

.dialog-footer .btn-danger:hover {
  background: #c82333;
}

@media (max-width: 768px) {
  .dialog-modal {
    width: 95%;
    max-height: 85vh;
  }

  .dialog-header {
    padding: 16px 20px;
  }

  .dialog-title {
    font-size: 18px;
  }

  .dialog-body {
    padding: 20px;
  }

  .dialog-footer {
    padding: 12px 20px;
    flex-direction: column;
  }

  .dialog-footer .btn {
    width: 100%;
  }
}
