/* tiptap-editor */
/* comman editor content css */
.tiptapEditorWrapper ul {
  list-style: disc;
  padding-left: 1.5em;
  margin: 0.5em 0;
}

/* Ordered List Styles
 * Nested levels cycle through five marker styles for clear visual
 * hierarchy: 1 → a → i → A → I → 1 ... matching Word / Google Docs.
 * The cycle repeats at depth 6 because beyond five levels the hierarchy
 * is visually ambiguous regardless of which scheme we pick.
 */
.tiptapEditorWrapper ol {
  list-style-type: decimal;
  padding-left: 1.5em;
  margin: 0.5em 0;
}
.tiptapEditorWrapper ol ol {
  list-style-type: lower-alpha;
}
.tiptapEditorWrapper ol ol ol {
  list-style-type: lower-roman;
}
.tiptapEditorWrapper ol ol ol ol {
  list-style-type: upper-alpha;
}
.tiptapEditorWrapper ol ol ol ol ol {
  list-style-type: upper-roman;
}
.tiptapEditorWrapper ol ol ol ol ol ol {
  list-style-type: decimal;
}

/* List Item Styles */
.tiptapEditorWrapper li {
  margin: 0.25em 0;
  padding-left: 0.25em;
}

.tiptapEditorWrapper li p {
  margin: 0;
  display: inline;
}

/* Text Formatting Styles */
.tiptapEditorWrapper strong, 
.tiptapEditorWrapper b {
  font-weight: bold;
}

.tiptapEditorWrapper em, 
.tiptapEditorWrapper i {
  font-style: italic;
}

.tiptapEditorWrapper u {
  text-decoration: underline;
}

.tiptapEditorWrapper s,
.tiptapEditorWrapper strike {
  text-decoration: line-through;
}

/* Heading Styles */
.tiptapEditorWrapper h1 {
  font-size: 2em;
  font-weight: bold;
  margin: 0.67em 0;
}

.tiptapEditorWrapper h2 {
  font-size: 1.5em;
  font-weight: bold;
  margin: 0.75em 0;
}

.tiptapEditorWrapper h3 {
  font-size: 1.17em;
  font-weight: bold;
  margin: 0.83em 0;
}

.tiptapEditorWrapper h4 {
  font-size: 1em;
  font-weight: bold;
  margin: 1em 0;
}

.tiptapEditorWrapper h5 {
  font-size: 0.83em;
  font-weight: bold;
  margin: 1.17em 0;
}

.tiptapEditorWrapper h6 {
  font-size: 0.67em;
  font-weight: bold;
  margin: 1.33em 0;
}

/* Paragraph Styles */
.tiptapEditorWrapper p {
  margin: 0.5em 0;
}

