/**
 * Wizard UI components (.wz-*).
 * Scoped classes — safe alongside Bootstrap 3; no global .btn / .form-control overrides.
 */

/* Button */
.wz-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--wz-space-sm);
  min-height: var(--wz-button-height);
  padding: 0 var(--wz-space-lg);
  border: 1px solid transparent;
  border-radius: var(--wz-radius-sm);
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-body);
  font-weight: var(--wz-font-weight-semibold);
  line-height: var(--wz-line-height-tight);
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--wz-transition-base),
    border-color var(--wz-transition-base),
    color var(--wz-transition-base),
    opacity var(--wz-transition-base);
}

.wz-button--primary {
  background-color: var(--wz-color-primary);
  border-color: var(--wz-color-primary);
  color: var(--wz-color-white);
}

.wz-button--primary:hover,
.wz-button--primary:focus {
  background-color: var(--wz-color-primary-light);
  border-color: var(--wz-color-primary-light);
  color: var(--wz-color-white);
  text-decoration: none;
}

.wz-button--primary:disabled,
.wz-button--primary.wz-button--disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.wz-button--secondary {
  background-color: var(--wz-color-white);
  border-color: var(--wz-color-border);
  color: var(--wz-color-primary);
}

.wz-button--secondary:hover,
.wz-button--secondary:focus {
  border-color: var(--wz-color-primary);
  color: var(--wz-color-primary);
  text-decoration: none;
}

.wz-button--block {
  display: flex;
  width: 100%;
}

/* Input */
.wz-field {
  display: flex;
  flex-direction: column;
  gap: var(--wz-space-xs);
  min-width: 0;
}

.wz-label {
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-label);
  font-weight: var(--wz-font-weight-semibold);
  color: var(--wz-color-primary);
  line-height: var(--wz-line-height-tight);
}

.wz-input {
  box-sizing: border-box;
  width: 100%;
  min-height: var(--wz-input-height);
  padding: 0 var(--wz-space-md);
  border: 1px solid var(--wz-color-border);
  border-radius: var(--wz-radius-sm);
  background-color: var(--wz-color-white);
  color: var(--wz-color-text-body);
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-body);
  line-height: var(--wz-line-height-body);
  transition: border-color var(--wz-transition-base), box-shadow var(--wz-transition-base);
}

.wz-input::placeholder {
  color: var(--wz-color-text-secondary);
}

.wz-input:hover {
  border-color: var(--wz-color-border-muted);
}

.wz-input:focus {
  outline: none;
  border-color: var(--wz-color-primary);
  box-shadow: var(--wz-focus-ring);
}

.wz-input--error,
.wz-input.wz-input--error {
  border-color: var(--wz-color-error);
}

.wz-input--error:focus {
  box-shadow: 0 0 0 3px rgba(255, 117, 118, 0.25);
}

.wz-select {
  appearance: none;
  padding-right: calc(var(--wz-space-md) + 24px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23667085' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--wz-space-md) center;
  cursor: pointer;
}

.wz-select:invalid {
  color: var(--wz-color-text-secondary);
}

.wz-select option {
  color: var(--wz-color-text-body);
}

.wz-input--date {
  color-scheme: light;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.wz-input--date::-webkit-date-and-time-value {
  min-width: 0;
  text-align: left;
}

.wz-field__error {
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-small);
  color: var(--wz-color-error);
  line-height: var(--wz-line-height-tight);
}

/* Checkbox */
.wz-checkbox {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--wz-space-sm);
  cursor: pointer;
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-label);
  color: var(--wz-color-text-body);
  user-select: none;
}

.wz-checkbox__control {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.wz-checkbox__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
  appearance: none;
  -webkit-appearance: none;
}

.wz-checkbox__input[type="checkbox"] {
  display: block;
}

.wz-checkbox__box {
  display: block;
  width: 18px;
  height: 18px;
  border: 1px solid var(--wz-color-border);
  border-radius: 4px;
  background-color: var(--wz-color-white);
  pointer-events: none;
  transition: background-color var(--wz-transition-fast), border-color var(--wz-transition-fast);
}

.wz-checkbox__text {
  line-height: var(--wz-line-height-body);
}

