.tiptap-editor-container {
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.tiptap-editor-container:hover {
  border-color: #adb5bd;
}

.tiptap-editor-container:focus-within {
  border-color: #3490dc;
  box-shadow: 0 0 0 4px rgba(52, 144, 220, 0.15);
  outline: none;
}

.tiptap-editor-container .tiptap-editor-wrapper {
  position: relative;
}

.tiptap-editor-container .tiptap-content {
  min-height: 400px;
  padding: 1.25rem;
  outline: none;
}

.tiptap-editor-container .tiptap-content .ProseMirror {
  outline: none;
  min-height: 400px;
  font-family: inherit;
  line-height: 1.6;
  color: #495057;
}

.tiptap-editor-container .tiptap-content .ProseMirror p {
  margin: 0 0 1rem 0;
}

.tiptap-editor-container .tiptap-content .ProseMirror h1,
.tiptap-editor-container .tiptap-content .ProseMirror h2,
.tiptap-editor-container .tiptap-content .ProseMirror h3,
.tiptap-editor-container .tiptap-content .ProseMirror h4,
.tiptap-editor-container .tiptap-content .ProseMirror h5,
.tiptap-editor-container .tiptap-content .ProseMirror h6 {
  margin: 1.5rem 0 0.75rem;
  color: #343a40;
  line-height: 1.2;
}

.tiptap-editor-container .tiptap-content .ProseMirror h1 {
  font-size: 2.25rem;
  font-weight: 800;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.3rem;
}

.tiptap-editor-container .tiptap-content .ProseMirror h2 {
  font-size: 1.85rem;
  font-weight: 700;
}

.tiptap-editor-container .tiptap-content .ProseMirror h3 {
  font-size: 1.55rem;
  font-weight: 700;
}

.tiptap-editor-container .tiptap-content .ProseMirror h4 {
  font-size: 1.35rem;
  font-weight: 600;
}

.tiptap-editor-container .tiptap-content .ProseMirror h5 {
  font-size: 1.2rem;
  font-weight: 600;
}

.tiptap-editor-container .tiptap-content .ProseMirror h6 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #6c757d;
}

.tiptap-editor-container .tiptap-content .ProseMirror ul,
.tiptap-editor-container .tiptap-content .ProseMirror ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.tiptap-editor-container .tiptap-content .ProseMirror li[data-indent] {
  list-style-position: outside;
}

.tiptap-editor-container .tiptap-content .ProseMirror li[style*="text-align: right"],
.tiptap-editor-container .tiptap-content .ProseMirror li[style*="text-align: center"],
.tiptap-editor-container .tiptap-content .ProseMirror li[style*="text-align: justify"] {
  list-style-position: inside;
}

.tiptap-editor-container .tiptap-content .ProseMirror blockquote {
  border-left: 4px solid #dee2e6;
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  font-style: italic;
  color: #6c757d;
  background: #f8f9fa;
}

.tiptap-editor-container .tiptap-content .ProseMirror code {
  background: #f1f3f5;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 87.5%;
  color: #e83e8c;
}