/* Blockquote Styles */
.tiptapEditorWrapper blockquote {
  border-left: 3px solid var(--infoColorSD, #2D97C7);
  padding-left: 1em;
  margin: 1em 0;
  color: var(--textSecondary, #555555);
  font-style: italic;
}

/* Horizontal Rule */
.tiptapEditorWrapper hr {
  border: none;
  border-top: 1px solid var(--lightBorderSD, #E3E3E3);
  margin: 1em 0;
}

/* Link Styles */
.tiptapEditorWrapper a {
  color: var(--primaryColorSD, #2D97C7);
  text-decoration: underline;
  cursor: pointer;
}
.html-block-content a{
  text-decoration:none !important;
}

.tiptapEditorWrapper a:hover {
  color: var(--primaryColorSD700, #1B5B77);
}

/* Code Styles */
.tiptapEditorWrapper code {
  background-color: var(--bgSurface, #F5F5F5);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.9em;
}

.tiptapEditorWrapper pre {
  background-color: var(--bgSurface, #F5F5F5);
  padding: 1em;
  border-radius: 5px;
  overflow-x: auto;
}

.tiptapEditorWrapper pre code {
  background: none;
  padding: 0;
}

/* Highlight/Mark Styles */
.tiptapEditorWrapper mark {
  background-color: #ffff00;
  padding: 0.1em 0.2em;
}
/* comman editor content css end */


.tiptapEditorWrapper .tiptapEditorContent,
.tiptapEditorWrapper .tiptapTextarea {
  position: relative;
  max-height: 200px;
  width: 100%;
  overflow-y: auto;
  border-radius: 6px;
  border-width: 1px;
  border-color: var(--lightBorderSD);
  background-color: var(--bgWhiteSD);
  padding-left: 10px;
  padding-right: 10px;
  padding-top: 6px;
  padding-bottom: 6px;
  color: var(--textDark);
  outline: 2px solid transparent;
  outline-offset: 2px;
}


.tiptapEditorWrapper .tiptapEditorContent:focus,
.tiptapEditorWrapper .tiptapTextarea:focus {
  border-color: var(--primaryColorSD);
}

/* Code View */
.tiptapEditorWrapper .tiptapCodeViewWrapper {
  position: relative;
}
.tiptapEditorWrapper .tiptapCodeTextarea{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  white-space: pre;
  -moz-tab-size: 2;
    -o-tab-size: 2;
       tab-size: 2;
  line-height: 1.4;
}
.tiptapEditorWrapper .tiptapCodeViewFloatingMenu {
  position: absolute;
  right: 5px;
  top: 5px;
  z-index: 10;
}
.tiptapEditorWrapper .tiptapCodeViewNormalBtn {
  border-radius: 6px;
  border-width: 1px;
  border-color: var(--lightBorderSD);
  background-color: var(--bgWhiteSD);
  padding-left: 7px;
  padding-right: 7px;
  padding-top: 4px;
  padding-bottom: 4px;
  font-family: Matter;
  font-size: 12px;
  color: var(--textDark);
  --tw-shadow: var(--dropdownShadow);
  --tw-shadow-colored: var(--dropdownShadow);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.tiptapEditorWrapper .tiptapCodeViewNormalBtn:hover {
  background-color: var(--bgSurface);
}
.tiptapEditorWrapper .tiptapCodeViewNormalBtn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.tiptapEditorWrapper .tiptapCodeViewError {
  margin-top: 8px;
  font-size: 13px;
  color: var(--dangerSD);
}
.tiptapEditorWrapper.fullScreen {
  height: 100dvh !important;
  position: fixed;
  top: 0px;
  left: 0px;
  z-index: 999999;
  height: 100vh;
  width: 100vw;
  background-color: var(--bgWhiteSD);
  padding: 14px;
}
.field__has__error .tiptapEditorWrapper .tiptapEditorContent,
.field__has__error .tiptapEditorWrapper .tiptapTextarea {
  border-color: var(--dangerSD);
}
.field__has__error .tiptapEditorWrapper .tiptapEditorContent:focus,
.field__has__error .tiptapEditorWrapper .tiptapTextarea:focus {
  border-color: var(--dangerSD);
}
.tiptapEditorWrapper .tiptapEditorContent .is-editor-empty {
  position: relative;
}
.tiptapEditorWrapper .tiptapEditorContent .is-editor-empty:first-child::before{
  content: attr(data-placeholder);
  color: var(--textTertiary);
  opacity: 0.8;
  pointer-events: none;
  font-family: 'Matter';
  font-size:16px;
  position:absolute;
  top:2px;
  width:100%;
}

.tiptapEditorWrapper.staticToolbarActive {
  overflow: hidden;
  border-radius: 6px;
}
.tiptapEditorWrapper.staticToolbarActive .tiptapEditorContent {
  border-top-left-radius: 0px;
  border-top-right-radius: 0px;
}

.tiptapEditorWrapper ul {
  margin-top: 16px;
  margin-bottom: 16px;
  list-style-type: disc;
  padding-left: 40px;
}
.tiptapEditorWrapper ol {
  margin-top: 16px;
  margin-bottom: 16px;
  list-style-type: decimal;
  padding-left: 40px;
}
/* tiptap-editor end */

/* ============================================
   Template Field (Merge Field) Styles
   color & font-weight are applied via CSS class
   instead of inline style to prevent Tiptap's
   TextStyle/Color/Bold marks from parsing them
   and leaking to adjacent typed text.
   ============================================ */
.tiptapEditorWrapper span[data-template-field],
.ProseMirror span[data-template-field] {
  color: #FF6A00 !important;
  font-weight: 500 !important;
}
/* Template Field Styles end */

/* tiptapToolbarWrapperNew */
.tiptapToolbarWrapperNew {
  z-index: 9999;
  max-width: calc(100vw - 30px);
}
@media (max-width: 1199px) {
  .tiptapToolbarWrapperNew {
    z-index: 99999;
  }
}
.staticToolbarWrapper {
  border-width: 1px;
  border-bottom-width: 0px;
  border-color: var(--lightBorderSD);
}
.tiptapToolbarWrapperNew .innerTBWrapperNew {
  z-index: 99999;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  border-radius: 6px;
  border-width: 1px;
  border-color: var(--lightBorderSD);
  background-color: var(--bgWhiteSD);
  padding: 6px;
  padding-bottom: 0px;
  --tw-shadow: var(--dropdownShadow);
  --tw-shadow-colored: var(--dropdownShadow);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
@media (max-width: 1199px) {
  .tiptapToolbarWrapperNew .innerTBWrapperNew {
    flex-wrap: wrap;
  }
}
.tiptapToolbarWrapperNew .btnGroupWrapper,
.staticToolbarWrapper .btnGroupWrapper {
  position: relative;
  margin-right: 8px;
  display: flex;
  align-items: center;
  padding-right: 9px;
}
.tiptapToolbarWrapperNew .btnGroupWrapper::before,
.staticToolbarWrapper .btnGroupWrapper::before {
  position: absolute;
  right: 0px;
  top: 5px;
  height: 20px;
  width: 2px;
  background-color: var(--lightBorderSD);
  --tw-content: '';
  content: var(--tw-content);
}
.tiptapToolbarWrapperNew .btnGroupWrapper:last-child,
.staticToolbarWrapper .btnGroupWrapper:last-child {
  margin-right: 0px;
  padding-right: 0px;
}
.tiptapToolbarWrapperNew .btnGroupWrapper:last-child::before,
.staticToolbarWrapper .btnGroupWrapper:last-child::before {
  content: var(--tw-content);
  display: none;
}
.tiptapToolbarWrapperNew .iconBtn,
.staticToolbarWrapper .iconBtn {
  margin-right: 6px;
  margin-bottom: 6px;
  display: inline-flex;
  height: 30px;
  width: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 8px;
}
.tiptapToolbarWrapperNew .iconBtn:last-child,
.staticToolbarWrapper .iconBtn:last-child {
  margin-right: 0px;
}
.tiptapToolbarWrapperNew .iconBtn:hover,
.staticToolbarWrapper .iconBtn:hover {
  background-color: var(--bgSurface);
}
.tiptapToolbarWrapperNew .iconBtn:disabled,
.staticToolbarWrapper .iconBtn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.tiptapToolbarWrapperNew .iconBtn.active,
.staticToolbarWrapper .iconBtn.active {
  background-color: var(--primaryColorSD);
}
.tiptapToolbarWrapperNew .iconBtn.active:hover,
.staticToolbarWrapper .iconBtn.active:hover {
  background-color: var(--primaryColorSD);
}
.tiptapToolbarWrapperNew .iconBtn.active svg,
.staticToolbarWrapper .iconBtn.active svg,
.tiptapToolbarWrapperNew .iconBtn.active svg *,
.staticToolbarWrapper .iconBtn.active svg * {
  fill: #ffffff;
}
.staticToolbarWrapper .iconBtn {
  margin-bottom: 4px;
}
.staticToolbarWrapper .iconBtn:hover {
  background-color: var(--bgWhiteSD);
}
.tiptapToolbarWrapperNew .toolbarSelectBox,
.staticToolbarWrapper .toolbarSelectBox {
  margin-bottom: 6px;
  min-height: 30px;
  border-radius: 4px;
  background-color: var(--bgSurface);
  padding-left: 5px;
  padding-right: 5px;
  font-family: Matter;
  font-size: 16px;
  font-weight: 500;
  color: var(--iconColorSD);
}
.tiptapToolbarWrapperNew .toolbarSelectBox:focus,
.staticToolbarWrapper .toolbarSelectBox:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.staticToolbarWrapper .toolbarSelectBox {
  margin-bottom: 4px;
}
.staticToolbarWrapper .toolbarSelectBox:hover {
  background-color: var(--bgWhiteSD);
}
/* tiptapToolbarWrapperNew end */

/* Mention Chip Styles */
.mentionDropdownTiptap {
  position: fixed;
  z-index: 99999;
  overflow: hidden;
  border-radius: 10px;
  border-width: 1px;
  border-color: var(--lightBorderSD);
  background-color: var(--bgWhiteSD);
  --tw-shadow: var(--dropdownShadow);
  --tw-shadow-colored: var(--dropdownShadow);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.mentionDropdownTiptap .mentionDropdownItem {
  display: flex;
  min-height: 40px;
  cursor: pointer;
  align-items: center;
  padding-top: 6px;
  padding-bottom: 6px;
  padding-left: 10px;
  padding-right: 10px;
}
.mentionDropdownTiptap .mentionDropdownItem:hover {
  background-color: var(--bgSurface);
}
/* .mentionDropdownTiptap .mentionDropdownItem.active{
  @apply bg-primaryColorSD50 hover:bg-primaryColorSD50;
} */
.mentionDropdownTiptap .mentionDropdownItem.active .personName {
  color: var(--primaryColorSD);
}
.mentionDropdownTiptap .mentionDropdownItem.active .i__Icon svg {
  fill: var(--primaryColorSD);
}
.mentionDropdownTiptap .mention__li {
  display: flex;
  align-items: center;
}

.mentionDropdownTiptap .parentsScroll {
  padding: 6px;
}
.mentionDropdownTiptap .parentsScroll .mention__li {
  padding: 0px;
}
.mentionDropdownTiptap .parentsScroll .mentionDropdownItem {
  margin-bottom: 2px;
  min-height: unset;
  border-radius: 6px;
  padding-left: 9px;
  padding-right: 9px;
  padding-top: 8px;
  padding-bottom: 7px;
}
.mentionDropdownTiptap .parentsScroll .mentionDropdownItem.active {
  background-color: var(--bgSurface);
}

.mentionDropdownTiptapSubmenuItem {
  border-radius: 6px;
}

.mentionDropdownTiptapSubmenuItem:hover {
  background-color: var(--bgSurface);
}
.mentionDropdownTiptapSubmenuItem.active {
  background-color: var(--bgSurface);
}

.tiptapEditorWrapper .mention-chip {
  display: inline-block;
  cursor: pointer;
  -webkit-user-select: all;
     -moz-user-select: all;
          user-select: all;
  white-space: nowrap;
  background-color: var(--bgSurface);
  padding-top: 0px;
  padding-bottom: 0px;
  padding-left: 2px;
  padding-right: 2px;
  color: var(--primaryColorSD);
  text-decoration-line: none;
}
.tiptapEditorWrapper .mention-chip[contenteditable="false"] {
  -webkit-user-modify: read-only;
  -moz-user-modify: read-only;
  user-modify: read-only;
}
.tiptapEditorWrapper .mention-chip + .mention-chip {
  margin-left: 2px;
}
/* Mention Chip Styles end */

.gmail_signature {
  border-width: 0px;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
  outline: 2px solid transparent;
  outline-offset: 2px;
}

/**
 * Tiptap Editor + HtmlBlock + Bubble Menu Styles
 */

/* Editor Container */
.editor-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* ProseMirror Editor */
.ProseMirror {
  outline: none;
  /* min-height: 200px; */
}
.proposalSecTitleWrapper .ProseMirror{
  min-height:unset;
}

.ProseMirror > * + * {
  margin-top: 0.75em;
}

.ProseMirror p {
  margin: 0;
  line-height: 1.6;
}

.ProseMirror h1,
.ProseMirror h2,
.ProseMirror h3 {
  line-height: 1.3;
  margin-top: 1em;
  margin-bottom: 0.5em;
}

.ProseMirror h1 {
  font-size: 2em;
}

.ProseMirror h2 {
  font-size: 1.5em;
}

.ProseMirror h3 {
  font-size: 1.25em;
}

/*
 * Block-level line-height on p/headings sets a floor for line-box height.
 * TipTap LineHeight applies inline line-height on <span> (textStyle); when the
 * block’s line-height is larger (e.g. 1.6 on p, 1.3 on headings), values like
 * 1.0–1.5 can look unchanged because the line box still follows the larger strut.
 * Reset block line-height to normal when the block contains text with an
 * explicit inline line-height. Placed after heading rules so specificity wins.
 */
.ProseMirror p:has(span[style*='line-height']),
.ProseMirror h1:has(span[style*='line-height']),
.ProseMirror h2:has(span[style*='line-height']),
.ProseMirror h3:has(span[style*='line-height']),
.ProseMirror h4:has(span[style*='line-height']),
.ProseMirror h5:has(span[style*='line-height']),
.ProseMirror h6:has(span[style*='line-height']),
.ProseMirror blockquote:has(span[style*='line-height']) {
  line-height: normal;
}

/* HtmlBlock wrapper - keeps your template untouched */
.html-block-wrapper {
  position: relative;
}

.html-block-content {
  display: block;
}

/* ============================================
   Bubble Menu Styles
   ============================================ */

.bubble-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  background: #1a1a1a;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bubble-menu button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.bubble-menu button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.bubble-menu button.is-active {
  background: rgba(255, 255, 255, 0.2);
  color: #60a5fa;
}

.bubble-menu .divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 4px;
}

/* Tippy tooltip arrow */
.tippy-box[data-theme~='dark'] {
  background-color: #1a1a1a;
}

.tippy-box[data-theme~='dark'] .tippy-arrow {
  color: #1a1a1a;
}

.react-renderer.node-image.ProseMirror-selectednode{
  display:inline-block;
  margin:7px;
}

/* BookingEmailTemplate wrapper - preserves template HTML untouched */
.booking-email-template-wrapper {
  position: relative;
}

.booking-email-template-content {
  display: block;
}

/*
 * CSS isolation: reset all inherited TipTap editor styles inside the
 * booking email template so the template's own inline styles are
 * respected. Without this, rules like `.tiptapEditorWrapper p`,
 * `.tiptapEditorWrapper h3`, `.tiptapEditorWrapper a`, `.ProseMirror p`
 * would override the template's inline font-size, margin, color, etc.
 */
.booking-email-template-content p,
.booking-email-template-content h1,
.booking-email-template-content h2,
.booking-email-template-content h3,
.booking-email-template-content h4,
.booking-email-template-content h5,
.booking-email-template-content h6 {
  all: revert;
}

.booking-email-template-content a {
  all: revert;
}

.booking-email-template-content ul,
.booking-email-template-content ol,
.booking-email-template-content li {
  all: revert;
}

.booking-email-template-content table,
.booking-email-template-content tr,
.booking-email-template-content td,
.booking-email-template-content th,
.booking-email-template-content tbody,
.booking-email-template-content thead {
  all: revert;
}

.booking-email-template-content img {
  all: revert;
}

.booking-email-template-content div,
.booking-email-template-content span {
  /* Don't use all:revert on div/span as it can break layout;
     only reset the properties TipTap overrides */
  margin: revert;
  padding: revert;
  font-size: revert;
  line-height: revert;
  color: revert;
}

.booking-email-template-content blockquote {
  all: revert;
}

.booking-email-template-content hr {
  all: revert;
}