.wz-checkbox__input:checked + .wz-checkbox__box {
  background-color: var(--wz-color-link);
  border-color: var(--wz-color-link);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='M1 5l3 3 7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 8px;
}

.wz-checkbox__input:indeterminate + .wz-checkbox__box {
  background-color: var(--wz-color-link);
  border-color: var(--wz-color-link);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 2'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' d='M1 1h10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 2px;
}

.wz-checkbox__input:focus-visible + .wz-checkbox__box {
  box-shadow: var(--wz-focus-ring);
}

/* Radio */
.wz-radio {
  display: inline-flex;
  align-items: center;
  gap: var(--wz-space-sm);
  cursor: pointer;
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-label);
  color: var(--wz-color-text-body);
  user-select: none;
}

.wz-radio__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wz-radio__box {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 1px solid var(--wz-color-border);
  border-radius: var(--wz-radius-full);
  background-color: var(--wz-color-white);
  transition: border-color var(--wz-transition-fast), box-shadow var(--wz-transition-fast);
}

.wz-radio__input:checked + .wz-radio__box {
  border-color: var(--wz-color-link);
  border-width: 5px;
}

.wz-radio__input:focus-visible + .wz-radio__box {
  box-shadow: var(--wz-focus-ring);
}

/* Alert */
.wz-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--wz-space-sm);
  padding: var(--wz-space-md);
  border-radius: var(--wz-radius-sm);
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-label);
  line-height: var(--wz-line-height-body);
}

.wz-alert--error {
  background-color: rgba(255, 117, 118, 0.12);
  color: var(--wz-color-error);
}

.wz-alert--warning {
  background-color: rgba(255, 187, 79, 0.15);
  color: var(--wz-color-text-strong);
}

.wz-alert--success {
  background-color: rgba(84, 161, 32, 0.12);
  color: var(--wz-color-success);
}

.wz-alert--info {
  background-color: var(--wz-color-bg);
  color: var(--wz-color-text-body);
  border: 1px solid var(--wz-color-border-light);
}

.wz-alert__title {
  font-weight: var(--wz-font-weight-bold);
}

/* Toast (fixed status notifications) */
.wz-toast {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: var(--wz-space-xl);
  top: auto;
  z-index: 1050;
  max-width: min(480px, calc(100vw - 2 * var(--wz-space-lg)));
  margin: 0;
  padding: var(--wz-space-md) var(--wz-space-xl);
  border-radius: var(--wz-radius-md);
  border: 1px solid var(--wz-color-border-light);
  background-color: var(--wz-color-white);
  box-shadow: var(--wz-shadow-md);
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-body);
  font-weight: var(--wz-font-weight-medium);
  line-height: var(--wz-line-height-body);
  color: var(--wz-color-text-body);
  box-sizing: border-box;
  transform: translateX(-50%);
  animation: wz-toast-in 0.25s ease;
}

.wz-toast__text {
  margin: 0;
}

.wz-toast--info {
  border-color: var(--wz-color-border);
  background-color: var(--wz-color-white);
  color: var(--wz-color-text-body);
}

.wz-toast--info .wz-toast__text {
  display: flex;
  align-items: center;
  gap: var(--wz-space-sm);
}

.wz-toast--info .wz-toast__text img.wait {
  display: none;
}

.wz-toast--info .wz-toast__text::before {
  content: "";
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border: 2px solid var(--wz-color-border);
  border-top-color: var(--wz-color-link);
  border-radius: var(--wz-radius-full);
  animation: wz-toast-spin 0.7s linear infinite;
}

.wz-toast--success {
  border-color: var(--wz-color-success);
  background-color: #e6f4dc;
  color: #3a7a18;
}

.wz-toast--error {
  border-color: var(--wz-color-error);
  background-color: #ffe3e3;
  color: #c93a3b;
}

.wz-toast--warning {
  border-color: var(--wz-color-warning);
  background-color: #fff0d6;
  color: #8a5a00;
}

@keyframes wz-toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes wz-toast-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 767px) {
  .wz-toast {
    left: 50%;
    right: auto;
    bottom: var(--wz-space-lg);
    max-width: calc(100vw - 2 * var(--wz-space-md));
    padding: var(--wz-space-md) var(--wz-space-lg);
    transform: translateX(-50%);
  }
}

