﻿/*Overrides summernote text editor's css*/

.note-frame {
    border-radius: var(--border-radius-default);
    color: var(--text-color-main);
    font-family: var(--font-family-default);
}
.note-editor.note-frame {
    /*border: 1px solid var(--color-grey-light);*/
    border: none;
    outline: 1px solid var(--color-grey-light);
    outline-offset: -1px;
    transition: outline-color 0.5s ease;
}
.note-editor.note-frame:hover {
    outline: 1px solid var(--color-grey-dark);
}
.note-editor.note-frame:focus, .note-editor.note-frame:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

.note-toolbar {
    border-color: var(--color-grey-light);
    background-color: transparent;
}
.note-editor .note-toolbar {
    margin-right: 12px;
    margin-left: 12px;
    padding: 7px 0 12px 0px;
}

.note-toolbar .note-btn {
    padding: 8px;
    line-height: 1;
    height: 32px;
    width: 32px;
    background-color: var(--white);
    /*border: 0.5px solid var(--color-grey-dark);*/
    border: 0.5px solid var(--color-grey-medium);
    border-radius: var(--border-radius-default) !important;
    box-shadow: var(--shadow-button);
    transition: background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease, text-decoration-color 0.5s ease;
}
.note-toolbar .note-btn:hover{
    box-shadow: var(--shadow-button-hover);
    border: 0.5px solid var(--color-grey-medium);
    background-color: var(--white);
}
.note-toolbar .note-btn:active:focus {
    box-shadow: var(--shadow-button-pressed);
}
.note-toolbar .note-btn.active {
    box-shadow: var(--shadow-button);
    background-color: var(--color-grey-light);
    border: 0.5px solid var(--color-grey-medium);
}
.note-toolbar .note-btn > i {
    font-size: 16px;
}

.note-editor.note-frame .note-editing-area .note-editable {
    padding: 12px 3px 12px 12px;
    overflow-y: scroll;
    border-right: 3px solid transparent;
    overflow-wrap: anywhere; /*to solve long words overflow issue*/
}

.note-editor.note-frame .note-placeholder {
    padding: 12px;
    color: var(--text-color-subdued);
}

.note-editable::-webkit-scrollbar {
    width: 6px;
}
.note-editable::-webkit-scrollbar-thumb {
    background-color: rgba(var(--rgb-os-bg),0.44);
    border-radius: var(--border-radius-round);
    cursor: default;
}
.note-editable::-webkit-scrollbar-thumb:hover {
    background-color: rgba(var(--rgb-os-bg),0.55);
}
.note-editable::-webkit-scrollbar-thumb:active {
    background-color: rgba(var(--rgb-os-bg),0.66);
}

.note-statusbar {
    display: none;
}

.note-editor.note-frame .note-status-output {
    text-align: right;
    color: var(--text-color-subdued);
    border-top: 0.5px solid var(--color-grey-light);
    margin: 0px 12px 0px 12px;
    padding: 12px 0px 12px 0px;
    width: auto;
    height: auto;
    font-size: 12px;
    line-height: 16px;
    font-weight: 300;
}


.editor-retro.error .note-editor.note-frame,
.editor-modern.error .note-editor.note-frame {
    outline: 2px solid var(--danger-color);
    outline-offset: -2px;
}
.editor-retro.error ~ .error-message,
.editor-modern.error ~ .error-message {
    display: block;
}

.editor-retro.disabled .note-toolbar,
.editor-modern.disabled .note-toolbar {
    opacity: 0.4;
    pointer-events: none;
}
.editor-retro.disabled .note-editing-area,
.editor-modern.disabled .note-editing-area {
    pointer-events: none;
}


/*Retro Editor*/
.editor-retro .note-btn-group .note-btn + .note-btn {
    margin-left: 8px;
}
.editor-retro .note-toolbar i {
    color: var(--text-color-subdued);
}
.editor-retro .note-toolbar .note-btn {
    color: var(--text-color-subdued);
}

/*Modern Editor*/
.editor-modern .note-toolbar {
    border: 1px solid var(--color-grey-light);
    border-radius: var(--border-radius-default);
}
.editor-modern .note-editor .note-toolbar {
    top: 12px;
    padding: 4px;
}

.editor-modern .note-editor.note-frame .note-editing-area {
    padding-top: 12px;
}

.editor-modern .note-editor .note-toolbar > .note-btn-group {
    margin: 0px;
    border-right: 1px solid var(--color-grey-light);
}
.editor-modern .note-editor .note-toolbar > .note-btn-group:last-child {
    border-right: none;
}

.editor-modern .note-toolbar .note-btn {
    padding: 6px;
    height: 28px;
    width: 28px;
    border: none;
    border-radius: 0 !important;
    box-shadow: none;
    color: var(--text-color-main);
}
.editor-modern .note-toolbar .note-btn:hover {
    /*box-shadow: var(--shadow-button-hover);*/
    /*border: 0.5px solid var(--color-grey-medium);*/
    background-color: var(--rgba-hover-lighter);
}
.editor-modern .note-toolbar .note-btn.active {
    /*box-shadow: var(--shadow-button);*/
    background-color: var(--color-grey-light);
    /*border: 0.5px solid var(--color-grey-light);*/
}

.editor-modern .note-btn-group .note-btn + .note-btn {
    margin-left: 0px;
}


/*Link Modal*/
.note-editor .note-modal-content {
    display: flex;
    flex-direction: column;
    border-radius: var(--border-radius-default);
    box-shadow: var(--shadow-modal);
    background-color: var(--white);
    border: none;
}

