/* CRM V1.2 Summernote Insert Link / Image / Video / Help dialogs */

body.modal-open .modal.wepro-v12-note-modal,
body.modal-open .modal.link-dialog,
body.modal-open .modal.note-modal,
#main-wrapper.wepro-modern-nav .modal.wepro-v12-note-modal,
#main-wrapper.wepro-modern-nav .modal.link-dialog,
#main-wrapper.wepro-modern-nav .modal.note-modal {
  z-index: 5200 !important;
}

body.modal-open .modal-backdrop.wepro-v12-note-backdrop {
  z-index: 5150 !important;
}

.modal.wepro-v12-note-modal,
.modal.link-dialog,
.note-modal.wepro-v12-note-modal {
  overflow-y: auto;
}

.modal.wepro-v12-note-modal .modal-dialog,
.modal.link-dialog .modal-dialog,
.note-modal.wepro-v12-note-modal .modal-dialog {
  display: block;
  height: auto !important;
  margin: 12vh auto 24px;
  max-width: 520px;
  min-height: 0 !important;
  pointer-events: none;
  width: min(92vw, 520px);
}

.modal.wepro-v12-note-modal.wepro-v12-note-help .modal-dialog,
.note-modal.wepro-v12-note-modal.note-help-dialog .modal-dialog,
.note-modal.wepro-v12-note-modal.help-dialog .modal-dialog {
  max-width: min(92vw, 640px);
  width: min(92vw, 640px);
}

.modal.wepro-v12-note-modal .modal-content,
.modal.link-dialog .modal-content,
.note-modal.wepro-v12-note-modal .modal-content {
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  height: auto !important;
  max-height: calc(100vh - 48px);
  min-height: 0 !important;
  overflow: hidden;
  pointer-events: auto;
}

.modal.wepro-v12-note-modal .modal-header,
.modal.link-dialog .modal-header,
.note-modal.wepro-v12-note-modal .modal-header {
  align-items: flex-start;
  background: #f8fafc;
  border-bottom: 1px solid #e3e9f2;
  display: flex;
  flex: 0 0 auto;
  padding: 16px 20px;
}

.modal.wepro-v12-note-modal .modal-title,
.modal.link-dialog .modal-title,
.note-modal.wepro-v12-note-modal .modal-title {
  color: #111827;
  font-size: 20px;
  font-weight: 750;
  margin: 0;
}

.modal.wepro-v12-note-modal .wepro-v12-note-subtitle,
.modal.link-dialog .wepro-v12-note-subtitle,
.note-modal.wepro-v12-note-modal .wepro-v12-note-subtitle {
  color: #667085;
  font-size: 12px;
  margin: 3px 0 0;
}

.modal.wepro-v12-note-modal .close,
.modal.link-dialog .close,
.note-modal.wepro-v12-note-modal .close {
  color: #64748b;
  margin-left: auto;
  text-shadow: none;
}

.modal.wepro-v12-note-modal .close:focus,
.modal.wepro-v12-note-modal .close:hover,
.modal.wepro-v12-note-modal .close:focus-visible,
.modal.wepro-v12-note-modal .close:active,
.modal.link-dialog .close:focus,
.modal.link-dialog .close:hover,
.modal.link-dialog .close:focus-visible,
.modal.link-dialog .close:active {
  box-shadow: none;
  color: #111827;
  outline: none;
}

.modal.wepro-v12-note-modal .modal-body,
.modal.link-dialog .modal-body,
.note-modal.wepro-v12-note-modal .modal-body {
  background: #f4f7fb;
  flex: 0 0 auto !important;
  height: auto !important;
  max-height: calc(100vh - 200px);
  min-height: 0 !important;
  overflow-y: auto;
  padding: 20px;
}

.modal.wepro-v12-note-modal .wepro-v12-note-section,
.modal.link-dialog .wepro-v12-note-section,
.note-modal.wepro-v12-note-modal .wepro-v12-note-section {
  background: #ffffff;
  border: 1px solid #e8edf3;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  padding: 18px 18px 8px;
}

