/*Font Awesome css ends here*/
@import url('fontawesome/font.css');
/* @import url('fontawesome/duotone.css'); */
/* @import url('fontawesome/solid.css'); */
/*Font Awesome css ends here*/


/* Text Editor Styles */
.toolbar-btn,
.toolbar-select {
    font-size: 14px;
    color: #495057;
    transition: 0.3s;
}

.rich-editor,
.rich-editor td:focus {
    outline: 0;
    background: #fff;
}

.rich-editor-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: "Segoe UI", Arial, sans-serif;
}

.rich-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #dee2e6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.toolbar-group {
    padding: 9px 9px 0;
    background: rgba(255, 255, 255, 0.8);
    transition: 0.3s;
    display: flex;
    gap: 8px;
    align-items: center;
}

.toolbar-group:hover {
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
    transform: translateY(-1px);
}

.toolbar-btn {
    background: linear-gradient(135deg, #fff 0, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    min-width: 44px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.toolbar-btn:hover {
    background: linear-gradient(135deg, #007bff 0, #0056b3 100%);
    color: #fff;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

.toolbar-btn.active {
    background: linear-gradient(135deg, #28a745 0, #20c997 100%);
    color: #fff;
    border-color: #20c997;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(2px) scale(0.95);
    position: relative;
    border-width: 3px;
}

.btn-bgcolor.active,
.btn-bold.active,
.btn-color.active,
.btn-image.active,
.btn-italic.active,
.btn-link.active,
.btn-list.active,
.btn-underline.active,
.btn-video.active {
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(2px) scale(0.95) !important;
}

.toolbar-btn.active::after {
    content: "";
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    background: #28a745;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toolbar-btn.active:hover {
    background: linear-gradient(135deg, #20c997 0, #17a2b8 100%);
    transform: translateY(1px) scale(0.97);
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-bold,
.btn-bold.active {
    background: linear-gradient(135deg, #dc3545 0, #c82333 100%) !important;
}

.btn-italic,
.btn-italic.active {
    background: linear-gradient(135deg, #fd7e14 0, #e55a00 100%) !important;
}

.btn-underline.active,
.btn-video.active {
    background: linear-gradient(135deg, #6f42c1 0, #5a2d91 100%) !important;
}

.btn-align-center.active,
.btn-align-left.active,
.btn-align-right.active,
.btn-indent.active,
.btn-outdent.active,
.btn-strikethrough.active {
    background: linear-gradient(135deg, #6c757d 0, #545b62 100%) !important;
    color: #fff !important;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(2px) scale(0.95) !important;
}

.btn-color,
.btn-color.active {
    background: linear-gradient(135deg, #20c997 0, #17a2b8 100%) !important;
}

.btn-bgcolor,
.btn-bgcolor.active {
    background: linear-gradient(135deg, #ffc107 0, #e0a800 100%) !important;
}

.btn-link,
.btn-link.active {
    background: linear-gradient(135deg, #17a2b8 0, #138496 100%) !important;
}

.btn-image,
.btn-image.active {
    background: linear-gradient(135deg, #e83e8c 0, #c71585 100%) !important;
}

.btn-list.active {
    background: linear-gradient(135deg, #17a2b8 0, #138496 100%) !important;
    color: #fff !important;
}

.toolbar-select {
    min-width: 130px;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 8px 12px;
}

.toolbar-select:hover {
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.toolbar-select:focus {
    outline: 0;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.color-picker-container {
    position: relative;
    display: inline-block;
}

.color-picker-background,
.color-picker-text {
    visibility: hidden;
    position: absolute;
    top: 50px;
    left: 0;
    z-index: 1000;
    border: 3px solid #fff;
    border-radius: 8px;
    width: 60px;
    height: 60px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: 0.3s;
}

.color-picker-container:hover .color-picker-background,
.color-picker-container:hover .color-picker-text {
    visibility: visible;
    transform: scale(1.1);
}

.rich-editor {
    min-height: 400px;
    border: 2px solid #e9ecef;
    border-radius: 12px 12px 0 0;
    padding: 25px;
    font-size: 16px;
    line-height: 1.7;
    transition: 0.3s;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.rich-editor:focus {
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05),
        0 0 0 4px rgba(0, 123, 255, 0.1);
}

.rich-editor[placeholder]:empty:before {
    content: attr(placeholder);
    color: #6c757d;
    font-style: italic;
}

.rich-status-bar {
    background: linear-gradient(135deg, #f8f9fa 0, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 15px 20px;
    font-size: 13px;
    color: #6c757d;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -1px;
}

.word-count {
    font-weight: 600;
    color: #495057;
}

.shortcut {
    background: linear-gradient(135deg, #007bff 0, #0056b3 100%);
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.success-feedback {
    position: fixed;
    top: 30px;
    right: 30px;
    background: linear-gradient(135deg, #28a745 0, #20c997 100%);
    color: #fff;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    z-index: 1002;
    transform: translateX(100%);
    transition: transform 0.4s;
    font-weight: 500;
}

.btn-bgcolor,
.btn-bold,
.btn-color,
.btn-image,
.btn-italic,
.btn-link {
    color: #fff !important;
}

.success-feedback.show {
    transform: translateX(0);
}

.source-view {
    width: 100%;
    height: 250px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    font-family: monospace;
    font-size: 14px;
    background: #f8f9fa;
    resize: vertical;
}

.btn-underline,
.btn-video {
    background: linear-gradient(135deg, #6f42c1 0, #5a2d91 100%) !important;
    color: #fff !important;
}

.rich-editor table {
    border-collapse: collapse;
    border: 1px solid var(--theme-bg);
    width: 100%;
}

.rich-editor td,
.rich-editor th {
    border: 1px solid var(--theme-bg);
    padding: 6px 8px;
    vertical-align: middle;
    min-width: 40px;
}

.cropper-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.cropper-container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
}

.cropper-container button {
    margin: 5px;
    padding: 6px 12px;
}

.rich-editor-container {
    padding: 0 !important;
    box-shadow: none !important;
}

.rich-editor-container .rich-toolbar {
    padding: 0 !important;
    gap: 0 !important;
    /* row-gap: 10px !important; */
    background: unset !important;
    border-radius: 0 !important;
    margin-bottom: 0;
    padding-bottom: 20px !important;
}

.toolbar-group button i::after {
    opacity: 1;
}

.toolbar-group:hover {
    border-color: unset !important;
    box-shadow: unset !important;
    transform: unset !important;
}

.toolbar-group button {
    background: none !important;
    color: #000 !important;
}

.toolbar-group button.active,
.toolbar-group button:hover,
.toolbar-select:hover {
    background: #000 !important;
    color: #FFF !important;
    border-color: #FFF !important;
    box-shadow: none !important;
}

.toolbar-group {
    border: 0;
    border-radius: 0;
}


.rich-editor-container .rich-editor {
    border-radius: 0 !important;
    height: 400px;
    overflow-y: auto;
}

.rich-editor:focus {
    border-color: #e9ecef !important;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}



ol.pointdesimal {
    counter-reset: item;
}

ol.pointdesimal li {
    display: block;
}

ol.pointdesimal li:before {
    content: counters(item, ".") " ";
    counter-increment: item;
    margin-left: var(--before-margin, 0px);
}


.rich-editor ul li {
    padding-left: 10px;
}



.image-menu button {
    cursor: pointer;
    padding: 5px 8px;
    border: 1px solid #007bff;
    background: #fff;
    color: #007bff;
    border-radius: 3px;
}

.image-menu button:hover {
    background: #007bff;
    color: #fff;
}


.image-menu input:focus {
    outline: none;
    border-color: #007bff !important;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.image-menu button:hover {
    opacity: 0.9;
}

.rich-editor table td {
    min-width: 40px;
    min-height: 24px;
    vertical-align: top;
    outline: none;
}

.rich-editor table td[contenteditable="true"] {
    cursor: text;
}

.rich-editor td.selected-cell {
    background: #dbeeff;
    outline: 2px solid #007bff;
}

@media (max-width: 768px) {
    .rich-editor-container {
        padding: 20px;
        margin: 10px 0;
    }

    .rich-toolbar {
        padding: 15px;
        gap: 8px;
    }

    .toolbar-group {
        flex-wrap: wrap;
    }

    .toolbar-btn {
        min-width: 40px;
        height: 40px;
        padding: 8px 12px;
        border: 1px solid #e9ecef;
    }

    .toolbar-select {
        min-width: 100px;
        padding: 6px 10px;
        border: 1px solid #e9ecef;
    }

    .rich-editor {
        min-height: 300px;
        padding: 20px;
    }

    .rich-status-bar {
        padding: 12px 15px;
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .rich-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-group {
        justify-content: center;
        flex-wrap: wrap;
    }

    .toolbar-btn {
        min-width: 36px;
        height: 36px;
        padding: 6px 10px;
    }

    .rich-editor {
        min-height: 250px;
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .toolbar-select {
        font-size: 12px;
        padding: 7px 11px;
    }

    .toolbar-group {
        padding: 6px 9px 0 6px;
        gap: 6px;
    }

    .toolbar-btn {
        height: 36px;
        padding: 6px 8px;
        font-size: 12px;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .toolbar-group {
        padding: 6px 9px 0 6px;
        gap: 6px;
    }

    .toolbar-btn {
        height: 36px;
        padding: 6px 8px;
        font-size: 12px;
    }

    .toolbar-select {
        font-size: 12px;
        padding: 7px 11px;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .toolbar-btn {
        min-width: 40px;
        height: 35px;
        font-size: 12px;
    }

    .toolbar-group {
        padding: 8px 7px 0 !important;
        gap: 5px !important;
    }

    .toolbar-select {
        font-size: 12px;
        padding: 7px 11px;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .toolbar-group {
        padding: 8px 7px 0;
        gap: 5px;
    }

    .toolbar-select {
        font-size: 12px;
        padding: 6px 10px;
    }

    .toolbar-btn {
        min-width: 40px;
        height: 35px;
        font-size: 12px;
    }
}

@media (min-width: 1200px) and (max-width: 1499.98px) {
    .toolbar-group {
        padding: 8px 8px 0;
        gap: 6px;
    }

    .toolbar-btn {
        min-width: 42px;
        height: 35px;
        font-size: 12px;
    }
}

@media (min-width: 575.98px) and (max-width: 767.98px) {
    #layoutPopup {
        left: 90px;
    }
}
