/* ============================================================================
 * KiboFrame — Rich editor (Summernote) polish.
 *
 * One flat clean toolbar with hairline separators between groups, navy hover
 * and active state, rounded frame that flows seamlessly into the editor body.
 * Applies anywhere Summernote is rendered (i.e. wherever the shared rich-editor
 * init upgrades a <textarea class="js-rich-editor">).
 * ========================================================================== */

.note-editor.note-frame {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(13, 31, 66, .05);
}

/* Flat single-row toolbar surface, no per-group decorations. */
.note-editor.note-frame .note-toolbar {
    background: #fff;
    border-bottom: 1px solid #e8edf3;
    padding: .4rem .25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

/* Strip the default group framing; a hairline ::after between groups gives
   visual separation without adding bordered "pills". */
.note-editor.note-frame .note-toolbar > .note-btn-group {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 .45rem !important;
    display: inline-flex;
    align-items: center;
    gap: 1px;
    position: relative;
}
.note-editor.note-frame .note-toolbar > .note-btn-group:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 18%;
    bottom: 18%;
    width: 1px;
    background: #e8edf3;
}

/* Buttons: transparent base, on-brand hover/active, even sizing so the bar
   doesn't bounce between icon/dropdown widths. */
.note-editor.note-frame .note-toolbar .note-btn {
    border: 0 !important;
    background: transparent !important;
    color: #374151 !important;
    border-radius: 6px;
    padding: 0 .55rem;
    font-size: .85rem;
    font-weight: 500;
    line-height: 1;
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    box-shadow: none !important;
    transition: background .15s ease, color .15s ease;
}
.note-editor.note-frame .note-toolbar .note-btn:hover,
.note-editor.note-frame .note-toolbar .note-btn:focus,
.note-editor.note-frame .note-toolbar .note-btn:focus-visible {
    background: #eef2f7 !important;
    color: #0d1f42 !important;
    outline: none;
}
.note-editor.note-frame .note-toolbar .note-btn.active,
.note-editor.note-frame .note-toolbar .note-btn:active {
    background: #0d1f42 !important;
    color: #fff !important;
}
.note-editor.note-frame .note-toolbar .note-btn i {
    font-size: .95rem;
    line-height: 1;
}

/* Caret softening on every dropdown toggle. */
.note-editor.note-frame .note-toolbar .note-btn .note-icon-caret,
.note-editor.note-frame .note-toolbar .note-btn.dropdown-toggle::after {
    margin-left: .3rem;
    opacity: .55;
}

/* Text-labelled pickers (Style / Inter / 15) read as labels — let them size
   to content instead of looking like square icon buttons. */
.note-editor.note-frame .note-toolbar .note-style .note-btn,
.note-editor.note-frame .note-toolbar .note-fontname .note-btn,
.note-editor.note-frame .note-toolbar .note-fontsize .note-btn {
    min-width: auto;
    padding: 0 .6rem;
    font-weight: 500;
    color: #0d1f42 !important;
}

/* Current-colour swatch under the colour picker — slim underline strip so it
   sits flush with the icon instead of dominating the row. */
.note-editor.note-frame .note-toolbar .note-color .note-current-color-button .note-recent-color {
    display: inline-block;
    width: 16px;
    height: 4px;
    border-radius: 2px;
    margin-top: 2px;
    border: 1px solid rgba(0, 0, 0, .08);
}

/* Dropdowns: clean shadow, rounded items. */
.note-editor.note-frame .note-dropdown-menu {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 12px 28px -10px rgba(13, 31, 66, .18);
    padding: .35rem;
    margin-top: .35rem;
}
.note-editor.note-frame .note-dropdown-menu .note-dropdown-item,
.note-editor.note-frame .note-dropdown-menu a.dropdown-item {
    border-radius: 6px;
    padding: .35rem .6rem;
    color: #2d3748;
    font-size: .88rem;
}
.note-editor.note-frame .note-dropdown-menu .note-dropdown-item:hover,
.note-editor.note-frame .note-dropdown-menu a.dropdown-item:hover {
    background: #e8edf7;
    color: #0d1f42;
}
.note-editor.note-frame .note-dropdown-menu .note-dropdown-item.checked,
.note-editor.note-frame .note-dropdown-menu a.dropdown-item.active {
    background: #0d1f42;
    color: #fff;
}

/* Colour-picker palette swatches — slightly larger + rounded. */
.note-editor.note-frame .note-color-palette .note-color-btn {
    border-radius: 4px;
    margin: 1px;
    width: 18px;
    height: 18px;
}

/* Editing area — connect to toolbar visually. */
.note-editor.note-frame .note-editing-area { background: #fff; }
.note-editor.note-frame .note-editable {
    padding: 1.1rem 1.25rem;
    font-size: .95rem;
    line-height: 1.65;
    color: #2d3748;
    background: #fff;
}
.note-editor.note-frame .note-editable:focus { outline: none; }
.note-editor.note-frame .note-placeholder {
    color: #a0aec0;
    font-style: normal;
    padding: 1.1rem 1.25rem;
}

/* Status bar (resize handle) — subtle, on-brand. */
.note-editor.note-frame .note-statusbar {
    background: #f8fafc;
    border-top: 1px solid #eef0f5;
}
.note-editor.note-frame .note-statusbar .note-resizebar {
    padding: 4px 0;
    height: 12px;
}
.note-editor.note-frame .note-statusbar .note-icon-arrows-alt,
.note-editor.note-frame .note-statusbar .note-resizebar .note-icon-bar {
    color: #cbd5e0;
}
