/* #ubl_logo{
  position: fixed;
  top: 2px;
  left: 2px;
  height: 45px;
  border-bottom-right-radius: 15px;
} */
 *{
   box-sizing: border-box;
   margin: 0;
   padding: 0;
 }
.editor_container{
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 15px;
}
#editor {
  border: 1px solid #b5b5b5;
  padding: 10px;
  min-height: calc(100vh - 100px) !important;
  margin-top: 10px;
  width: 100% !important;
  max-width: 1400px;
  border-radius: 5px;
  box-shadow: rgba(0, 0, 0, 0.04) 0px 3px 5px;  
  background-color: #fff;
}

.editable > * {
  margin: 0 auto;
}

/* Ensure list markers render inside the editor bounds */
.editable ul,
.editable ol {
  list-style-position: inside;
  padding-left: 20px;
}

/* Normalize heading spacing and adjust h3 size */
.editable h1,
.editable h2,
.editable h3,
.editable h4,
.editable h5,
.editable h6 {
  margin: 0 0 0.5em;
}

.editable h3 {
  font-size: 1.3em;
}

input[type="color"]{
  width: 30px;
  height: 30px;
  border: 1px solid #5e5e5e;
  border-radius: 5px;
  cursor: pointer;
}
body{
  background-color: #eee;
}
footer{
  text-align: center;
  font-size: 14px;
  font-family: monospace;
  color: #888;
  padding: 0 0 10px 0;
}

/* image drag and drop functionality */
.image-widget{
  position: relative;
  display: inline-block;
  margin: 6px;
  box-sizing: border-box;
  border: 1px solid transparent;
}
.image-widget.selected{
  border-color: #4c9ffe;
  box-shadow: 0 0 0 2px rgba(76,159,254,0.25);
}
.image-widget img{
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}
.image-widget .resize-handle{
  position: absolute;
  width: 10px;
  height: 10px;
  background: #ffffff;
  border: 1px solid #4c9ffe;
  border-radius: 2px;
  box-shadow: 0 0 0 2px rgba(76,159,254,0.15);
  z-index: 2;
  display: none;
}
.image-widget .resize-handle.top-left{ top: -6px; left: -6px; cursor: nwse-resize; }
.image-widget .resize-handle.top-right{ top: -6px; right: -6px; cursor: nesw-resize; }
.image-widget .resize-handle.bottom-left{ bottom: -6px; left: -6px; cursor: nesw-resize; }
.image-widget .resize-handle.bottom-right{ bottom: -6px; right: -6px; cursor: nwse-resize; }

/* Show handles only for the selected image */
.image-widget.selected .resize-handle{
  display: block;
}

/* Delete button styling */
.image-widget .delete-handle {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  background: #ff4444;
  color: white;
  border: 2px solid white;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  z-index: 3;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
}

.image-widget .delete-handle:hover {
  background: #ff0000;
  transform: scale(1.1);
}

/* Show delete button only for selected images */
.image-widget.selected .delete-handle {
  display: flex;
}

/* Hide selection on outside click */
body:not(.suppress-img-deselect) {
}

/* Date display styles */
.date-wrapper {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
}
.date-input {
  padding: 2px 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

/* ===== Blockquote styling ===== */
.editable blockquote {
  margin: 10px 0;
  padding: 12px 16px;
  background: #d9d9d982;
  border-left: 6px solid #8a8a8a;
  color: #222;
}

.editable blockquote p { margin: 0; }

/* ===== Code block styling ===== */
pre.custom-code-block {
  background: #f4f4f4;
  border-radius: 4px;
  font-family: 'Fira Mono', 'Consolas', monospace;
  margin: 12px 0;
  border: 1px solid #e0e0e0;
  padding: 10px 12px;
  font-size: 15px;
  min-width: 300px;
  min-height: 40px;
  outline: none;
  width: auto;
  line-height: 1.6;
  white-space: pre;
  overflow-x: auto;
}
pre.custom-code-block code {
  display: block;
  background: none;
  padding: 0;
  margin: 0;
  border: none;
  font-family: inherit;
  font-size: inherit;
  color: #222;
  min-height: 1em;
  white-space: pre;
}

#header {
  position: fixed;
  top: 0;
  left: 0;
  /* width: 100vw; */
  width: 100%;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
}

#header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border-bottom: 1px solid #ccc;
  gap: 16px;
}

#header-controls {
  display: flex;
  gap: 8px;
}

body {
  margin: 0;
  padding-top: 120px;
}

.editor_container {
  margin-top: 20px;
}

/* ===== Sketch tool styling ===== */
.sketch-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.sketch-dialog {
  background: #fff;
  padding: 10px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sketch-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
}

.sketch-toolbar button {
  padding: 4px 8px;
}

.sketch-canvas {
  border: 1px solid #ccc;
  touch-action: none;
}

.sketch-dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.sketch-wrapper {
  position: relative;
  display: inline-block;
  margin: 6px;
}

.sketch-wrapper img {
  display: block;
  max-width: 100%;
}

.sketch-image-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 4px;
}

.sketch-image-actions button {
  background: rgba(255,255,255,0.8);
  border: 1px solid #888;
  border-radius: 3px;
  font-size: 12px;
  padding: 2px 4px;
  cursor: pointer;
}

/* ===== Column layout styling ===== */
.column-layout {
  display: flex;
  gap: 10px;
  width: 100%;
}

.column-layout .column {
  flex: 1;
  border: 1px dashed #bbb;
  padding: 10px;
  min-height: 60px;
  box-sizing: border-box;
}