/* Tabs */
.wz-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wz-space-sm);
  margin: 0 0 var(--wz-space-lg);
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--wz-color-border-light);
}

.wz-tabs__item {
  margin: 0;
}

.wz-tabs__link {
  display: block;
  padding: var(--wz-space-sm) var(--wz-space-md);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-label);
  font-weight: var(--wz-font-weight-medium);
  color: var(--wz-color-text-muted);
  text-decoration: none;
  transition: color var(--wz-transition-base), border-color var(--wz-transition-base);
}

.wz-tabs__link:hover,
.wz-tabs__link:focus {
  color: var(--wz-color-primary);
  text-decoration: none;
}

.wz-tabs__item--active .wz-tabs__link,
.wz-tabs__link--active {
  color: var(--wz-color-primary);
  border-bottom-color: var(--wz-color-primary);
  font-weight: var(--wz-font-weight-semibold);
}

/* Card */
.wz-card {
  background-color: var(--wz-color-white);
  border: 1px solid var(--wz-color-border-light);
  border-radius: var(--wz-radius-md);
  padding: var(--wz-space-sm);
  box-shadow: var(--wz-shadow-card);
}

.wz-card + .wz-card {
  margin-top: var(--wz-space-md);
}

.wz-card__title {
  margin: 0 0 var(--wz-space-sm);
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-h3);
  font-weight: var(--wz-font-weight-bold);
  color: var(--wz-color-primary);
  line-height: var(--wz-line-height-tight);
}

.wz-card__body {
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-body);
  color: var(--wz-color-text-body);
  line-height: var(--wz-line-height-body);
}

/* Page title */
.wz-page-title {
  margin: 0 0 var(--wz-space-lg);
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-h1);
  font-weight: var(--wz-font-weight-bold);
  color: var(--wz-color-primary);
  line-height: var(--wz-line-height-tight);
}

/* Link */
.wz-link {
  color: var(--wz-color-link);
  text-decoration: underline;
  transition: color var(--wz-transition-fast);
}

.wz-link:hover,
.wz-link:focus {
  color: var(--wz-color-primary-light);
}

/* Empty state */
.wz-empty {
  padding: var(--wz-space-xl);
  text-align: center;
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-body);
  color: var(--wz-color-text-muted);
}

/* Dropzone (Dropzone.js hook: .js-dropzone) */
.wz-dropzone {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wz-space-md);
  align-items: flex-start;
  box-sizing: border-box;
  min-height: 120px;
  padding: var(--wz-space-lg);
  border: 1px dashed var(--wz-color-border);
  border-radius: var(--wz-radius-md);
  background-color: var(--wz-color-bg-subtle);
  transition: border-color var(--wz-transition-base), background-color var(--wz-transition-base);
}

/* Dropzone.js: клик по зоне — только padding и .dz-message (см. dropzone.js) */
.wz-dropzone.dz-clickable {
  cursor: pointer;
}

.wz-dropzone.dz-clickable * {
  cursor: default;
}

.wz-dropzone.dz-clickable .dz-message,
.wz-dropzone.dz-clickable .dz-message * {
  cursor: pointer;
}

.wz-dropzone.dz-clickable .wz-dropzone__remove {
  cursor: pointer;
}

.wz-dropzone.dz-drag-hover {
  border-color: var(--wz-color-link);
  border-style: solid;
  background-color: var(--wz-color-primary-surface-hover);
}

.wz-dropzone__prompt {
  order: -1;
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--wz-space-xs);
  padding: var(--wz-space-sm) var(--wz-space-md);
  text-align: center;
}

.wz-dropzone__title {
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-label);
  font-weight: var(--wz-font-weight-semibold);
  line-height: var(--wz-line-height-tight);
  color: var(--wz-color-primary);
}

.wz-dropzone__formats {
  margin: 0;
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-small);
  line-height: var(--wz-line-height-body);
  color: var(--wz-color-text-muted);
}

.wz-dropzone__item {
  position: relative;
  flex: 0 0 auto;
  width: 112px;
}

.wz-dropzone > .dz-preview {
  display: block;
  margin: 0;
  min-height: 0;
  vertical-align: initial;
}

.wz-dropzone__item--row {
  flex: 0 1 auto;
  width: 100%;
  max-width: 420px;
  align-self: flex-start;
}

