/* =============================================
   ედიტორის wrapper - სიმაღლის resize
============================================= */
.quill-editor-wrapper {
    position: relative;
}

.quill-editor-wrapper .ql-container {
    resize: vertical;
    overflow: auto;
    min-height: 300px;
    max-height: 1200px;
}

.quill-editor-wrapper .ql-editor {
    min-height: 100%;
    height: 100%;
    box-sizing: border-box;
}

/* =============================================
   IMAGE RESIZE OVERLAY
============================================= */
#img-resize-overlay {
    position: absolute;
    border: 2px solid #007bff;
    pointer-events: none;
    z-index: 9999;
    box-sizing: border-box;
}

.img-resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #007bff;
    border: 1px solid #fff;
    border-radius: 2px;
    pointer-events: all;
    z-index: 10000;
    box-sizing: border-box;
}

.img-resize-handle:hover {
    background: #0056b3;
    transform: scale(1.3);
}

/* =============================================
   ROW DRAG LINE
============================================= */
#row-drag-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #007bff;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.7;
}

/* =============================================
   ფონტები
============================================= */
.ql-font-arial           { font-family: Arial, sans-serif; }
.ql-font-times-new-roman { font-family: "Times New Roman", serif; }
.ql-font-courier-new     { font-family: "Courier New", monospace; }
.ql-font-georgia         { font-family: Georgia, serif; }
.ql-font-helvetica       { font-family: Helvetica, sans-serif; }
.ql-font-roboto          { font-family: Roboto, sans-serif; }
.ql-font-tahoma          { font-family: Tahoma, sans-serif; }
.ql-font-verdana         { font-family: Verdana, sans-serif; }

.ql-picker.ql-font .ql-picker-item[data-value="arial"]::before,
.ql-picker.ql-font .ql-picker-label[data-value="arial"]::before           { content: "Arial"; font-family: Arial; }
.ql-picker.ql-font .ql-picker-item[data-value="times-new-roman"]::before,
.ql-picker.ql-font .ql-picker-label[data-value="times-new-roman"]::before { content: "Times New Roman"; font-family: "Times New Roman"; }
.ql-picker.ql-font .ql-picker-item[data-value="courier-new"]::before,
.ql-picker.ql-font .ql-picker-label[data-value="courier-new"]::before     { content: "Courier New"; font-family: "Courier New"; }
.ql-picker.ql-font .ql-picker-item[data-value="georgia"]::before,
.ql-picker.ql-font .ql-picker-label[data-value="georgia"]::before         { content: "Georgia"; font-family: Georgia; }
.ql-picker.ql-font .ql-picker-item[data-value="helvetica"]::before,
.ql-picker.ql-font .ql-picker-label[data-value="helvetica"]::before       { content: "Helvetica"; font-family: Helvetica; }
.ql-picker.ql-font .ql-picker-item[data-value="roboto"]::before,
.ql-picker.ql-font .ql-picker-label[data-value="roboto"]::before          { content: "Roboto"; font-family: Roboto; }
.ql-picker.ql-font .ql-picker-item[data-value="tahoma"]::before,
.ql-picker.ql-font .ql-picker-label[data-value="tahoma"]::before          { content: "Tahoma"; font-family: Tahoma; }
.ql-picker.ql-font .ql-picker-item[data-value="verdana"]::before,
.ql-picker.ql-font .ql-picker-label[data-value="verdana"]::before         { content: "Verdana"; font-family: Verdana; }

/* =============================================
   Quill Editor
============================================= */
.ql-editor {
    min-height: 280px;
}

.ql-editor img {
    max-width: 100%;
    cursor: pointer;
}

/* =============================================
   კოდის ბლოკი
============================================= */
.ql-editor pre.ql-syntax {
    background-color: #1e1e1e;
    color: #d4d4d4;
    border-radius: 6px;
    padding: 14px 16px;
    font-family: "Courier New", Courier, monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
}

/* =============================================
   ცხრილი
============================================= */
.ql-editor table {
    border-collapse: collapse;
    width: 100%;
    margin: 10px 0;
    table-layout: fixed;
}

.ql-editor table td {
    border: 1px solid #ccc;
    padding: 6px 12px;
    min-width: 60px;
    word-break: break-word;
    vertical-align: top;
    min-height: 30px;
    box-sizing: border-box;
}

.ql-editor table tr {
    position: relative;
}

/* right-click მენიუ */
.qlbt-operation-menu {
    z-index: 9999;
    font-size: 13px;
}

.qlbt-operation-menu .qlbt-operation-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px;
    max-width: 220px;
}

.qlbt-operation-menu .qlbt-operation-color-picker span {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.15);
    transition: transform 0.1s;
}

.qlbt-operation-menu .qlbt-operation-color-picker span:hover {
    transform: scale(1.2);
}

/* =============================================
   Sortable
============================================= */
.sortable-images { min-height: 50px; }
.sortable-images .image-item { transition: all 0.3s ease; }
.sortable-images .image-item.dragging { opacity: 0.5; transform: scale(1.05); }
.sortable-images .sortable-card { cursor: grab; transition: all 0.2s ease; }
.sortable-images .sortable-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.15); transform: translateY(-2px); }
.sortable-images .sortable-card:active { cursor: grabbing; }
.sortable-images .drag-handle { background: #f8f9fa; border-bottom: 1px solid #dee2e6; cursor: grab; text-align: center; padding: 2px 0; }
.sortable-images .drag-handle:active { cursor: grabbing; }
.sortable-documents { min-height: 50px; }
.sortable-documents .document-item { cursor: grab; transition: all 0.2s ease; }
.sortable-documents .document-item:hover { background-color: #f8f9fa; }
.sortable-documents .document-item:active { cursor: grabbing; }
.sortable-documents .document-item.dragging { opacity: 0.5; }
.ui-sortable-placeholder { visibility: visible !important; }
.sortable-images .ui-sortable-placeholder { border: 2px dashed #007bff; background-color: #e7f3ff; border-radius: 0.25rem; }
.sortable-documents .ui-sortable-placeholder { border: 2px dashed #007bff; background-color: #e7f3ff; margin-bottom: 0.5rem; }

/* Icons */
.icon-16 { width: 16px; height: 16px; fill: currentColor; }
.icon-24 { width: 24px; height: 24px; fill: currentColor; }