.modal.wepro-v12-note-modal .wepro-v12-note-section h5,
.modal.link-dialog .wepro-v12-note-section h5,
.note-modal.wepro-v12-note-modal .wepro-v12-note-section h5 {
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.modal.wepro-v12-note-modal .form-group,
.modal.wepro-v12-note-modal .note-form-group,
.modal.wepro-v12-note-modal .note-group-control-style,
.modal.link-dialog .form-group,
.modal.link-dialog .note-form-group {
  margin-bottom: 14px;
}

.modal.wepro-v12-note-modal label,
.modal.wepro-v12-note-modal .note-form-label,
.modal.wepro-v12-note-modal .checkbox,
.modal.wepro-v12-note-modal .form-check,
.modal.wepro-v12-note-modal .custom-control-description,
.modal.link-dialog label,
.modal.link-dialog .note-form-label,
.modal.link-dialog .custom-control-description {
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.modal.wepro-v12-note-modal .note-form-label small,
.modal.link-dialog .note-form-label small,
.modal.wepro-v12-note-modal .text-muted {
  color: #667085 !important;
  font-weight: 600;
}

.modal.wepro-v12-note-modal .form-control,
.modal.wepro-v12-note-modal .note-input,
.modal.wepro-v12-note-modal .note-image-url,
.modal.wepro-v12-note-modal .note-link-url,
.modal.wepro-v12-note-modal .note-link-text,
.modal.wepro-v12-note-modal .note-video-url,
.modal.link-dialog .form-control,
.modal.link-dialog .note-input {
  background: #ffffff;
  border: 1px solid #d9e2ef;
  border-radius: 10px;
  color: #111827;
  min-height: 40px;
  padding: 8px 12px;
  width: 100%;
}

.modal.wepro-v12-note-modal .form-control:focus,
.modal.wepro-v12-note-modal .form-control:focus-visible,
.modal.wepro-v12-note-modal .note-input:focus,
.modal.wepro-v12-note-modal .note-input:focus-visible,
.modal.link-dialog .form-control:focus,
.modal.link-dialog .form-control:focus-visible {
  border-color: #d9e2ef;
  box-shadow: none;
  outline: none;
}

/* Summernote 0.8 uses Bootstrap-alpha checkbox markup; restore a visible box. */
.modal.wepro-v12-note-modal .custom-control.custom-checkbox,
.modal.link-dialog .custom-control.custom-checkbox {
  align-items: center;
  display: flex;
  margin: 0 0 8px;
  min-height: 22px;
  padding-left: 0;
}

.modal.wepro-v12-note-modal .custom-control-input,
.modal.link-dialog .custom-control-input {
  height: 16px;
  left: auto;
  margin: 0 8px 0 0;
  opacity: 1;
  position: static;
  width: 16px;
  z-index: auto;
}

.modal.wepro-v12-note-modal .custom-control-indicator,
.modal.link-dialog .custom-control-indicator {
  display: none;
}

.modal.wepro-v12-note-modal .modal-footer,
.modal.link-dialog .modal-footer,
.note-modal.wepro-v12-note-modal .modal-footer {
  background: #f8fafc;
  border-top: 1px solid #e3e9f2;
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  justify-content: flex-end;
  padding: 12px 20px;
}

.modal.wepro-v12-note-modal .modal-footer .btn,
.modal.wepro-v12-note-modal .note-btn,
.modal.link-dialog .modal-footer .btn,
.modal.link-dialog .note-btn {
  align-items: center;
  border-radius: 12px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 750;
  justify-content: center;
  min-height: 42px;
  min-width: 120px;
  padding: 8px 16px;
}

.modal.wepro-v12-note-modal .modal-footer .btn-primary,
.modal.wepro-v12-note-modal .note-link-btn,
.modal.wepro-v12-note-modal .note-image-btn,
.modal.wepro-v12-note-modal .note-video-btn,
.modal.wepro-v12-note-modal .note-btn-primary,
.modal.link-dialog .modal-footer .btn-primary,
.modal.link-dialog .note-link-btn,
.modal.link-dialog .note-btn-primary {
  background: #43b02a !important;
  border: 1px solid #43b02a !important;
  color: #ffffff !important;
}

.modal.wepro-v12-note-modal .modal-footer .btn-primary:hover,
.modal.wepro-v12-note-modal .modal-footer .btn-primary:focus,
.modal.wepro-v12-note-modal .modal-footer .btn-primary:focus-visible,
.modal.wepro-v12-note-modal .note-link-btn:focus,
.modal.wepro-v12-note-modal .note-image-btn:focus,
.modal.wepro-v12-note-modal .note-video-btn:focus,
.modal.link-dialog .modal-footer .btn-primary:hover,
.modal.link-dialog .modal-footer .btn-primary:focus,
.modal.link-dialog .note-link-btn:focus {
  background: #2f861f !important;
  border-color: #2f861f !important;
  box-shadow: none !important;
  color: #ffffff !important;
  outline: none !important;
}

.modal.wepro-v12-note-modal .wepro-v12-note-cancel,
.modal.wepro-v12-note-modal .modal-footer .btn-secondary,
.modal.wepro-v12-note-modal .modal-footer .btn-default,
.modal.link-dialog .wepro-v12-note-cancel,
.modal.link-dialog .modal-footer .btn-secondary {
  background: #ffffff !important;
  border: 1px solid #111827 !important;
  color: #111827 !important;
}

.modal.wepro-v12-note-modal .wepro-v12-note-cancel:hover,
.modal.wepro-v12-note-modal .wepro-v12-note-cancel:focus,
.modal.wepro-v12-note-modal .wepro-v12-note-cancel:focus-visible,
.modal.wepro-v12-note-modal .wepro-v12-note-cancel:active,
.modal.link-dialog .wepro-v12-note-cancel:hover,
.modal.link-dialog .wepro-v12-note-cancel:focus,
.modal.link-dialog .wepro-v12-note-cancel:focus-visible {
  background: #ffffff !important;
  border-color: #111827 !important;
  box-shadow: none !important;
  color: #111827 !important;
  outline: none !important;
}

.modal.wepro-v12-note-modal .note-shortcut,
.modal.wepro-v12-note-modal .help-list,
.modal.wepro-v12-note-modal .note-help-list {
  color: #334155;
  font-size: 13px;
  width: 100%;
}

@media (max-width: 767px) {
  .modal.wepro-v12-note-modal .modal-dialog,
  .modal.link-dialog .modal-dialog,
  .note-modal.wepro-v12-note-modal .modal-dialog {
    margin: 16px auto;
    max-width: 96vw;
    width: 96vw;
  }
}