.wz-dropzone__row {
  display: flex;
  align-items: center;
  gap: var(--wz-space-sm);
  min-height: 0;
  padding: var(--wz-space-sm);
  border: 1px solid var(--wz-color-border-light);
  border-radius: var(--wz-radius-sm);
  background-color: var(--wz-color-white);
}

.wz-dropzone__meta {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

/* Legacy upload classes inside wz-dropzone — reset template.css max-height */
.wz-dropzone .work-message-photo-text,
.wz-dropzone .work-message-photo-size {
  max-height: none;
  font-family: var(--wz-font-family);
  font-weight: var(--wz-font-weight-normal);
  line-height: var(--wz-line-height-tight);
}

.wz-dropzone .work-message-photo-text {
  font-size: var(--wz-font-size-small);
  font-weight: var(--wz-font-weight-medium);
  color: var(--wz-color-text-body);
}

.wz-dropzone .work-message-photo-size {
  font-size: var(--wz-font-size-small);
  color: var(--wz-color-text-muted);
}

.wz-dropzone__item--row .wz-dropzone__thumb {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  max-width: 28px;
  max-height: 28px;
  margin: 0;
  object-fit: contain;
}

.wz-dropzone__item--row .wz-dropzone__name {
  display: block;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}

.wz-dropzone__item--row .wz-dropzone__size {
  display: block;
  margin: 0;
  line-height: var(--wz-line-height-tight);
  white-space: nowrap;
}

.wz-dropzone__item--row .wz-dropzone__remove {
  position: static;
  flex-shrink: 0;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
}

.wz-dropzone__remove-icon {
  display: block;
  width: 12px;
  height: 12px;
}

.wz-dropzone__item--row .wz-dropzone__progress {
  margin-top: var(--wz-space-xs);
}

.wz-dropzone__item figure {
  margin: 0;
  padding: var(--wz-space-sm);
  border: 1px solid var(--wz-color-border-light);
  border-radius: var(--wz-radius-sm);
  background-color: var(--wz-color-white);
  text-align: center;
}

.wz-dropzone__remove {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: var(--wz-radius-full);
  background-color: var(--wz-color-error);
  color: var(--wz-color-white);
  font-size: 11px;
  font-weight: var(--wz-font-weight-bold);
  line-height: 1;
  text-decoration: none;
}

.wz-dropzone__remove:hover,
.wz-dropzone__remove:focus {
  background-color: color-mix(in srgb, var(--wz-color-black) 12%, var(--wz-color-error));
  color: var(--wz-color-white);
  text-decoration: none;
}

.wz-dropzone__thumb {
  display: block;
  max-width: 40px;
  max-height: 40px;
  margin: 0 auto var(--wz-space-xs);
}

.wz-dropzone__name {
  display: block;
  margin: 0;
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-small);
  font-weight: var(--wz-font-weight-medium);
  line-height: var(--wz-line-height-tight);
  color: var(--wz-color-text-body);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wz-dropzone__size {
  display: block;
  margin: var(--wz-space-xs) 0 0;
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-small);
  line-height: var(--wz-line-height-tight);
  color: var(--wz-color-text-muted);
}

.wz-dropzone__progress {
  height: 4px;
  margin-top: var(--wz-space-xs);
  border-radius: var(--wz-radius-full);
  background-color: var(--wz-color-border-light);
  overflow: hidden;
}

.wz-dropzone__progress [data-dz-uploadprogress] {
  display: block;
  height: 100%;
  background-color: var(--wz-color-link);
}

.wz-dropzone__error {
  margin-top: var(--wz-space-xs);
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-small);
  line-height: var(--wz-line-height-tight);
  color: var(--wz-color-error);
}

/* Data table */
.wz-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.wz-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  border-spacing: 0;
  background-color: var(--wz-color-primary-surface-hover);
  font-family: var(--wz-font-family);
  font-size: 13px;
  line-height: var(--wz-line-height-body);
  color: var(--wz-color-text-body);
}

.wz-table thead {
  background-color: var(--wz-color-text-nav);
}

