/*
 * Styling for the native <dialog>-based Confirm/Alert modal (confirm_dialog.js)
 * plus the shared popup-form button classes that used to be injected inline by
 * confirm_dialog.js (.dz-popup-*, consumed by terminal/_popup, time_events and
 * project_events _new/_edit/_mark).
 *
 * NO jQuery-UI theme class (.ui-dialog, .ui-button, .ui-widget-overlay) is
 * referenced — jQuery-UI is removed in modernize-js-7d. The overlay comes from
 * dialog::backdrop. Loaded globally by all four JS-bearing layouts.
 */

/* --- Native <dialog> confirm/alert modal -------------------------------- */

dialog.dz-confirm-dialog {
  /* Kein z-index nötig: showModal() hebt <dialog> + ::backdrop in den Top-Layer,
     der unabhängig vom z-index über allem rendert. */
  padding: 0;
  width: 400px;
  max-width: 90vw;
  border: 4px solid #ddd;
  background: #fff;
  color: #333;
}

dialog.dz-confirm-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.dz-confirm-titlebar {
  background: #444;
  color: #fff;
  padding: 8px 20px;
  font-size: 16px;
}

.dz-confirm-content {
  padding: 1.5em;
  overflow: hidden;
}

.dz-confirm-icon {
  float: left;
  margin-right: 12px;
  width: 20px;
  font-size: 20px;
  line-height: 1.4;
}

.dz-confirm-icon--alert::before {
  content: "\26A0"; /* ⚠ */
  color: #c0392b;
}

.dz-confirm-icon--info::before {
  content: "\2139"; /* ℹ */
  color: #2980b9;
}

.dz-confirm-message {
  overflow: hidden;
  line-height: 1.5;
  color: #333;
}

.dz-confirm-buttonpane {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: #fff;
  border-top: 1px solid #ddd;
  padding: 0.8em;
}

.dz-confirm-button {
  background: #f5f5f5;
  border: 1px solid #ccc;
  color: #333;
  font-weight: normal;
  padding: 6px 16px;
  cursor: pointer;
  border-radius: 3px;
}

.dz-confirm-button:hover {
  background: #e8e8e8;
  border-color: #bbb;
}

.dz-confirm-button.dz-confirm-destructive {
  background: #c0392b;
  border-color: #a93226;
  color: #fff;
  font-weight: bold;
}

.dz-confirm-button.dz-confirm-destructive:hover {
  background: #e74c3c;
  border-color: #c0392b;
}

/* --- Shared popup-form buttons (.dz-popup-*) ---------------------------- */
/* Carried over verbatim from the inline CSS that confirm_dialog.js injected
   pre-7d. These are NOT part of the confirm dialog; they style the action
   buttons of the time-event / project-event / terminal popups. */

.dz-popup-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8em 0 0.3em;
  clear: both;
}

.dz-popup-buttons form.button_to {
  display: inline;
  margin: 0;
}

.dz-popup-buttons .dz-popup-submit {
  margin-left: auto !important;
}

.dz-popup-submit {
  background: #5cb85c !important;
  border: 2px solid #4cae4c !important;
  color: #fff !important;
  padding: 8px 24px !important;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  border-radius: 6px;
  line-height: 1.2;
  margin-left: auto;
}

.dz-popup-submit:hover {
  background: #449d44 !important;
  border-color: #398439 !important;
}

.dz-popup-delete {
  background: #c0392b !important;
  border: 2px solid #a93226 !important;
  color: #fff !important;
  padding: 8px 24px !important;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  border-radius: 6px;
  line-height: 1.2;
}

.dz-popup-delete:hover {
  background: #e74c3c !important;
  border-color: #c0392b !important;
}