.note-editor .note-modal-header {
    /*display: flex;*/
    padding: 0.75rem 1rem;
    border: none;
    border-bottom: 0.5px solid var(--color-grey-medium);
    /*gap: 1rem;*/
    /*align-items: center;*/
    /*flex-shrink: 0;*/
}
.note-editor .note-modal-title {
    margin-bottom: 0;
    font-size: var(--font-size-large);
    line-height: var(--line-height-large);
    font-weight: var(--font-weight-semibold);
    flex: 1 0 0;
    color: var(--text-color-main);
}

.note-editor .note-modal-body {
    padding: 1rem;
}



.note-editor .note-modal-footer {
    height: auto;
    display: flex;
    padding: 0.75rem 1rem;
    border-top: 0.5px solid var(--color-grey-medium);
    gap: 1rem;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.note-editor .note-btn-primary:hover {
    border-radius: var(--border-radius-default);
}

.note-form-group {
    padding-bottom: 16px;
}
.note-editor .note-modal .note-form-label {
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-small);
    line-height: var(--line-height-small);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    padding: 0;
    color: var(--text-color-main);
}
.note-editor .note-form-control {
    -webkit-appearance: none;
    background-color: var(--white);
    color: var(--text-color-main);
    /*border*/
    border-radius: var(--border-radius-default);
    border: none;
    outline: 1px solid var(--color-grey-light);
    outline-offset: -1px;
    /*typography*/
    font-size: var(--font-size-medium);
    line-height: var(--line-height-default);
    font-weight: var(--font-weight-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 110px; /*select options dropdown menu will therefore have same min width*/
    /*layout*/
    padding: 12px;
    height: 40px;
    width: 100%;
    transition: outline-color 0.5s ease;
}
.note-editor .note-form-control:hover {
    outline: 1px solid var(--color-grey-dark);
}
.note-editor .note-form-control:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
    box-shadow: none;
}

.note-editor .note-modal .checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin-bottom: 0;
}

.note-editor input[type=checkbox] {
    width: 16px;
    height: 16px;
    accent-color: var(--checkbox-color);
    cursor: pointer;
}
.note-editor input[type=checkbox] {
    appearance: none;
    -webkit-appearance: none;
    outline: 1px solid var(--color-grey-medium);
    outline-offset: -1px;
    border-radius: var(--border-radius-small);
    margin: 4px;
    transition: outline 0.5s ease;
}
.note-editor input[type=checkbox]::after {
    content: "";
    display: block;
    width: 24px;
    height: 24px;
    position: relative;
    margin-left: -4px;
    margin-top: -4px;
    border-radius: var(--border-radius-small);
    transition: background-color 0.5s ease;
}
.note-editor input[type=checkbox]:hover,
.note-editor input[type=checkbox]:focus-visible {
    outline: 1px solid var(--text-color-subdued);
}
.note-editor input[type=checkbox]:hover::after,
.note-editor input[type=checkbox]:focus-visible::after {
    background-color: var(--rgba-hover-light);
}

.note-editor input[type=checkbox]:checked {
    outline: 1px solid var(--checkbox-color);
    background-color: var(--checkbox-color);
    background-image: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none"> <path d="M10.7655 3.64052L4.76552 9.64052C4.73069 9.67539 4.68934 9.70305 4.64381 9.72192C4.59829 9.74079 4.54949 9.7505 4.50021 9.7505C4.45093 9.7505 4.40213 9.74079 4.35661 9.72192C4.31108 9.70305 4.26972 9.67539 4.2349 9.64052L1.6099 7.01552C1.53953 6.94516 1.5 6.84972 1.5 6.75021C1.5 6.6507 1.53953 6.55526 1.6099 6.4849C1.68026 6.41453 1.7757 6.375 1.87521 6.375C1.97472 6.375 2.07016 6.41453 2.14052 6.4849L4.50021 8.84505L10.2349 3.1099C10.3053 3.03953 10.4007 3 10.5002 3C10.5997 3 10.6952 3.03953 10.7655 3.1099C10.8359 3.18026 10.8754 3.2757 10.8754 3.37521C10.8754 3.47472 10.8359 3.57016 10.7655 3.64052Z" fill="white"/> </svg>');
    background-position: center;
    background-repeat: no-repeat;
    background-size: 12px 12px;
}
.note-editor input[type=checkbox].checkbox:checked:hover::after,
.note-editor input[type=checkbox].checkbox:checked:focus-visible::after {
    background-color: var(--checkbox-surround-hover);
}
.note-editor input[type=checkbox] {
    --checkbox-color: var(--primary-color);
    --checkbox-surround-hover: rgba(var(--primary-color-rgb), 0.12);
}

.note-editor .close {
    opacity: 1;
    color: var(--text-color-subdued);
    font-size: 20px;
    border-radius: 4px;
    width: 20px;
    height: 20px;
    transition: background-color 0.3s linear;
}
.note-editor .close:hover {
    background-color: rgba(0, 0, 0, 0.08);
    padding: 1px;
    font-size: 18px;
}


.note-modal {
    transition: opacity 2.8s var(--animation-spring-gentle), visibility 2.8s var(--animation-spring-gentle);
    opacity: 0;
    visibility: hidden;
}
.note-modal.open{
    display: flex;
    align-items: center;
    opacity: 1;
    visibility: visible;
}
.note-modal-content {
    margin: 30px auto;
    width: 100%;
}

@media (min-width: 576px) {
    .note-modal-content {
        max-width: 500px;
    }
}
@media (min-width: 992px) {
    .note-modal-content {
        max-width: 792px;
    }
}

note-modal-backdrop {
    background-color: var(--black);
    opacity: 0.6;
}
