:root {
  --ui-modal-primary: #d81e26;
  --ui-modal-primary-dark: #c8161f;
  --ui-modal-surface: #fff;
  --ui-modal-border: #ececec;
  --ui-modal-text: #444;
  --ui-modal-muted: #666;
  --ui-modal-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
  --ui-modal-radius: 10px;
  --ui-modal-title-size: 17px;
  --ui-modal-body-size: 15px;
  --ui-modal-btn-size: 16px;
  --ui-modal-btn-height: 52px;
}

.h5-modal-open {
  overflow: hidden;
}

.layui-layer-fast,
.bootstrap-dialog .modal-dialog,
.h5-user-notice-modal,
.h5-logout-modal {
  border-radius: var(--ui-modal-radius) !important;
  box-shadow: var(--ui-modal-shadow) !important;
}

.layui-layer-fast {
  overflow: hidden;
  border: 0 !important;
  background: var(--ui-modal-surface);
}

.layui-layer-fast .layui-layer-title,
.bootstrap-dialog .modal-header,
.h5-user-notice-modal__header,
.h5-logout-modal__header {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 16px 24px;
  border: 0;
  background: linear-gradient(180deg, var(--ui-modal-primary) 0%, var(--ui-modal-primary-dark) 100%);
  color: #fff;
  font-size: var(--ui-modal-title-size);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.layui-layer-fast .layui-layer-title {
  position: relative;
}

.layui-layer-fast .layui-layer-title ~ .layui-layer-setwin {
  top: 0;
  height: 64px;
}

.layui-layer-fast .layui-layer-title ~ .layui-layer-setwin > a {
  height: 64px;
  line-height: 64px;
}

.layui-layer-fast .layui-layer-content,
.bootstrap-dialog .modal-body,
.h5-user-notice-modal__body,
.h5-logout-modal__body {
  padding: 22px 24px 18px;
  color: var(--ui-modal-text);
  font-size: var(--ui-modal-body-size);
  line-height: 1.75;
}

.layui-layer-fast .layui-layer-btn,
.bootstrap-dialog .modal-footer {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0 !important;
  border-top: 1px solid var(--ui-modal-border);
  background: var(--ui-modal-surface);
  overflow: hidden;
}

.layui-layer-fast .layui-layer-btn a,
.bootstrap-dialog .modal-footer .btn {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--ui-modal-btn-height);
  height: var(--ui-modal-btn-height);
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--ui-modal-surface);
  color: var(--ui-modal-muted) !important;
  font-size: var(--ui-modal-btn-size);
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
}

.layui-layer-fast .layui-layer-btn a:not(:first-child),
.bootstrap-dialog .modal-footer .btn + .btn {
  border-left: 1px solid var(--ui-modal-border);
}

.layui-layer-fast .layui-layer-btn .layui-layer-btn0,
.bootstrap-dialog .modal-footer .btn-primary,
.h5-logout-modal__btn--danger {
  background: var(--ui-modal-primary);
  color: #fff !important;
}

.layui-layer-fast .layui-layer-confirm {
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  background: transparent;
  color: transparent;
}

.layui-layer-fast .layui-layer-confirm:focus {
  border: 1px solid #444c69;
  border-radius: 2px;
}

.layui-layer-fast .layui-layer-confirm:focus-visible {
  outline: 0;
}

.layui-layer-fast-msg {
  min-width: 100px;
  border-radius: 999px;
  font-size: 14px;
}

.bootstrap-dialog .modal-dialog {
  width: calc(100vw - 32px);
  max-width: 640px;
  margin: 16px auto;
}

.bootstrap-dialog .modal-content {
  overflow: hidden;
  border: 0;
  border-radius: var(--ui-modal-radius);
  box-shadow: var(--ui-modal-shadow);
}

.bootstrap-dialog .modal-header .close {
  color: #fff;
  opacity: 1;
  text-shadow: none;
}

.bootstrap-dialog .modal-title {
  width: 100%;
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: inherit;
}

.bootstrap-dialog .modal-footer {
  display: flex;
}

.bootstrap-dialog .modal-footer .btn {
  border-radius: 0;
}

.h5-notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.34);
}

.h5-user-notice-modal,
.h5-logout-modal {
  width: calc(100vw - 32px);
  max-width: 478px;
  max-height: calc(100vh - 32px);
  overflow: hidden;
  border-radius: 8px !important;
  background: var(--ui-modal-surface);
}

.h5-logout-modal {
  max-width: 640px;
}

.h5-user-notice-modal__header,
.h5-logout-modal__header {
  min-height: 54px;
  padding: 0 24px;
  background: var(--ui-modal-primary);
  font-size: 18px;
}

.h5-user-notice-modal__body {
  padding: 24px 24px 2px;
}

.h5-user-notice-modal__text {
  margin: 0 0 18px;
  color: #5f6268;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.8;
}

.h5-user-notice-modal__button {
  display: flex;
  width: calc(100% - 48px);
  min-height: 48px;
  align-items: center;
  justify-content: center;
  margin: 16px 24px 24px;
  border: 0;
  border-radius: 6px;
  background: var(--ui-modal-primary) !important;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.h5-user-notice-modal__button:active,
.h5-user-notice-modal__button:focus,
.h5-logout-modal__btn:active,
.h5-logout-modal__btn:focus {
  outline: none;
}

.h5-contact-limit-modal {
  width: calc(100vw - 56px);
  max-width: 416px;
  border: 1px solid #b93449;
  border-radius: 10px !important;
  background: #fff4f5;
  box-shadow: none !important;
}

.h5-contact-limit-modal__header {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 44px 24px 20px;
  background: transparent;
  color: #bd1733;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.h5-contact-limit-modal__body {
  padding: 0 30px;
}

.h5-contact-limit-modal__text {
  margin: 0;
  color: #5f6268;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.75;
  text-align: center;
}

.h5-contact-limit-modal__button {
  display: flex;
  width: calc(100% - 60px);
  min-height: 46px;
  align-items: center;
  justify-content: center;
  margin: 28px 30px 34px;
  border: 0;
  border-radius: 5px;
  background: #d91e2b !important;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

.h5-contact-limit-modal__button:active,
.h5-contact-limit-modal__button:focus {
  outline: none;
}

.h5-logout-modal__body {
  padding: 24px 24px 16px;
}

.h5-logout-modal__lead {
  margin: 0 0 10px;
  color: #c12d36;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
}

.h5-logout-modal__text,
.h5-logout-modal__ask {
  margin: 0 0 12px;
  color: #5f6268;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.75;
}

.h5-logout-modal__ask {
  margin-top: 6px;
  margin-bottom: 0;
}

.h5-logout-modal__actions {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  border-top: 1px solid var(--ui-modal-border);
  overflow: hidden;
}

.h5-logout-modal__btn {
  flex: 1 1 0;
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: var(--ui-modal-surface);
  color: var(--ui-modal-muted);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.h5-logout-modal__btn--cancel {
  border-right: 1px solid var(--ui-modal-border);
}

.h5-logout-modal__btn--danger {
  background: var(--ui-modal-primary) !important;
  color: #fff !important;
}

.h5-photo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.h5-photo-preview img {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  border-radius: 10px;
  object-fit: contain;
}