.wz-table__th {
  padding: var(--wz-space-sm) var(--wz-space-md);
  border: 1px solid color-mix(in srgb, var(--wz-color-white) 24%, var(--wz-color-text-nav));
  color: var(--wz-color-white);
  font-size: 13px;
  font-weight: var(--wz-font-weight-semibold);
  line-height: var(--wz-line-height-tight);
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.wz-table__th--narrow {
  width: 120px;
  min-width: 120px;
}

.wz-table__td {
  padding: var(--wz-space-sm) var(--wz-space-md);
  border: 1px solid color-mix(in srgb, var(--wz-color-primary) 16%, var(--wz-color-border));
  vertical-align: middle;
}

.wz-table__td--center {
  text-align: center;
}

.wz-table tbody tr:hover .wz-table__td {
  background-color: color-mix(in srgb, var(--wz-color-white) 55%, var(--wz-color-primary-surface-hover));
}

.wz-finances-amount {
  font-weight: var(--wz-font-weight-semibold);
}

.wz-finances-amount--plus {
  color: var(--wz-color-success);
}

.wz-finances-amount--minus {
  color: var(--wz-color-error);
}

.wz-table tfoot {
  background-color: var(--wz-color-text-nav);
}

.wz-table__tf {
  padding: var(--wz-space-sm) var(--wz-space-md);
  border: 1px solid color-mix(in srgb, var(--wz-color-white) 24%, var(--wz-color-text-nav));
  color: var(--wz-color-white);
  vertical-align: middle;
}

.wz-table__tf--label {
  text-align: right;
}

.wz-table__tf--center {
  text-align: center;
}

.wz-table tbody tr.tr_bold .wz-table__td {
  background-color: color-mix(in srgb, var(--wz-color-link) 14%, var(--wz-color-white));
}

.wz-table tbody tr.tr_bold:hover .wz-table__td {
  background-color: color-mix(in srgb, var(--wz-color-white) 55%, var(--wz-color-primary-surface-hover));
}

.wz-finances-order-link {
  color: var(--wz-color-link);
  font-weight: var(--wz-font-weight-semibold);
  text-decoration: none;
}

.wz-finances-order-link:hover,
.wz-finances-order-link:focus {
  color: var(--wz-color-primary-light);
  text-decoration: underline;
}

.wz-finances-tag {
  color: var(--wz-color-text-muted);
}

.wz-finances-note {
  display: inline-block;
  margin-top: 2px;
  color: var(--wz-color-text-muted);
  font-size: var(--wz-font-size-small);
  line-height: var(--wz-line-height-tight);
}

.wz-finances-note--alert {
  color: var(--wz-color-error);
  font-weight: var(--wz-font-weight-semibold);
}

/* Modal (Bootstrap 3 structure + .wz-modal) */
body.wz-shell .modal-backdrop.in {
  background-color: rgba(0, 36, 110, 0.45);
  opacity: 1;
}

.modal.wz-modal .modal-dialog {
  margin: var(--wz-space-xl) auto;
}

.modal.wz-modal .modal-content {
  border: 1px solid var(--wz-color-border-light);
  border-radius: var(--wz-radius-md);
  box-shadow: var(--wz-shadow-md);
  background-color: var(--wz-color-white);
  overflow: hidden;
}

.modal.wz-modal .modal-header {
  display: flex;
  align-items: flex-start;
  gap: var(--wz-space-md);
  padding: var(--wz-space-lg) var(--wz-space-lg) var(--wz-space-sm);
  border-bottom: none;
}

.modal.wz-modal .modal-header::before,
.modal.wz-modal .modal-header::after {
  display: none;
  content: none;
}

.modal.wz-modal .modal-title {
  flex: 1;
  order: 1;
  margin: 0;
  padding-right: 0;
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-h3);
  font-weight: var(--wz-font-weight-bold);
  line-height: var(--wz-line-height-tight);
  color: var(--wz-color-primary);
  text-align: left;
}

.modal.wz-modal .close {
  position: relative;
  z-index: 1;
  order: 2;
  flex-shrink: 0;
  float: none;
  margin: 0 0 0 auto;
  padding: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--wz-radius-sm);
  background: transparent;
  color: var(--wz-color-text-muted);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  opacity: 1;
  transition: background-color var(--wz-transition-base), color var(--wz-transition-base);
}