.tiptap-editor-container .tiptap-content .ProseMirror pre {
  background: #212529;
  color: #f8f9fa;
  padding: 1rem;
  border-radius: 0.25rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.tiptap-editor-container .tiptap-content .ProseMirror pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.tiptap-editor-container .tiptap-content .ProseMirror img {
  max-width: 100%;
  height: auto;
  border-radius: 0.25rem;
  margin: 1rem 0;
  display: block;
}

.tiptap-editor-container .tiptap-content .ProseMirror img.ProseMirror-selectednode {
  outline: 3px solid #007bff;
  box-shadow: 0 0 0 10px rgba(0, 123, 255, 0.1);
  transition: all 0.2s;
  cursor: move;
}

.tiptap-editor-container .tiptap-content .ProseMirror img:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tiptap-editor-container .tiptap-content .ProseMirror img[style*="text-align: left"] {
  margin-right: auto;
  margin-left: 0;
}

.tiptap-editor-container .tiptap-content .ProseMirror img[style*="text-align: center"] {
  margin-right: auto;
  margin-left: auto;
}

.tiptap-editor-container .tiptap-content .ProseMirror img[style*="text-align: right"] {
  margin-left: auto;
  margin-right: 0;
}

.tiptap-editor-container .tiptap-content .ProseMirror img[style*="text-align: full"] {
  width: 100%;
}

.tiptap-editor-container .tiptap-content .ProseMirror img.align-left,
.tiptap-editor-container .tiptap-content .ProseMirror img.align-left {
  margin-right: auto;
  margin-left: 0;
}

.tiptap-editor-container .tiptap-content .ProseMirror img.align-center,
.tiptap-editor-container .tiptap-content .ProseMirror img.align-center {
  margin-right: auto;
  margin-left: auto;
}

.tiptap-editor-container .tiptap-content .ProseMirror img.align-right,
.tiptap-editor-container .tiptap-content .ProseMirror img.align-right {
  margin-left: auto;
  margin-right: 0;
}

.tiptap-editor-container .tiptap-content .ProseMirror img.float-left {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 0.5rem;
}

.tiptap-editor-container .tiptap-content .ProseMirror img.float-right {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.tiptap-editor-container .tiptap-content .ProseMirror .audio-wrapper {
  display: block;
  margin: 1rem 0;
  border-radius: 0.25rem;
  transition: all 0.2s;
  border: 2px solid transparent;
  /* Always have a border for layout stability */
}

.tiptap-editor-container .tiptap-content .ProseMirror .audio-wrapper.ProseMirror-selectednode {
  border-color: #007bff;
  box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
  background-color: rgba(0, 123, 255, 0.05);
  /* Subtle background to indicate selection */
}

.tiptap-editor-container .tiptap-content .ProseMirror .audio-wrapper:hover:not(.ProseMirror-selectednode) {
  border-color: #e2e8f0;
}

.tiptap-editor-container .tiptap-content .ProseMirror .audio-wrapper audio {
  width: 100%;
  outline: none;
}

.tiptap-editor-container .tiptap-content .ProseMirror .align-left {
  text-align: left !important;
}

.tiptap-editor-container .tiptap-content .ProseMirror .align-center {
  text-align: center !important;
}

.tiptap-editor-container .tiptap-content .ProseMirror .align-right {
  text-align: right !important;
}

.tiptap-editor-container .tiptap-content .ProseMirror .align-justify {
  text-align: justify !important;
}

.tiptap-editor-container a {
  color: #007bff;
  text-decoration: none;
  border-bottom: 1px dotted #007bff;
}

.tiptap-editor-container a:hover {
  color: #0056b3;
  border-bottom-style: solid;
}

.tiptap-editor-container table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
  margin: 0;
  overflow: hidden;
}

.tiptap-editor-container table td,
.tiptap-editor-container table th {
  min-width: 1em;
  border: 2px solid #ced4da;
  padding: 3px 5px;
  vertical-align: top;
  box-sizing: border-box;
  position: relative;
}

.tiptap-editor-container table td > *,
.tiptap-editor-container table th > * {
  margin-bottom: 0;
}

.tiptap-editor-container table th {
  font-weight: bold;
  text-align: left;
  background-color: #f8f9fa;
}

.tiptap-editor-container table .selectedCell:after {
  z-index: 2;
  position: absolute;
  content: "";
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: rgba(200, 200, 255, 0.4);
  pointer-events: none;
}

.tiptap-editor-container table .column-resize-handle {
  position: absolute;
  right: -2px;
  top: 0;
  bottom: -2px;
  width: 4px;
  background-color: #adf;
  pointer-events: none;
}

.tiptap-editor-container table p {
  margin: 0;
}

.rx-content table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
  margin: 1rem 0;
  overflow: hidden;
}

.rx-content table td,
.rx-content table th {
  min-width: 1em;
  border: 2px solid #ced4da;
  padding: 8px 12px;
  vertical-align: top;
  box-sizing: border-box;
  position: relative;
}

.rx-content table td > *,
.rx-content table th > * {
  margin-bottom: 0;
}

.rx-content table th {
  font-weight: bold;
  text-align: left;
  background-color: #f8f9fa;
}

.rx-content table p {
  margin: 0;
}

.rx-content .custom-embed-container {
  position: relative;
  margin: 1.5rem 0;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  padding: 5px;
}

.rx-content .custom-embed-container.responsive-embed .embed-content {
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 */
  height: 0;
  overflow: hidden;
}

