/*!
 * Backbone.Notifier - Bootstrap 5 Theme Override
 */

/* === Screen Overlay === */
.notifier-screen {
  background-color: #000;
  z-index: 90000022;
}

.notifier-screen.notifier-theme-clean {
  background-color: rgba(0, 0, 0, 0.5);
}

/* === Main Container === */
.notifier {
  z-index: 90000025;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: auto;
  height: 0;
  overflow: visible;
}

.notifier.notifier-theme-clean {
  font-size: 0.875rem;
  text-align: center;
  font-family: var(--bs-body-font-family, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
}

/* === Dialog Box === */
.notifier > div {
  cursor: default;
  display: inline-block;
  position: relative;
}

.notifier.notifier-theme-clean > div {
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.175);
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  padding: 1.5rem;
  max-width: 500px;
  background-image: none;
  filter: none;
  border-top-width: 1px;
}

/* === Type Variants (colored top border accent) === */
.notifier.notifier-theme-clean.notifier-warning > div {
  border-top: 3px solid #ffc107;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  background-image: none;
  filter: none;
}

.notifier.notifier-theme-clean.notifier-error > div {
  border-top: 3px solid #dc3545;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  background-image: none;
  filter: none;
}

.notifier.notifier-theme-clean.notifier-info > div {
  border-top: 3px solid #0dcaf0;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  background-image: none;
  filter: none;
}

.notifier.notifier-theme-clean.notifier-success > div {
  border-top: 3px solid #198754;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  background-image: none;
  filter: none;
}

/* === Close Button === */
.notifier-close {
  position: absolute;
  border: 0 none;
  top: 0.75rem;
  right: 0.75rem;
  width: 1.5rem;
  height: 1.5rem;
  cursor: pointer;
  border-radius: 0.25rem;
  padding: 0;
  background: transparent;
  text-align: center;
  font-size: 1.25rem;
  line-height: 1.5rem;
  font-family: inherit;
  color: #6c757d;
  opacity: 0.5;
  transition: opacity 0.15s ease-in-out;
}

.notifier-close:hover {
  opacity: 1;
  background: transparent !important;
  color: #000;
  text-shadow: none;
}

.notifier.notifier-theme-clean .notifier-close {
  top: 0.75rem;
  right: 0.75rem;
}

/* === Title === */
.notifier.notifier-theme-clean.notifier-dialog .notifier-title {
  font-weight: 600;
  font-size: 1.1rem;
  text-shadow: none;
  box-shadow: none;
  border-bottom: 1px solid #dee2e6;
  margin: -0.5rem -1.5rem 1rem;
  padding: 0 1.5rem 0.75rem;
  text-align: left;
  color: #212529;
}

/* === Message === */
.notifier.notifier-theme-clean .notifier-message {
  text-shadow: none;
  color: #212529;
  text-align: left;
  line-height: 1.5;
}

.notifier > div em {
  font-weight: 600;
  font-style: normal;
}

/* === Loader === */
.notifier.notifier-theme-clean .notifier-loader {
  width: 16px;
  height: 16px;
  margin-left: 10px;
  background: url('../images/notifier-loader-clean.gif') center center no-repeat;
}

.notifier-with-loader .notifier-message {
  display: inline;
}

.notifier-loader {
  display: inline-block;
}

/* === Buttons === */
.notifier.notifier-theme-clean .notifier-btns {
  margin: 1.25rem 0 0;
  text-align: right;
}

.notifier.notifier-theme-clean .notifier-btns button {
  display: inline-block;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  border: 1px solid #dee2e6;
  background-color: #fff;
  color: #212529;
  margin: 0 0.25rem;
  text-shadow: none;
  box-shadow: none;
}

.notifier.notifier-theme-clean .notifier-btns button:hover {
  background-color: #e9ecef;
  border-color: #dee2e6;
  box-shadow: none;
}

.notifier.notifier-theme-clean .notifier-btns button:active {
  background-color: #dee2e6;
  box-shadow: none;
}

/* Primary action button (Save, OK, Confirm) */
.notifier.notifier-theme-clean .notifier-btns button.default,
.notifier.notifier-theme-clean .notifier-btns button[data-role="ok"] {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
  font-weight: 500;
}

.notifier.notifier-theme-clean .notifier-btns button.default:hover,
.notifier.notifier-theme-clean .notifier-btns button[data-role="ok"]:hover {
  background-color: #0b5ed7;
  border-color: #0a58ca;
  color: #fff;
}

/* Link-style button */
.notifier.notifier-theme-clean .notifier-btns button.link {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--bs-link-color, #0d6efd);
  text-decoration: underline;
  padding: 0.375rem 0.5rem;
  text-shadow: none;
}

.notifier.notifier-theme-clean .notifier-btns button.link:hover {
  color: var(--bs-link-hover-color, #0a58ca);
  background: transparent !important;
}

/* === Dialog Layout === */
.notifier.notifier-theme-clean.notifier-dialog > div {
  padding-top: 1.25rem;
}

.notifier.notifier-theme-clean.notifier-dialog .notifier-message {
  text-align: left;
}

.notifier.notifier-theme-clean.notifier-dialog .notifier-btns {
  background: #f8f9fa;
  padding: 0.75rem 1rem;
  box-shadow: none;
  border-top: 1px solid #dee2e6;
  margin: 1.25rem -1.5rem -1.5rem;
  border-radius: 0 0 0.5rem 0.5rem;
}

.notifier.notifier-theme-clean.notifier-with-close-btn .notifier-title {
  padding-right: 2.5rem;
}

/* === Dark Mode === */

[data-bs-theme=dark] .notifier.notifier-theme-clean > div {
  background-color: var(--bs-body-bg);
  border-color: var(--bs-border-color);
}

[data-bs-theme=dark] .notifier.notifier-theme-clean .notifier-title {
  color: var(--bs-body-color);
  border-bottom-color: var(--bs-border-color);
}

[data-bs-theme=dark] .notifier.notifier-theme-clean .notifier-message {
  color: var(--bs-body-color);
}

[data-bs-theme=dark] .notifier-close {
  color: var(--bs-body-color);
}

[data-bs-theme=dark] .notifier-close:hover {
  color: var(--bs-body-color);
}

[data-bs-theme=dark] .notifier.notifier-theme-clean .notifier-btns button {
  background-color: var(--bs-tertiary-bg);
  border-color: var(--bs-border-color);
  color: var(--bs-body-color);
}

[data-bs-theme=dark] .notifier.notifier-theme-clean .notifier-btns button:hover {
  background-color: var(--bs-secondary-bg);
}

[data-bs-theme=dark] .notifier.notifier-theme-clean .notifier-btns button:active {
  background-color: var(--bs-secondary-bg);
}

[data-bs-theme=dark] .notifier.notifier-theme-clean.notifier-dialog .notifier-btns {
  background: var(--bs-tertiary-bg);
  border-top-color: var(--bs-border-color);
}