.modal.wz-modal .close:hover,
.modal.wz-modal .close:focus {
  background-color: var(--wz-color-bg);
  color: var(--wz-color-primary);
  opacity: 1;
}

.modal.wz-modal .modal-body {
  padding: 0 var(--wz-space-lg) var(--wz-space-lg);
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-body);
  line-height: var(--wz-line-height-body);
  color: var(--wz-color-text-body);
}

.modal.wz-modal .modal-body > p:first-child {
  margin-top: 0;
}

.modal.wz-modal .modal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--wz-space-sm);
  padding: var(--wz-space-md) var(--wz-space-lg) var(--wz-space-lg);
  border-top: 1px solid var(--wz-color-border-light);
  text-align: right;
}

.modal.wz-modal .modal-footer::before,
.modal.wz-modal .modal-footer::after {
  display: none;
  content: none;
}

.modal.wz-modal .modal-footer .btn {
  min-height: var(--wz-button-height);
  padding: 0 var(--wz-space-lg);
  border-radius: var(--wz-radius-sm);
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-label);
  font-weight: var(--wz-font-weight-semibold);
  box-shadow: none;
}

.modal.wz-modal .modal-footer .btn-primary {
  background-color: var(--wz-color-primary);
  border-color: var(--wz-color-primary);
  color: var(--wz-color-white);
}

.modal.wz-modal .modal-footer .btn-primary:hover,
.modal.wz-modal .modal-footer .btn-primary:focus {
  background-color: var(--wz-color-primary-light);
  border-color: var(--wz-color-primary-light);
  color: var(--wz-color-white);
}

.modal.wz-modal .modal-footer .btn-default {
  background-color: var(--wz-color-white);
  border-color: var(--wz-color-border);
  color: var(--wz-color-primary);
}

.modal.wz-modal .modal-footer .btn-default:hover,
.modal.wz-modal .modal-footer .btn-default:focus {
  border-color: var(--wz-color-primary);
  color: var(--wz-color-primary);
  background-color: var(--wz-color-white);
}

.modal.wz-modal .modal-body label {
  display: block;
  margin-bottom: var(--wz-space-sm);
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-label);
  font-weight: var(--wz-font-weight-medium);
  color: var(--wz-color-text-body);
  cursor: pointer;
}

.modal.wz-modal .modal-body .form-control {
  border-color: var(--wz-color-border);
  border-radius: var(--wz-radius-sm);
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-body);
  box-shadow: none;
}

.modal.wz-modal .modal-body .form-control:focus {
  border-color: var(--wz-color-primary);
  box-shadow: var(--wz-focus-ring);
}

/* Onboarding / info popup content inside modals */
.modal.wz-modal .black-title {
  display: block;
  color: var(--wz-color-primary);
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-h3);
  font-weight: var(--wz-font-weight-bold);
  line-height: var(--wz-line-height-tight);
}

.modal.wz-modal .popup-desc {
  margin: var(--wz-space-md) 0;
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-label);
  line-height: var(--wz-line-height-body);
  color: var(--wz-color-text-body);
}

.modal.wz-modal .popup-desc--updated {
  width: auto;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.modal.wz-modal .actual-button-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--wz-space-sm);
  margin-top: var(--wz-space-lg);
}

.modal.wz-modal .actual-button-container .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-height: var(--wz-button-height);
  min-width: 170px;
  padding: 0 var(--wz-space-lg);
  border-radius: var(--wz-radius-sm);
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-label);
  font-weight: var(--wz-font-weight-semibold);
  line-height: var(--wz-line-height-tight);
  text-align: center;
  text-decoration: none;
  box-shadow: none;
}

.modal.wz-modal .actual-button-container .btn.mr-25 {
  margin-right: 0;
}

.modal.wz-modal .actual-button-container .btn-primary {
  background-color: var(--wz-color-primary);
  border-color: var(--wz-color-primary);
  color: var(--wz-color-white);
}

.modal.wz-modal .actual-button-container .btn-primary:hover,
.modal.wz-modal .actual-button-container .btn-primary:focus {
  background-color: var(--wz-color-primary-light);
  border-color: var(--wz-color-primary-light);
  color: var(--wz-color-white);
  text-decoration: none;
}