.rx-content .custom-embed-container.responsive-embed .embed-content iframe,
.rx-content .custom-embed-container.responsive-embed .embed-content object,
.rx-content .custom-embed-container.responsive-embed .embed-content embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.rx-content .custom-embed-container .embed-content iframe {
  max-width: 100%;
  border: none;
}

.rx-content .custom-embed-container .embed-content video {
  max-width: 100%;
  height: auto;
  display: block;
}

.rx-content .custom-embed-container .embed-caption {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: #6c757d;
  font-style: italic;
}

.custom-embed-container {
  position: relative;
  margin: 1.5rem 0;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  padding: 5px;
  transition: all 0.2s;
}

.custom-embed-container:hover {
  border-color: #3490dc;
  box-shadow: 0 0 0 1px #3490dc;
}

.custom-embed-container.ProseMirror-selectednode {
  outline: 3px solid #3490dc;
  box-shadow: 0 0 0 10px rgba(52, 144, 220, 0.1);
}

.custom-embed-container.responsive-embed .embed-content {
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 */
  height: 0;
  overflow: hidden;
}

.custom-embed-container.responsive-embed .embed-content iframe,
.custom-embed-container.responsive-embed .embed-content object,
.custom-embed-container.responsive-embed .embed-content embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.custom-embed-container.responsive-embed .embed-content video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
}

.custom-embed-container .embed-content video {
  max-width: 100%;
  height: auto;
  display: block;
}

.custom-embed-container .embed-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  cursor: default;
  background: transparent;
  pointer-events: none;
}

.custom-embed-container .embed-select-handle {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  z-index: 6;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 0.75rem;
}

.custom-embed-container .embed-select-handle:hover {
  background: rgba(0, 0, 0, 0.7);
}

.custom-embed-container .embed-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 0.25rem;
  gap: 1rem;
}

.custom-embed-container .embed-placeholder i {
  color: #94a3b8;
}

.custom-embed-container .embed-caption {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: #6c757d;
  font-style: italic;
  position: relative;
}

.pdf-embed-container {
  position: relative;
  margin: 1.5rem 0;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  overflow: hidden;
}

.pdf-embed-container .pdf-embed-viewer iframe {
  display: block;
  width: 100%;
  min-height: 500px;
  border: none;
}

.pdf-embed-container .pdf-embed-caption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6c757d;
}

.pdf-embed-container.pdf-embed-editor-view {
  padding: 0.5rem;
}

.pdf-embed-container .pdf-embed-placeholder {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 0.25rem;
}

.pdf-embed-container .pdf-embed-placeholder i {
  margin-right: 0.25rem;
}

.pdf-embed-container .pdf-embed-placeholder a {
  margin-left: auto;
  font-size: 0.875rem;
  position: relative;
  z-index: 6;
}

.pdf-embed-container .pdf-embed-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  cursor: move;
  background: transparent;
}

.pdf-embed-container.ProseMirror-selectednode {
  outline: 3px solid #3490dc;
  box-shadow: 0 0 0 10px rgba(52, 144, 220, 0.1);
}

.tiptap-toolbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #ced4da;
  padding: 0.5rem;
  background: #f8f9fa;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  border-radius: 0.25rem 0.25rem 0 0;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.tiptap-toolbar .tiptap-toolbar-group {
  display: flex;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  padding: 2px;
  margin-right: 0.25rem;
}

.tiptap-toolbar .tiptap-toolbar-group.no-border {
  border: none;
  background: transparent;
  padding: 0;
}

.tiptap-toolbar .tiptap-toolbar-group:last-child {
  margin-right: 0;
}

.tiptap-toolbar .tiptap-toolbar-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: none;
  background: transparent;
  color: #495057;
  border-radius: 0.15rem;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  margin: 0 1px;
}

.tiptap-toolbar .tiptap-toolbar-button:hover {
  background: #e9ecef;
  color: #212529;
}

.tiptap-toolbar .tiptap-toolbar-button.is-active {
  background: #007bff;
  color: white;
}

.tiptap-toolbar .tiptap-toolbar-button.btn-danger-soft {
  color: #dc3545;
  background: #fff5f5;
}

