/* Custom styles for file links in Quill Editor */
.file-link {
    display: inline-block;
    padding: 8px 12px;
    margin: 4px 2px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.file-link:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
    text-decoration: none;
}

.file-link[data-file-type="pdf"] {
    border-color: #dc3545;
    color: #dc3545;
}

.file-link[data-file-type="pdf"]:hover {
    background-color: #f8d7da;
    border-color: #dc3545;
}

.file-link[data-file-type="doc"],
.file-link[data-file-type="docx"] {
    border-color: #007bff;
    color: #007bff;
}

.file-link[data-file-type="doc"]:hover,
.file-link[data-file-type="docx"]:hover {
    background-color: #d1ecf1;
    border-color: #007bff;
}

.file-link[data-file-type="xls"],
.file-link[data-file-type="xlsx"] {
    border-color: #28a745;
    color: #28a745;
}

.file-link[data-file-type="xls"]:hover,
.file-link[data-file-type="xlsx"]:hover {
    background-color: #d4edda;
    border-color: #28a745;
}

.file-link[data-file-type="ppt"],
.file-link[data-file-type="pptx"] {
    border-color: #fd7e14;
    color: #fd7e14;
}

.file-link[data-file-type="ppt"]:hover,
.file-link[data-file-type="pptx"]:hover {
    background-color: #ffeaa7;
    border-color: #fd7e14;
}

/* Quill toolbar custom file button */
.ql-toolbar .ql-file {
    font-size: 18px;
    line-height: 1;
    padding: 5px;
}

.ql-toolbar .ql-file svg {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .file-link {
        padding: 6px 8px;
        font-size: 12px;
        margin: 2px 1px;
    }
}

/* Line Height Dropdown Styling */
.ql-toolbar .ql-picker.ql-lineheight {
    width: 100px;
}

.ql-toolbar .ql-picker.ql-lineheight .ql-picker-label::before {
    content: 'Line Height';
    font-size: 12px;
    color: #444;
    font-weight: normal;
}

.ql-toolbar .ql-picker.ql-lineheight .ql-picker-options {
    min-width: 100px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
}

.ql-toolbar .ql-picker.ql-lineheight .ql-picker-item {
    color: #333;
    font-size: 14px;
    padding: 8px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.ql-toolbar .ql-picker.ql-lineheight .ql-picker-item:last-child {
    border-bottom: none;
}

.ql-toolbar .ql-picker.ql-lineheight .ql-picker-item:hover,
.ql-toolbar .ql-picker.ql-lineheight .ql-picker-item.ql-selected {
    background: #e3f2fd;
}

/* Hiển thị số cho lineheight dropdown */
.ql-toolbar .ql-picker.ql-lineheight .ql-picker-item[data-value="1"]:before      { content: "1.0"; }
.ql-toolbar .ql-picker.ql-lineheight .ql-picker-item[data-value="1.15"]:before  { content: "1.15"; }
.ql-toolbar .ql-picker.ql-lineheight .ql-picker-item[data-value="1.5"]:before   { content: "1.5"; }
.ql-toolbar .ql-picker.ql-lineheight .ql-picker-item[data-value="2"]:before     { content: "2.0"; }
.ql-toolbar .ql-picker.ql-lineheight .ql-picker-item[data-value="2.5"]:before   { content: "2.5"; }
.ql-toolbar .ql-picker.ql-lineheight .ql-picker-item[data-value="3"]:before     { content: "3.0"; }

.ql-toolbar .ql-picker.ql-lineheight .ql-picker-item {
    font-size: 14px;
    color: #333;
    min-width: 40px;
    text-align: left;
}

/* Font Size Dropdown Styling */
.ql-toolbar .ql-picker.ql-size {
    width: 70px;
}

.ql-toolbar .ql-picker.ql-size .ql-picker-label::before {
    content: 'Size';
    font-size: 12px;
    color: #444;
    font-weight: normal;
}

.ql-toolbar .ql-picker.ql-size .ql-picker-options {
    min-width: 70px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.ql-toolbar .ql-picker.ql-size .ql-picker-item {
    color: #333;
    font-size: 14px;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
    text-align: center;
}

.ql-toolbar .ql-picker.ql-size .ql-picker-item:last-child {
    border-bottom: none;
}

.ql-toolbar .ql-picker.ql-size .ql-picker-item:hover,
.ql-toolbar .ql-picker.ql-size .ql-picker-item.ql-selected {
    background: #e3f2fd;
}

/* Hiển thị số cho size dropdown */
.ql-toolbar .ql-picker.ql-size .ql-picker-item[data-value="10px"]:before  { content: "10px"; }
.ql-toolbar .ql-picker.ql-size .ql-picker-item[data-value="12px"]:before  { content: "12px"; }
.ql-toolbar .ql-picker.ql-size .ql-picker-item[data-value="14px"]:before  { content: "14px"; }
.ql-toolbar .ql-picker.ql-size .ql-picker-item[data-value="16px"]:before  { content: "16px"; }
.ql-toolbar .ql-picker.ql-size .ql-picker-item[data-value="18px"]:before  { content: "18px"; }
.ql-toolbar .ql-picker.ql-size .ql-picker-item[data-value="20px"]:before  { content: "20px"; }
.ql-toolbar .ql-picker.ql-size .ql-picker-item[data-value="24px"]:before  { content: "24px"; }
.ql-toolbar .ql-picker.ql-size .ql-picker-item[data-value="28px"]:before  { content: "28px"; }
.ql-toolbar .ql-picker.ql-size .ql-picker-item[data-value="32px"]:before  { content: "32px"; }
.ql-toolbar .ql-picker.ql-size .ql-picker-item[data-value="36px"]:before  { content: "36px"; }
.ql-toolbar .ql-picker.ql-size .ql-picker-item[data-value="48px"]:before  { content: "48px"; }

/* Excel Table styling in editor */
.ql-editor .excel-table {
    cursor: pointer;
}

.ql-editor .excel-table:hover {
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    transition: box-shadow 0.2s ease;
}

/* Đảm bảo table không bị break layout */
.ql-editor table {
    table-layout: auto;
    max-width: 100%;
    overflow: hidden;
}

.ql-editor table td,
.ql-editor table th {
    overflow: hidden;
    text-overflow: ellipsis;
} 