.modal.wz-modal .actual-button-container .btn.btn-pink,
.modal.wz-modal .actual-button-container .btn-primary.btn-pink {
  background-color: var(--wz-color-error);
  border-color: var(--wz-color-error);
  color: var(--wz-color-white);
}

.modal.wz-modal .actual-button-container .btn.btn-pink:hover,
.modal.wz-modal .actual-button-container .btn.btn-pink:focus,
.modal.wz-modal .actual-button-container .btn-primary.btn-pink:hover,
.modal.wz-modal .actual-button-container .btn-primary.btn-pink:focus {
  background-color: color-mix(in srgb, var(--wz-color-black) 10%, var(--wz-color-error));
  border-color: color-mix(in srgb, var(--wz-color-black) 10%, var(--wz-color-error));
  color: var(--wz-color-white);
  text-decoration: none;
}

.modal.wz-modal--decorated .modal-content {
  background-size: cover;
  background-repeat: no-repeat;
  background-position: bottom center;
}

.modal.wz-modal .modal-mirror-info {
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-body);
  color: var(--wz-color-text-body);
}

.modal.wz-modal .modal-mirror-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--wz-button-height);
  padding: 0 var(--wz-space-lg);
  border-radius: var(--wz-radius-sm);
  background-color: var(--wz-color-primary);
  color: var(--wz-color-white);
  font-family: var(--wz-font-family);
  font-weight: var(--wz-font-weight-semibold);
  text-decoration: none;
}

.modal.wz-modal .modal-mirror-button:hover,
.modal.wz-modal .modal-mirror-button:focus {
  background-color: var(--wz-color-primary-light);
  color: var(--wz-color-white);
  text-decoration: none;
}

@media (max-width: 767px) {
  .modal.wz-modal .modal-dialog {
    margin: var(--wz-space-md);
    width: auto;
  }

  .modal.wz-modal .modal-header,
  .modal.wz-modal .modal-body,
  .modal.wz-modal .modal-footer {
    padding-left: var(--wz-space-md);
    padding-right: var(--wz-space-md);
  }

  .modal.wz-modal .modal-footer {
    flex-direction: column-reverse;
  }

  .modal.wz-modal .modal-footer .btn {
    width: 100%;
  }
}

/* Popover (Bootstrap 3 + .wz-popover) */
.popover.wz-popover {
  border: 1px solid var(--wz-color-border-light);
  border-radius: var(--wz-radius-sm);
  box-shadow: var(--wz-shadow-md);
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-small);
  line-height: var(--wz-line-height-body);
  color: var(--wz-color-text-body);
  max-width: 280px;
  padding: 0;
}

.popover.wz-popover .arrow {
  border-width: 8px;
}

.popover.wz-popover.top > .arrow {
  border-top-color: var(--wz-color-border-light);
  bottom: -8px;
}

.popover.wz-popover.top > .arrow::after {
  border-top-color: var(--wz-color-white);
}

.popover.wz-popover.bottom > .arrow {
  border-bottom-color: var(--wz-color-border-light);
  top: -8px;
}

.popover.wz-popover.bottom > .arrow::after {
  border-bottom-color: var(--wz-color-white);
}

.popover.wz-popover .popover-title {
  display: none;
}

.popover.wz-popover .popover-content {
  padding: var(--wz-space-sm) var(--wz-space-md);
  font-size: var(--wz-font-size-small);
  line-height: var(--wz-line-height-body);
  color: var(--wz-color-text-body);
}

.wz-popover-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--wz-radius-full);
  background-color: var(--wz-color-bg);
  color: var(--wz-color-primary);
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-small);
  font-weight: var(--wz-font-weight-bold);
  font-style: normal;
  line-height: 1;
  cursor: help;
  transition: background-color var(--wz-transition-base), color var(--wz-transition-base);
}

.wz-popover-trigger:hover,
.wz-popover-trigger:focus {
  background-color: var(--wz-color-primary-surface-hover);
  color: var(--wz-color-primary-light);
}

/* Dialog (SweetAlert2) */
body.wz-shell .swal2-container.swal2-backdrop-show {
  background: rgba(0, 36, 110, 0.45);
}