.tiptap-toolbar .tiptap-toolbar-button.btn-danger-soft:hover {
  background: #fee2e2;
}

.tiptap-toolbar .tiptap-toolbar-button.btn-primary-soft {
  color: #007bff;
  background: #f0f7ff;
}

.tiptap-toolbar .tiptap-toolbar-button.btn-primary-soft:hover {
  background: #e0efff;
}

.tiptap-toolbar .tiptap-toolbar-button i {
  font-size: 14px;
}

.color-icon-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.color-icon-wrapper i {
  font-size: 12px !important;
  margin-bottom: -1px;
}

.color-icon-wrapper .color-indicator {
  width: 14px;
  height: 3px;
  background: currentColor;
  border-radius: 0.5px;
}

.color-icon-wrapper.highlight-icon {
  background-image: linear-gradient(45deg, #dee2e6 25%, transparent 25%), linear-gradient(-45deg, #dee2e6 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #dee2e6 75%), linear-gradient(-45deg, transparent 75%, #dee2e6 75%);
  background-size: 4px 4px;
  background-position: 0 0, 0 2px, 2px 2px, 2px 0;
  padding: 2px;
  border-radius: 2px;
}

.color-icon-wrapper.highlight-icon i {
  margin-bottom: 0;
}

.tableWrapper {
  overflow-x: auto;
}

.resize-cursor {
  cursor: ew-resize;
  cursor: col-resize;
}

.tiptap-status-bar {
  background: #f8f9fa;
  border-top: 1px solid #ced4da;
  color: #6c757d;
  font-size: 0.875rem;
}

.tiptap-status-bar .tiptap-char-count {
  font-weight: 500;
}

.tiptap-status-bar .tiptap-char-count.is-warning {
  color: #856404;
  font-weight: 600;
}

.tiptap-status-bar .tiptap-char-count.is-limit {
  color: #721c24;
  font-weight: 700;
}

.special-char-item {
  transition: all 0.2s;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}

.special-char-item:hover {
  background: #e9ecef;
  transform: scale(1.1);
  z-index: 10;
}

.special-char-item.bg-primary {
  color: white;
}

#tiptap-editor-modal .modal-content {
  border-radius: 4px;
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

#tiptap-editor-modal .modal-header {
  padding: 15px;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#tiptap-editor-modal .modal-header .modal-title {
  margin: 0;
  line-height: 1.42857143;
  font-size: 1.2rem;
  font-weight: 700;
  color: #333;
}

#tiptap-editor-modal .modal-header .close {
  margin: -15px -15px -15px auto;
  padding: 15px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  color: #000;
  text-shadow: 0 1px 0 #fff;
  opacity: 0.2;
  outline: none;
}

#tiptap-editor-modal .modal-header .close:hover {
  opacity: 0.5;
}

#tiptap-editor-modal .modal-body {
  padding: 15px;
  max-height: 70vh;
  overflow-y: auto;
}

#tiptap-editor-modal .modal-footer {
  padding: 15px;
  text-align: right;
  border-top: 1px solid #e5e5e5;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

#tiptap-editor-modal .modal-footer .btn {
  font-weight: 400;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#tiptap-editor-modal .modal-footer .btn-default {
  color: #333;
  background-color: #fff;
  border-color: #ccc;
}

#tiptap-editor-modal .modal-footer .btn-default:hover {
  background-color: #e6e6e6;
  border-color: #adadad;
}

#tiptap-editor-modal .modal-footer .btn-primary {
  background-color: #3490dc;
  border-color: #3490dc;
  color: #fff;
}

#tiptap-editor-modal .modal-footer .btn-primary:hover {
  background-color: #227dc7;
  border-color: #2176bd;
}

#tiptap-editor-modal .form-group {
  margin-bottom: 15px;
}

#tiptap-editor-modal .form-group label {
  display: inline-block;
  max-width: 100%;
  margin-bottom: 5px;
  font-weight: 700;
  color: #333;
  font-size: 0.9rem;
}

#tiptap-editor-modal .form-group label.required::before {
  content: "* ";
  color: #e3342f;
  font-weight: 400;
}

#tiptap-editor-modal .form-group .form-control {
  display: block;
  width: 100%;
  height: calc(1.5em + 0.75rem + 2px);
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#tiptap-editor-modal .form-group .form-control:focus {
  color: #495057;
  background-color: #fff;
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#tiptap-editor-modal .form-group textarea.form-control {
  height: auto;
  min-height: 100px;
}