body.wz-shell .swal2-popup {
  width: min(28rem, calc(100vw - 2 * var(--wz-space-lg)));
  padding: var(--wz-space-lg);
  border: 1px solid var(--wz-color-border-light);
  border-radius: var(--wz-radius-md);
  box-shadow: var(--wz-shadow-md);
  font-family: var(--wz-font-family);
  color: var(--wz-color-text-body);
}

body.wz-shell .swal2-title {
  padding: 0 0 var(--wz-space-sm);
  font-size: var(--wz-font-size-h3);
  font-weight: var(--wz-font-weight-bold);
  line-height: var(--wz-line-height-tight);
  color: var(--wz-color-primary);
}

body.wz-shell .swal2-html-container {
  margin: var(--wz-space-sm) 0 var(--wz-space-md);
  font-size: var(--wz-font-size-body);
  line-height: var(--wz-line-height-body);
  color: var(--wz-color-text-body);
  text-align: left;
}

body.wz-shell .swal2-actions {
  gap: var(--wz-space-sm);
  margin: var(--wz-space-md) 0 0;
  width: 100%;
}

body.wz-shell .swal2-styled.swal2-confirm {
  min-height: var(--wz-button-height);
  padding: 0 var(--wz-space-lg);
  border-radius: var(--wz-radius-sm);
  background-color: var(--wz-color-primary);
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-label);
  font-weight: var(--wz-font-weight-semibold);
  box-shadow: none;
}

body.wz-shell .swal2-styled.swal2-confirm:hover,
body.wz-shell .swal2-styled.swal2-confirm:focus {
  background-color: var(--wz-color-primary-light);
  background-image: none;
}

body.wz-shell .swal2-styled.swal2-cancel {
  min-height: var(--wz-button-height);
  padding: 0 var(--wz-space-lg);
  border-radius: var(--wz-radius-sm);
  background-color: var(--wz-color-white);
  border: 1px solid var(--wz-color-border);
  color: var(--wz-color-primary);
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-label);
  font-weight: var(--wz-font-weight-semibold);
  box-shadow: none;
}

body.wz-shell .swal2-styled.swal2-cancel:hover,
body.wz-shell .swal2-styled.swal2-cancel:focus {
  border-color: var(--wz-color-primary);
  background-color: var(--wz-color-white);
  background-image: none;
  color: var(--wz-color-primary);
}

body.wz-shell .swal2-icon {
  margin: var(--wz-space-md) auto;
  transform: scale(0.85);
}

body.wz-shell .swal2-icon.swal2-warning {
  border-color: var(--wz-color-warning);
  color: var(--wz-color-warning);
}

body.wz-shell .swal2-icon.swal2-success {
  border-color: var(--wz-color-success);
  color: var(--wz-color-success);
}

body.wz-shell .swal2-icon.swal2-error {
  border-color: var(--wz-color-error);
  color: var(--wz-color-error);
}

body.wz-shell .swal2-select,
body.wz-shell .swal2-textarea,
body.wz-shell .swal2-input {
  width: 100%;
  margin: var(--wz-space-sm) 0 0;
  border: 1px solid var(--wz-color-border);
  border-radius: var(--wz-radius-sm);
  font-family: var(--wz-font-family);
  font-size: var(--wz-font-size-body);
  color: var(--wz-color-text-body);
  box-shadow: none;
}

body.wz-shell .swal2-select:focus,
body.wz-shell .swal2-textarea:focus,
body.wz-shell .swal2-input:focus {
  border-color: var(--wz-color-primary);
  box-shadow: var(--wz-focus-ring);
  outline: none;
}

body.wz-shell .swal2-validation-message {
  margin-top: var(--wz-space-sm);
  padding: var(--wz-space-sm) var(--wz-space-md);
  border-radius: var(--wz-radius-sm);
  background-color: rgba(255, 117, 118, 0.12);
  color: var(--wz-color-error);
  font-size: var(--wz-font-size-label);
  font-weight: var(--wz-font-weight-medium);
}

body.wz-shell .swal2-validation-message::before {
  background-color: var(--wz-color-error);
}

@media (max-width: 767px) {
  body.wz-shell .swal2-actions {
    flex-direction: column-reverse;
  }

  body.wz-shell .swal2-styled.swal2-confirm,
  body.wz-shell .swal2-styled.swal2-cancel {
    width: 100%;
    margin: 0;
  }
}