input[type=color].form-control {
  padding: 5px;
  cursor: pointer;
  height: 50px !important;
}

input[type=color].form-control::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type=color].form-control::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

.special-chars-grid {
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
}

.special-chars-grid .special-char-item {
  border: 1px solid #f1f5f9 !important;
  margin: -1px 0 0 -1px;
  width: 12.5% !important;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #334155;
  transition: all 0.15s;
  background: #fff;
  cursor: pointer;
}

.special-chars-grid .special-char-item:hover {
  background: #f1f5f9;
  color: #3490dc;
  transform: scale(1.15);
  z-index: 2;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.special-chars-grid .special-char-item.bg-primary {
  background-color: #3490dc !important;
  color: white !important;
  z-index: 1;
}

.tiptap-dropdown {
  position: relative;
  display: inline-block;
  margin: 0 2px;
}

.tiptap-dropdown .tiptap-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: none;
  background: transparent;
  color: #495057;
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tiptap-dropdown .tiptap-dropdown-trigger:hover {
  background: #f1f3f5;
  color: #212529;
}

.tiptap-dropdown .tiptap-dropdown-trigger.is-active {
  color: #3490dc;
  background: #f0f7ff;
}

.tiptap-dropdown .tiptap-dropdown-trigger i.fa-chevron-down {
  font-size: 10px;
  opacity: 0.5;
  transition: transform 0.2s ease;
}

.tiptap-dropdown .tiptap-dropdown-trigger.is-open {
  background: #f1f3f5;
}

.tiptap-dropdown .tiptap-dropdown-trigger.is-open i.fa-chevron-down {
  transform: rotate(180deg);
}

.tiptap-dropdown .tiptap-dropdown-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  z-index: 1000;
  min-width: 44px;
  max-height: 300px;
  overflow-y: auto;
  padding: 4px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.tiptap-dropdown .tiptap-dropdown-menu.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.tiptap-dropdown .tiptap-dropdown-option {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: #4b5563;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tiptap-dropdown .tiptap-dropdown-option:hover {
  background: #f3f4f6;
  color: #111827;
}

.tiptap-dropdown .tiptap-dropdown-option.is-active {
  color: #3490dc;
  background: #f0f7ff;
  font-weight: 600;
}

.tiptap-dropdown .tiptap-dropdown-option.is-active .option-icon {
  color: #3490dc;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tiptap-dropdown .tiptap-dropdown-option .option-label {
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 13px;
  height: 100%;
  width: 100%;
  white-space: nowrap;
}

.tiptap-dropdown .tiptap-dropdown-option .option-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  background: #f9fafb;
  border-radius: 4px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.tiptap-dropdown .font-dropdown .tiptap-dropdown-trigger {
  min-width: 120px;
  justify-content: space-between;
}

.tiptap-dropdown .font-dropdown .tiptap-dropdown-menu {
  min-width: 140px;
}

.tiptap-dropdown .font-dropdown .tiptap-dropdown-option {
  justify-content: flex-start;
}

/* Color Palette Dropdown */

.tiptap-color-dropdown .color-palette-menu {
  padding: 10px;
  min-width: 180px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.tiptap-color-dropdown .color-palette-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.tiptap-color-dropdown .color-swatch {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 3px;
  padding: 0;
  cursor: pointer;
  transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.tiptap-color-dropdown .color-swatch:hover {
  transform: scale(1.25);
  z-index: 10;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.3);
}

.tiptap-color-dropdown .custom-color-btn {
  width: 100%;
  padding: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.tiptap-color-dropdown .custom-color-btn:hover {
  background: #f1f5f9;
  color: #3490dc;
  border-color: #3490dc;
}

.tiptap-color-dropdown .custom-color-btn i {
  font-size: 12px;
}

.tiptap-color-dropdown .color-trigger {
  padding: 0 6px !important;
  position: relative;
}

.tiptap-color-dropdown .color-trigger.is-active {
  background: #f0f7ff;
  border-color: #d1e9ff;
}

.composite-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.composite-icon .tiny-plus-left,
.composite-icon .tiny-plus-right,
.composite-icon .tiny-plus-top,
.composite-icon .tiny-plus-bottom {
  position: absolute !important;
  font-size: 7px !important;
  background: #fff;
  border-radius: 50%;
  width: 10px;
  height: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  z-index: 5;
  color: #28a745;
  border: 1px solid #28a745;
}

.composite-icon .tiny-plus-left {
  left: -8px;
}

.composite-icon .tiny-plus-right {
  right: -8px;
}

.composite-icon .tiny-plus-top {
  top: -8px;
}

.composite-icon .tiny-plus-bottom {
  bottom: -8px;
}

.composite-icon .text-muted {
  color: #adb5bd !important;
}

.composite-icon .text-danger {
  position: absolute !important;
  font-size: 10px !important;
  color: #dc3545 !important;
  z-index: 5;
}

.heading-dropdown .tiptap-dropdown-trigger {
  border: 1px solid transparent !important;
  background: transparent !important;
  min-width: auto !important;
  justify-content: space-between !important;
  padding: 0 8px !important;
  display: flex !important;
  align-items: center !important;
  margin: 0 2px !important;
}

.heading-dropdown .tiptap-dropdown-trigger .trigger-label {
  font-weight: 600 !important;
  color: #495057 !important;
  font-size: 13px !important;
}

.heading-dropdown .tiptap-dropdown-trigger i.fa-chevron-down {
  font-size: 10px !important;
  color: #adb5bd !important;
  margin-left: 6px !important;
}

.heading-dropdown .tiptap-dropdown-trigger:hover {
  background: #f1f5f9 !important;
  border-color: #cbd5e0 !important;
}

.heading-dropdown .tiptap-dropdown-trigger.is-active {
  color: #3490dc !important;
  background: #f0f7ff !important;
  border-color: #d1e9ff !important;
}

.heading-dropdown .tiptap-dropdown-trigger.is-active .trigger-label {
  color: #3490dc !important;
}

.heading-dropdown .tiptap-dropdown-trigger.is-open {
  background: #f1f5f9 !important;
  border-color: #cbd5e0 !important;
}

.tiptap-tooltip {
  position: fixed;
  z-index: 11000;
  padding: 5px 10px;
  background: #1e293b;
  color: white;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  pointer-events: none;
  display: none;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.1s ease, transform 0.1s ease;
  white-space: nowrap;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.tiptap-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.tiptap-tooltip::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -4px;
  border-width: 4px;
  border-style: solid;
  border-color: transparent transparent #1e293b transparent;
}

.tiptap-toolbar-button:disabled {
  opacity: 0.4;
  cursor: not-allowed !important;
  pointer-events: none;
}

.tiptap-toolbar-button:disabled i {
  color: #94a3b8 !important;
}

/* Fullscreen Mode */

body.tiptap-fullscreen-active {
  overflow: hidden !important;
}

.tiptap-editor-container.is-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 10100 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  background: #fff !important;
}

.tiptap-editor-container.is-fullscreen .tiptap-editor-wrapper {
  flex: 1 !important;
  overflow-y: auto !important;
  height: auto !important;
  background: #fff !important;
  display: block !important;
}

.tiptap-editor-container.is-fullscreen .tiptap-content {
  min-height: 100% !important;
  max-width: 900px !important;
  margin: 0 auto !important;
  padding: 40px 20px !important;
  border: none !important;
}

.tiptap-editor-container.is-fullscreen .tiptap-content .ProseMirror {
  min-height: 50vh !important;
}

.tiptap-editor-container.is-fullscreen .tiptap-toolbar {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  width: 100% !important;
  z-index: 10110 !important;
  border-radius: 0 !important;
  border-left: none !important;
  border-right: none !important;
  border-top: none !important;
  background: #f8fafc !important;
  padding: 10px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
  justify-content: center !important;
}

.tiptap-editor-container.is-fullscreen .tiptap-status-bar {
  border-left: none !important;
  border-right: none !important;
  border-bottom: none !important;
  border-radius: 0 !important;
}

/* Ensure modals appear above the fullscreen editor */

body.tiptap-fullscreen-active .modal {
  z-index: 10200 !important;
}

body.tiptap-fullscreen-active .modal-backdrop {
  z-index: 10150 !important;
}

