/* =========================================================
   KEEP CANVAS — TEXT EDITOR COMPONENT
   Toolbar/header styling only expanded here. Editor body and
   status-bar behavior remain unchanged.
========================================================= */

.kc-text-editor-overlay{position:fixed;inset:0;z-index:99999;display:none;background:rgba(15,23,42,.42);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.kc-text-editor-overlay.is-open{display:flex;align-items:stretch;justify-content:stretch}
.kc-text-editor{position:relative;width:100%;height:100%;display:flex;flex-direction:column;background:#fff;color:#132238;overflow:hidden}

/* ========================= TOP BAR ========================= */
.kc-text-editor-topbar{min-height:72px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:9px 22px;border-bottom:1px solid #e4e8eb;background:#fff;flex-shrink:0}
.kc-text-editor-top-left{min-width:0;display:flex;align-items:center;gap:12px}
.kc-text-editor-back,.kc-text-editor-top-btn{width:42px;height:42px;padding:0;border:0;background:transparent;color:#172334;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;border-radius:10px}
.kc-text-editor-back:hover,.kc-text-editor-top-btn:hover{background:#f3f7f6}
.kc-text-editor-back svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.kc-text-editor-note-icon{width:42px;height:42px;border-radius:11px;background:#e9f7f2;color:#169a63;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.kc-text-editor-note-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.kc-text-editor-title-wrap{min-width:0}
.kc-text-editor-title{display:block;width:min(420px,45vw);padding:0;border:0;outline:0;background:transparent;color:#132238;font-size:20px;line-height:1.25;font-weight:700}
.kc-text-editor-title::placeholder{color:#98a2ad}
.kc-text-editor-save-status{margin-top:3px;display:flex;align-items:center;gap:6px;color:#7d8994;font-size:12px}
.kc-text-editor-save-dot{width:8px;height:8px;border-radius:50%;background:#24a978;transition:background .2s}.kc-text-editor-save-dot.is-dirty{background:#e3a008}.kc-text-editor-save-dot.is-saving{background:#169a63;animation:kc-editor-pulse 1s infinite}
@keyframes kc-editor-pulse{50%{opacity:.35}}
.kc-text-editor-top-actions{display:flex;align-items:center;gap:2px}
.kc-text-editor-top-btn svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.kc-text-editor-top-btn.is-active{color:#e8a400;background:#fff8df}
.kc-text-editor-top-more{gap:3px}.kc-text-editor-top-more span{width:4px;height:4px;border-radius:50%;background:currentColor}

/* ========================= MAIN TOOLBAR ========================= */
.kc-text-editor-toolbar{min-height:58px;display:flex;align-items:center;gap:3px;padding:7px 20px;border-bottom:1px solid #e4e8eb;background:#fff;overflow-x:auto;scrollbar-width:none;flex-shrink:0;white-space:nowrap}
.kc-text-editor-toolbar::-webkit-scrollbar{display:none}
.kc-text-editor-toolbar-group{display:flex;align-items:center;gap:1px;flex-shrink:0}
.kc-text-editor-toolbar-divider{width:1px;height:29px;margin:0 7px;background:#e2e6ea;flex:0 0 auto}
.kc-text-editor-tool,.kc-text-editor-select,.kc-text-editor-color,.kc-text-editor-highlight{height:40px;border:0;background:transparent;color:#172334;border-radius:9px;cursor:pointer;flex-shrink:0}
.kc-text-editor-tool{min-width:38px;padding:0 8px;font-size:17px;font-weight:500;display:inline-flex;align-items:center;justify-content:center}
.kc-text-editor-tool svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.kc-text-editor-tool:hover,.kc-text-editor-select:hover,.kc-text-editor-color:hover,.kc-text-editor-highlight:hover{background:#f2f6f5}
.kc-text-editor-tool.is-active,
.kc-tool-active{
color:#169a63;
/*
background:#e9f7f2; */
background:#000;

}
/* =========================================================
   INDENT / OUTDENT — ACTION BUTTONS
   These buttons are intentionally separate from all other
   toolbar tools and never receive a visual active background.
   ========================================================= */
.kc-text-editor-toolbar .kc-indent-action,
.kc-text-editor-toolbar .kc-outdent-action,
.kc-text-editor-toolbar .kc-indent-action:hover,
.kc-text-editor-toolbar .kc-outdent-action:hover,
.kc-text-editor-toolbar .kc-indent-action:active,
.kc-text-editor-toolbar .kc-outdent-action:active,
.kc-text-editor-toolbar .kc-indent-action:focus,
.kc-text-editor-toolbar .kc-outdent-action:focus,
.kc-text-editor-toolbar .kc-indent-action:focus-visible,
.kc-text-editor-toolbar .kc-outdent-action:focus-visible,
.kc-text-editor-toolbar .kc-indent-action.is-active,
.kc-text-editor-toolbar .kc-outdent-action.is-active,
.kc-text-editor-toolbar .kc-indent-action.kc-tool-active,
.kc-text-editor-toolbar .kc-outdent-action.kc-tool-active {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #172334 !important;
}

.kc-indent-action svg,
.kc-outdent-action svg {
    width: 21px !important;
    height: 21px !important;
    fill: currentColor !important;
    stroke: none !important;
}

.kc-tool-bold{font-weight:800;font-size:19px}.kc-tool-italic{font-style:italic;font-family:Georgia,serif;font-size:20px}.kc-tool-underline{text-decoration:underline;text-decoration-thickness:1.5px}.kc-tool-strike{text-decoration:line-through;text-decoration-thickness:1.5px}

.kc-text-editor-tool[data-editor-command="insertUnorderedList"] svg {
    width: 21px !important;
    height: 21px !important;
    fill: currentColor !important;
    stroke: none !important;
    stroke-width: 0 !important;
}

.kc-text-editor-tool[data-editor-command="insertOrderedList"] svg {
    width: 21px !important;
    height: 21px !important;
    fill: currentColor !important;
    stroke: none !important;
    stroke-width: 0 !important;
}

.kc-text-editor-tool[data-editor-command="checklist"] svg {
    width: 21px !important;
    height: 21px !important;
    fill: currentColor !important;
    stroke: none !important;
    stroke-width: 0 !important;
}

.kc-text-editor-tool[data-editor-command="indent"] svg {
    width: 21px !important;
    height: 21px !important;
    fill: currentColor !important;
    stroke: none !important;
    stroke-width: 0 !important;
}

.kc-text-editor-tool[data-editor-command="outdent"] svg {
    width: 21px !important;
    height: 21px !important;
    fill: currentColor !important;
    stroke: none !important;
    stroke-width: 0 !important;
}


.kc-text-editor-tool[data-editor-command="formatBlockQuote"] svg {
    width: 21px !important;
    height: 21px !important;
    fill: currentColor !important;
    stroke: none !important;
    stroke-width: 0 !important;
} 

.kc-text-editor-tool[data-editor-command="formatBlockCode"] svg {
    width: 21px !important;
    height: 21px !important;
    fill: currentColor !important;
    stroke: none !important;
    stroke-width: 0 !important;
} 

.kc-text-editor-select{min-width:102px;padding:0 9px 0 13px;display:inline-flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px;font-weight:600}
.kc-text-editor-select svg,.kc-text-editor-zoom svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.kc-text-editor-size{min-width:68px}
.kc-text-editor-color,.kc-text-editor-highlight{width:44px;display:inline-flex;align-items:center;justify-content:center;position:relative}
.kc-text-editor-color span{font-size:20px;font-weight:800;line-height:1;text-decoration:underline;text-decoration-thickness:3px;text-decoration-color:#169a63}
.kc-text-editor-color svg{width:12px;height:12px;margin-left:2px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.kc-text-editor-highlight svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}.kc-marker-line{position:absolute;bottom:6px;left:12px;right:12px;height:3px;border-radius:2px;background:#f1b80b}

/* ========================= TOOLBAR DROPDOWNS ========================= */
.kc-text-editor-dropdown-wrap{position:relative;display:flex;align-items:center;flex-shrink:0}
.kc-text-editor-dropdown{position:absolute;left:0;top:calc(100% + 7px);min-width:220px;padding:7px;border:1px solid #e2e7ea;border-radius:12px;background:#fff;box-shadow:0 16px 45px rgba(20,35,50,.16);z-index:30;display:none}
.kc-text-editor-dropdown.is-open{display:block}
/* Text size block — single-column menu; height/scroll rules remain below. */
.kc-style-menu{width:210px}.kc-font-menu{width:205px}

/* Text size block — narrow popup */
.kc-size-menu {
    width: 110px;
    min-width: 0;
    box-sizing: border-box;
    display: none;
    grid-template-columns: 1fr;
}

.kc-size-menu.is-open {
    display: grid;
}

.kc-style-option,.kc-font-menu button,.kc-size-menu button{width:100%;height:42px;border:0;border-radius:8px;background:transparent;color:#172334;display:flex;align-items:center;gap:12px;padding:0 10px;font:inherit;font-size:14px;text-align:left;cursor:pointer}
.kc-style-option:hover,.kc-font-menu button:hover,.kc-size-menu button:hover{background:#f3f7f6}.kc-style-option.is-selected,.kc-font-menu button.is-selected,.kc-size-menu button.is-selected{background:#e9f7f2}
.kc-style-option>svg,.kc-font-menu button>svg{margin-left:auto;width:18px;height:18px;fill:none;stroke:#169a63;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.kc-style-glyph{width:26px;flex:0 0 26px;font-weight:700;font-size:19px;color:#172334;display:inline-flex;align-items:center;justify-content:center}.kc-style-glyph small{font-size:9px;align-self:flex-start;margin-top:2px}.kc-style-glyph.h2,.kc-style-glyph.h3{font-size:15px}.kc-style-glyph.paragraph{font-size:23px}.kc-style-glyph.quote{font-size:25px}.kc-style-glyph.code{font-size:12px}
.kc-size-menu button{justify-content:center;text-align:center;padding:0}

.kc-text-editor-color-menu{position:absolute;left:50%;top:calc(100% + 7px);transform:translateX(-50%);width:185px;padding:11px;border:1px solid #e2e7ea;border-radius:12px;background:#fff;box-shadow:0 16px 45px rgba(20,35,50,.16);z-index:30;display:none}
.kc-text-editor-color-menu.is-open{display:block}.kc-color-menu-title{font-size:12px;font-weight:700;color:#66727e;margin:0 2px 9px}.kc-color-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:7px}.kc-color-grid button{width:26px;height:26px;border-radius:7px;border:1px solid rgba(23,35,52,.13);background:var(--swatch);cursor:pointer;box-shadow:inset 0 0 0 2px #fff}.kc-color-grid button:hover{transform:translateY(-1px);box-shadow:0 3px 8px rgba(20,35,50,.15),inset 0 0 0 2px #fff}

/* ========================= TOOLBAR MORE ========================= */
.kc-text-editor-toolbar-more{margin-left:4px;padding:0 13px;gap:7px;background:#f1f4f5;border-radius:10px;font-size:14px;font-weight:600}
.kc-text-editor-toolbar-more:hover{background:#e8edeb}
.kc-text-editor-toolbar-more b{font-weight:500}

.kc-more-dots{
    display:inline-flex;
    gap:3px;
    align-items:center;
}
.kc-more-dots i{
    width:3px;
    height:3px;
    border-radius:50%;
    background:currentColor;
    display:block
}

.kc-text-editor-command-panel{position:absolute;right:20px;top:132px;width:min(520px,calc(100% - 30px));max-height:min(610px,calc(100% - 180px));overflow:auto;padding:13px;display:none;grid-template-columns:1fr 1fr;gap:14px;border:1px solid #e1e6e9;border-radius:15px;background:#fff;box-shadow:0 20px 55px rgba(16,24,40,.18);z-index:20}
.kc-text-editor-command-panel.is-open{display:grid}.kc-command-panel-column{min-width:0}.kc-command-panel-heading{font-size:14px;font-weight:800;color:#172334;padding:8px 10px 10px}.kc-command-panel-column>button{width:100%;min-height:40px;border:0;border-radius:8px;background:transparent;color:#172334;display:flex;align-items:center;gap:10px;padding:0 10px;font:inherit;font-size:14px;text-align:left;cursor:pointer}.kc-command-panel-column>button:hover{background:#f3f7f6}.kc-command-panel-secondary{border-left:1px solid #e6eaed;padding-left:7px}.kc-panel-icon{width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 22px;color:#172334}.kc-panel-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}.kc-panel-icon.text-icon{font-size:14px;font-weight:700}.kc-command-panel-search{border-bottom-left-radius:8px}.kc-command-panel-rule{height:1px;background:#e5e9ec;margin:8px 10px}

/* ========================= EXISTING NOTE OPTIONS ========================= */
.kc-text-editor-more-menu{position:absolute;right:20px;top:132px;width:min(330px,calc(100% - 30px));padding:14px;border:1px solid #e3e8eb;border-radius:14px;background:#fff;box-shadow:0 18px 50px rgba(16,24,40,.16);display:none;z-index:25}.kc-text-editor-more-menu.is-open{display:block}
.kc-text-editor-more-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.kc-text-editor-more-head button{width:32px;height:32px;border:0;border-radius:8px;background:transparent;font-size:22px;cursor:pointer}.kc-text-editor-more-row{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:9px 0;font-size:14px}.kc-text-editor-more-row select{min-width:145px;padding:8px 10px;border:1px solid #dfe5e8;border-radius:8px;background:#fff}.kc-text-editor-more-check{display:flex;align-items:center;gap:9px;padding:8px 0;font-size:14px}.kc-text-editor-more-check input{accent-color:#169a63}

/* ========================= BODY / STATUS — UNCHANGED ========================= */
.kc-text-editor-main{flex:1;min-height:0;overflow-y:auto;background:#fff}
.kc-text-editor-content{width:min(860px,calc(100% - 64px));min-height:100%;margin:0 0 0 32px;padding:55px 0 90px;outline:none;color:#172334;font-family:Inter,Arial,sans-serif;font-size:17px;line-height:1.7;word-break:break-word}
.kc-text-editor-content:empty::before{content:attr(data-placeholder);color:#a2abb4;pointer-events:none}.kc-text-editor-content:focus:empty::before{color:#b2bac2}
.kc-text-editor-content p{margin:0 0 12px}.kc-text-editor-content h1,.kc-text-editor-content h2,.kc-text-editor-content h3{margin:0 0 16px;line-height:1.25}

/* =========================================================
   QUOTE BLOCK — KEEP CANVAS NATIVE BLOCK
   Deliberately scoped to [data-block-type="quote"] so the
   editor's general background never controls quote appearance.
   ========================================================= */
.kc-text-editor-content .kc-editor-block[data-block-type="quote"] .kc-editor-block-body{
    position:relative;
    margin:18px 0;
    padding:18px 22px 18px 56px;
    border:1px solid #dfe9e4;
    border-left:4px solid #169a63;
    border-radius:8px;
    background:#fcfcfc;
    color:#172334;
    font-size:1em;
    line-height:1.7;
    box-sizing:border-box;
}

.kc-text-editor-content .kc-editor-block[data-block-type="quote"] .kc-editor-block-body::before{
    content:"\201C";
    position:absolute;
    left:18px;
    top:8px;
    color:#169a63;
    font-family:Georgia,"Times New Roman",serif;
    font-size:38px;
    font-weight:700;
    line-height:1;
    pointer-events:none;
    user-select:none;
}

.kc-text-editor-content .kc-editor-block[data-block-type="quote"] .kc-editor-block-body:focus{
    outline:none;
    border-color:#c9ded5;
  /*  box-shadow:0 0 0 3px rgba(22,154,99,.08); */
}

.kc-text-editor-content .kc-editor-block[data-block-type="quote"] .kc-editor-block-body p:last-child{
    margin-bottom:0;
}

/* Quote lines use KeepCanvas indentation instead of nested blockquotes. */
.kc-text-editor-content .kc-editor-block[data-block-type="quote"] .kc-quote-line{
    display:block;
    margin-top:0;
    margin-right:0;
    margin-bottom:0;
    margin-left:0;
    padding:0;
    min-height:1.7em;
    box-sizing:border-box;
}

.kc-text-editor-content .kc-editor-block[data-block-type="quote"] .kc-quote-line > br:only-child{
    display:block;
}

/* Legacy notes: once loaded, quote blocks no longer depend on <blockquote>. */
.kc-text-editor-content .kc-editor-block[data-block-type="quote"] blockquote{
    margin:0;
    padding:0;
    border:0;
    background:transparent;
    color:inherit;
}

.kc-text-editor-content pre{margin:16px 0;padding:16px;border-radius:10px;background:#f4f6f8;overflow:auto;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.kc-text-editor-content img{max-width:100%;height:auto;border-radius:12px}
.kc-text-editor-statusbar{min-height:46px;padding:0 18px;display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:1px solid #e5e9ed;background:#fff;color:#7c8792;font-size:12px;flex-shrink:0}
.kc-text-editor-stats,.kc-text-editor-status-right{display:flex;align-items:center;gap:10px}.kc-text-editor-stats strong{color:#53606c;font-weight:700}.kc-text-editor-status-divider{width:1px;height:14px;background:#dfe4e8}
.kc-text-editor-saved-icon{width:18px;height:18px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#e8f7f1;color:#169a63;font-size:11px;font-weight:800}.kc-text-editor-saved-icon.is-dirty{background:#fff4d6;color:#b97900}
.kc-text-editor-save-btn{height:30px;padding:0 14px;border:0;border-radius:8px;background:#169a63;color:#fff;font-weight:700;cursor:pointer}.kc-text-editor-save-btn:hover{background:#118254}.kc-text-editor-save-btn:disabled{opacity:.6;cursor:wait}.kc-text-editor-zoom{height:30px;padding:0 7px;border:0;background:transparent;color:#66727e;display:inline-flex;align-items:center;gap:5px;cursor:pointer}
body.kc-text-editor-open{overflow:hidden}

/* =========================================================
   QUOTE BLOCK — HIDE OUTER EDITOR BLOCK
   Keep only the Quote box visible when active.
   ========================================================= */

.kc-editor-block[data-block-type="quote"].is-active {
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Remove the general active-block green indicator */
.kc-editor-block[data-block-type="quote"].is-active::before {
    display: none !important;
}

/* ========================= RESPONSIVE ========================= */
@media (max-width:1100px){
  .kc-text-editor-toolbar{overflow-x:auto}
}
@media (max-width:700px){
  .kc-text-editor-topbar{min-height:62px;padding:8px 10px;gap:8px}.kc-text-editor-top-left{gap:7px}.kc-text-editor-back,.kc-text-editor-top-btn{width:38px;height:38px}.kc-text-editor-note-icon{width:35px;height:35px;border-radius:9px}.kc-text-editor-note-icon svg{width:20px;height:20px}.kc-text-editor-title{width:min(210px,43vw);font-size:16px}.kc-text-editor-save-status{font-size:10px}
  .kc-text-editor-toolbar{min-height:52px;padding:6px 9px;gap:2px}.kc-text-editor-tool,.kc-text-editor-select,.kc-text-editor-color,.kc-text-editor-highlight{height:38px}.kc-text-editor-select{min-width:78px}.kc-text-editor-size{min-width:58px}.kc-toolbar-history{display:flex}.kc-text-editor-command-panel{right:9px;top:115px;width:min(430px,calc(100% - 18px));grid-template-columns:1fr;max-height:calc(100% - 170px)}.kc-command-panel-secondary{border-left:0;border-top:1px solid #e6eaed;padding-left:0;padding-top:8px}.kc-text-editor-more-menu{right:10px;top:114px}.kc-text-editor-toolbar-more{padding:0 11px}
  .kc-text-editor-content{width:calc(100% - 32px);padding:30px 0 70px;font-size:16px;line-height:1.65}.kc-text-editor-statusbar{min-height:48px;padding:0 10px;font-size:10px}.kc-text-editor-stats{gap:6px}.kc-text-editor-stats .kc-text-editor-status-divider:last-of-type,.kc-text-editor-stats span:last-child{display:none}.kc-text-editor-status-right{gap:6px}.kc-text-editor-zoom{display:none}.kc-text-editor-save-btn{padding:0 12px}
}


/* =========================================================
   KEEP CANVAS — BLOCK EDITOR FOUNDATION
   Block insertion bar + long-press block menu.
   ========================================================= */
.kc-text-editor-content{position:relative;}
.kc-editor-block{position:relative;margin:0 0 14px;padding:2px 0;border:1px solid transparent;border-radius:12px;transition:border-color .16s,background .16s,box-shadow .16s;}
.kc-editor-block.is-active{border-color:#dcebe5;background:#fbfefd;box-shadow:0 2px 12px rgba(22,154,99,.05);}
/*
.kc-editor-block.is-active::before{
    content:"";
    position:absolute;left:-6px;top:8px;bottom:8px;width:3px;
    border-radius:3px;
    background:#169a63;opacity:1;} */
    
.kc-editor-block-body{outline:none;min-height:28px;padding:7px 10px;line-height:1.7;}
.kc-editor-block-body:empty::before{content:attr(data-placeholder);color:#a2abb4;pointer-events:none;}
.kc-editor-block[data-block-type="image"] .kc-editor-block-body,
.kc-editor-block[data-block-type="table"] .kc-editor-block-body,
.kc-editor-block[data-block-type="divider"] .kc-editor-block-body,
.kc-editor-block[data-block-type="pagebreak"] .kc-editor-block-body{padding:0;}
.kc-editor-block img{display:block;max-width:100%;height:auto;border-radius:12px;}
.kc-editor-block[data-block-type="table"] table{width:100%;border-collapse:collapse;margin:0;}
.kc-editor-block[data-block-type="table"] td,.kc-editor-block[data-block-type="table"] th{border:1px solid #dfe5e8;padding:9px 10px;min-width:80px;}
/* KeepCanvas code blocks: compact language selector, numbered editable source, theme-safe surfaces. */
.kc-editor-block[data-block-type="code"] .kc-editor-block-body{padding:0;min-height:0;overflow:hidden;border:1px solid #293443;border-radius:12px;background:#111820;color:#e8edf4;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;line-height:1.6;}
.kc-editor-block[data-block-type="code"] .kc-code-card{display:block;background:#111820;color:#e8edf4;border-radius:11px;overflow:hidden;}
.kc-code-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 12px;border-bottom:1px solid rgba(255,255,255,.10);background:#202a36;font-family:Inter,Arial,sans-serif;}
.kc-code-language,.kc-code-title{min-width:0;border:1px solid #435064;border-radius:7px;background:#17212d;color:#edf2f7;padding:7px 9px;font:600 12px Inter,Arial,sans-serif;outline:none;}
.kc-code-language{width:auto;max-width:145px;flex:0 0 auto;}
.kc-code-title{flex:1;min-width:125px;}
.kc-code-title::placeholder{color:#8290a1;}
.kc-code-actions{display:flex;align-items:center;gap:6px;margin-left:auto;}
.kc-code-theme,.kc-code-copy{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:32px;padding:6px 9px;border:1px solid #435064;border-radius:7px;background:#2a3543;color:#dce5ee;font:600 12px Inter,Arial,sans-serif;cursor:pointer;}
.kc-code-copy{background:#354253;}
.kc-code-copy svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}
.kc-editor-block[data-block-type="code"] .kc-code-pre,
.kc-text-editor-content .kc-editor-block[data-block-type="code"] pre.kc-code-pre{display:flex;align-items:stretch;gap:0;margin:0;padding:14px 0;overflow:auto;background:#111820!important;color:#e8edf4!important;white-space:pre;tab-size:4;font:13px/1.7 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;border:0;border-radius:0;}
.kc-code-gutter{display:block;flex:0 0 42px;min-width:42px;padding:0 10px 0 0;text-align:right;white-space:pre;user-select:none;color:#718096;border-right:1px solid #293443;margin-right:14px;box-sizing:border-box;overflow:hidden;}
.kc-code-source{display:block;flex:1;min-width:0;min-height:72px;padding:0 16px 0 0;outline:none;white-space:pre;overflow-wrap:normal;word-break:normal;color:inherit!important;background:transparent!important;border:0;}
.kc-code-source:empty::before{content:attr(data-placeholder);color:#788697;pointer-events:none;}
.kc-editor-block[data-block-type="code"].kc-code-theme-dark .kc-editor-block-body,
.kc-editor-block[data-block-type="code"].kc-code-theme-dark .kc-code-card,
.kc-editor-block[data-block-type="code"].kc-code-theme-dark .kc-code-pre,
.kc-editor-block[data-block-type="code"].kc-code-theme-dark .kc-code-source{background-color:#111820!important;color:#e8edf4!important;}
.kc-editor-block[data-block-type="code"].kc-code-theme-light .kc-editor-block-body{background:#f5f7fa;border-color:#dce3eb;color:#253142;}
.kc-editor-block[data-block-type="code"].kc-code-theme-light .kc-code-card{background:#f5f7fa;color:#253142;}
.kc-editor-block[data-block-type="code"].kc-code-theme-light .kc-code-toolbar{background:#edf1f5;border-bottom-color:#dce3eb;}
.kc-editor-block[data-block-type="code"].kc-code-theme-light .kc-code-language,.kc-editor-block[data-block-type="code"].kc-code-theme-light .kc-code-title{background:#fff;border-color:#d2dae3;color:#253142;}
.kc-editor-block[data-block-type="code"].kc-code-theme-light .kc-code-title::placeholder{color:#8995a4;}
.kc-editor-block[data-block-type="code"].kc-code-theme-light .kc-code-theme,.kc-editor-block[data-block-type="code"].kc-code-theme-light .kc-code-copy{background:#fff;border-color:#d2dae3;color:#334155;}
.kc-editor-block[data-block-type="code"].kc-code-theme-light .kc-code-pre,
.kc-text-editor-content .kc-editor-block[data-block-type="code"].kc-code-theme-light pre.kc-code-pre{background:#f5f7fa!important;color:#253142!important;}
.kc-editor-block[data-block-type="code"].kc-code-theme-light .kc-code-gutter{color:#8995a4;border-right-color:#dce3eb;}
.kc-editor-block[data-block-type="code"].kc-code-theme-light .kc-code-source{color:#253142!important;background:transparent!important;}
@media(max-width:560px){.kc-code-toolbar{gap:7px;padding:9px}.kc-code-language{max-width:112px}.kc-code-title{flex-basis:100%;order:3}.kc-code-actions{margin-left:auto}.kc-code-pre{font-size:12px}.kc-code-gutter{flex-basis:32px;min-width:32px;margin-right:10px;padding-right:7px}.kc-code-source{padding-right:12px;}}
/* Quote appearance is defined in the dedicated QUOTE BLOCK section above. */
.kc-editor-block[data-block-type="checklist"] .kc-editor-block-body{padding:9px 10px;}
.kc-editor-block[data-block-type="divider"] .kc-editor-block-body{height:1px;margin:12px 0;background:#dfe5e8;min-height:1px;}
.kc-editor-block[data-block-type="pagebreak"] .kc-editor-block-body{height:56px;border-top:1px dashed #b8c2c9;border-bottom:1px dashed #b8c2c9;display:flex;align-items:center;justify-content:center;color:#8a949d;font-size:11px;text-transform:uppercase;letter-spacing:.08em;}
.kc-editor-block[data-block-type="file"] .kc-editor-block-body,.kc-editor-block[data-block-type="link"] .kc-editor-block-body{padding:12px 14px;border:1px solid #e1e7ea;border-radius:2px;background:#fff;}

.kc-text-editor-block-insert-bar{position:relative;display:flex;align-items:center;gap:8px;padding:9px 12px;margin:0 14px 8px;border:1px solid #e4e9ec;border-radius:20px;background:rgba(255,255,255,.96);box-shadow:0 10px 28px rgba(16,24,40,.09);flex-shrink:0;overflow-x:auto;scrollbar-width:none;z-index:18;}
.kc-text-editor-block-insert-bar::-webkit-scrollbar{display:none;}
.kc-block-add-main,.kc-block-insert-btn{border:0;cursor:pointer;font:inherit;display:flex;flex-direction:column;align-items:center;justify-content:center;flex:0 0 66px;gap:4px;color:#26333f;background:transparent;border-radius:13px;min-height:58px;}
.kc-block-add-main{width:58px;height:58px;flex-basis:58px;border-radius:50%;background:#169a63;color:#fff;box-shadow:0 5px 13px rgba(22,154,99,.22);}
.kc-block-add-plus{font-size:31px;font-weight:300;line-height:1;}
.kc-block-insert-btn:hover{background:#f3f7f6;}
.kc-block-insert-btn>span:last-child{font-size:11px;font-weight:650;line-height:1;}
.kc-block-insert-icon{width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:#edf8f4;color:#169a63;font-size:20px;font-weight:800;}
.kc-block-insert-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.kc-block-insert-image .kc-block-insert-icon{background:#edf5ff;color:#3177d9}.kc-block-insert-link .kc-block-insert-icon{background:#f3edff;color:#7746d5}.kc-block-insert-table .kc-block-insert-icon{background:#fff3df;color:#db8b0b}.kc-block-insert-code .kc-block-insert-icon{background:#fff0f0;color:#d83b3b}.kc-block-insert-more .kc-block-insert-icon{background:#f0f2f4;color:#59636d;gap:3px}.kc-block-insert-more .kc-block-insert-icon i{width:4px;height:4px;border-radius:50%;background:currentColor;}
.kc-block-insert-divider{width:1px;height:42px;background:#e3e8eb;flex:0 0 1px;margin:0 2px;}
.kc-block-more-menu{position:absolute;right:10px;bottom:calc(100% + 10px);width:210px;padding:9px;border:1px solid #e2e7ea;border-radius:14px;background:#fff;box-shadow:0 18px 48px rgba(16,24,40,.17);display:none;z-index:40;}
.kc-block-more-menu.is-open{display:grid;grid-template-columns:1fr 1fr;gap:4px;}
.kc-block-more-title{grid-column:1/-1;padding:5px 8px 8px;font-size:12px;font-weight:800;color:#65717c;}
.kc-block-more-menu button{min-height:38px;border:0;border-radius:8px;background:transparent;text-align:left;padding:0 9px;color:#172334;font:inherit;font-size:12px;cursor:pointer;}
.kc-block-more-menu button:hover{background:#f3f7f6;}

.kc-text-editor-block-menu{position:fixed;width:210px;padding:7px;border:1px solid #e1e7ea;border-radius:14px;background:#fff;box-shadow:0 18px 50px rgba(16,24,40,.2);display:none;z-index:1000;}
.kc-text-editor-block-menu.is-open{display:block;}
.kc-text-editor-block-menu button{width:100%;min-height:38px;border:0;border-radius:8px;background:transparent;text-align:left;padding:0 11px;color:#172334;font:inherit;font-size:13px;cursor:pointer;}
.kc-text-editor-block-menu button:hover{background:#f3f7f6;}
.kc-text-editor-block-menu .kc-block-menu-danger{color:#c62828;}
.kc-block-menu-rule{height:1px;background:#e7ebed;margin:5px 6px;}

@media (max-width:700px){
 .kc-text-editor-block-insert-bar{margin:0 10px 7px;padding:8px 9px;border-radius:19px;gap:5px;}
 .kc-block-add-main{width:54px;height:54px;flex-basis:54px;}
 .kc-block-insert-btn{flex-basis:62px;min-height:55px;}
 .kc-block-insert-icon{width:34px;height:34px;}
 .kc-block-insert-btn>span:last-child{font-size:10px;}
 .kc-block-more-menu{right:5px;width:215px;}
 .kc-text-editor-block-menu{width:205px;max-width:calc(100vw - 20px);}
 .kc-editor-block{margin-bottom:10px;}
 .kc-editor-block-body{padding:6px 8px;}
}

/* =========================================================
   BLOCK INSERT BAR — COMPACT / FIXED ACTIONS
   + Add New is visual-only. The middle track slides behind
   the fixed More button. No hover styling is used.
   ========================================================= */
.kc-text-editor-block-insert-bar{
  position:relative;
  display:flex;
  align-items:center;
  gap:0;
  margin:0 18px 10px;
  padding:7px 7px 7px 8px;
  min-height:80px;
  border:1px solid #e1e7e8;
  border-radius:14px;
  background:rgba(255,255,255,.98);
  box-shadow:0 8px 28px rgba(20,35,50,.08);
  overflow:hidden;
  flex-shrink:0;
  z-index:18;
}
.kc-block-add-main{
  width:62px;
  flex:0 0 62px;
  min-height:66px;
  border:0;
  border-radius:0;
  background:transparent;
  color:#172334;
  box-shadow:none;
  cursor:default;
  pointer-events:none;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
}
.kc-block-add-plus{
  width:36px;
  height:36px;
  border-radius:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:transparent;
  color:#172334;
  font-size:34px;
  font-weight:300;
  line-height:1;
  /*box-shadow:0 4px 12px rgba(22,154,99,.18);*/
}
.kc-block-add-label{
  display:block;
  color:#26333f;
  font-size:10px;
  font-weight:650;
  line-height:1;
  white-space:nowrap;
}
.kc-block-insert-divider{
  width:1px;
  height:48px;
  margin:0 4px;
  background:#e3e8eb;
  flex:0 0 1px;
}
.kc-block-insert-viewport{
  min-width:0;
  flex:1 1 auto;
  height:66px;
  overflow:hidden;
}
.kc-block-insert-track{
  height:66px;
  width:max-content;
  display:flex;
  align-items:center;
  gap:2px;
  transform:translate3d(0,0,0);
  transition:transform .28s cubic-bezier(.22,.61,.36,1);
  will-change:transform;
}
.kc-text-editor-block-insert-bar.show-more .kc-block-insert-track{
  transform:translate3d(var(--kc-block-track-shift, -350px),0,0);
}
.kc-block-insert-btn{
  width:60px;
  flex:0 0 60px;
  height:62px;
  min-height:62px;
  padding:2px 1px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:#26333f;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  font:inherit;
  -webkit-tap-highlight-color:transparent;
  transition:transform .12s ease;
}
.kc-block-insert-btn:hover{background:transparent;}
.kc-block-insert-btn:active{transform:scale(.91);}
.kc-block-insert-btn:focus-visible{outline:2px solid rgba(22,154,99,.28);outline-offset:-2px;}
.kc-block-insert-btn>span:last-child{
  font-size:10px;
  font-weight:650;
  line-height:1;
  white-space:nowrap;
}
.kc-block-insert-icon{
  width:34px;
  height:34px;
  border-radius:9px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#edf8f4;
  color:#169a63;
  font-size:19px;
  font-weight:800;
}
.kc-block-insert-icon svg{
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.kc-block-insert-image .kc-block-insert-icon{background:#edf5ff;color:#3177d9}
.kc-block-insert-link .kc-block-insert-icon{background:#f3edff;color:#7746d5}
.kc-block-insert-table .kc-block-insert-icon{background:#fff3df;color:#db8b0b}
.kc-block-insert-code .kc-block-insert-icon{background:#fff0f0;color:#d83b3b}
.kc-block-insert-file .kc-block-insert-icon{background:#eef4ff;color:#4169b4}
.kc-block-insert-quote .kc-block-insert-icon{background:#f3edff;color:#7746d5}
.kc-block-insert-checklist .kc-block-insert-icon{background:#edf8f4;color:#169a63}
.kc-block-insert-divider-btn .kc-block-insert-icon{background:#f2f3f4;color:#59636d}
.kc-block-insert-datetime .kc-block-insert-icon{background:#fff3df;color:#db8b0b}
.kc-block-insert-pagebreak .kc-block-insert-icon{background:#f2f3f4;color:#59636d}

.kc-block-insert-more{
  width:54px;
  flex:0 0 54px;
  height:54px;
  min-height:54px;
  margin-left:3px;
  position:relative;
  z-index:3;
  border-radius:6px;
  /*background:#f1f3f4;*/
}
/*
.kc-block-insert-more:hover{background:#f1f3f4;} */
.kc-block-insert-more .kc-block-insert-icon{
  width:30px;
  height:30px;
  border-radius:6px;
  background:#f1f3f4;
  color:#59636d;
}
.kc-block-insert-more .kc-block-insert-icon svg{
  width:18px;
  height:18px;
  stroke-width:2;
}

/*
.kc-block-insert-more:active{background:#e9ecee;}*/

.kc-block-more-menu{display:none !important;}

@media (max-width:700px){
  .kc-text-editor-block-insert-bar{
    margin:0 10px 9px;
    padding:6px 6px 6px 7px;
    min-height:78px;
    border-radius:12px;
  }
  .kc-block-add-main{
    width:58px;
    flex-basis:58px;
    min-height:34px;
  }
  .kc-block-add-plus{
    /*background:#f7f7f7 !important;*/
    width:36px;
    height:36px;
    font-size:36px;
  }
  .kc-block-add-label{font-size:10px;}
  .kc-block-insert-divider{height:48px;margin:0 3px;}
  .kc-block-insert-viewport{height:64px;}
  .kc-block-insert-track{height:64px;gap:0;}
  .kc-block-insert-btn{
    width:55px;
    flex-basis:58px;
    height:60px;
    min-height:60px;
  }
  .kc-block-insert-icon{
    width:32px;
    height:32px;
    border-radius:6px;
  }
  .kc-block-insert-icon svg{width:19px;height:19px;}
  .kc-block-insert-btn>span:last-child{font-size:10px;}
  .kc-block-insert-more{
    width:58px;
    flex-basis:58px;
    height:58px;
    min-height:32px;
    margin-left:3px;
  }
  .kc-block-insert-more .kc-block-insert-icon{
    width:34px;
    height:34px;
  }
  .kc-block-insert-more .kc-block-insert-icon svg{
    width:18px;
    height:18px;
  }
}

/* =========================================================
   TEXT BLOCK — REFERENCE CARD
   ========================================================= */
.kc-editor-block[data-block-type="text"]{
  margin:0 0 16px;
  padding:0;
  border:1px solid transparent;
  border-radius:7px;
  background:#fff;
  box-shadow:none;
  transition:border-color .16s ease,box-shadow .16s ease,transform .12s ease;
}
.kc-editor-block[data-block-type="text"].is-active{
  border-color:#bfbfbf;
  background:#fff;
  box-shadow:0 5px 18px rgba(20,35,50,.055);
}
.kc-editor-block[data-block-type="text"].show-border-box{

  border-color:#bfbfbf;
/*  box-shadow:0 2px 7px rgba(20,35,50,.035); */
}
.kc-editor-block[data-block-type="text"].is-active::before{display:none;}
.kc-editor-block[data-block-type="text"] .kc-editor-block-body{
  min-height:52px;
  padding:14px 16px;
  font-size:24px;
  line-height:1.55;
  color:#172334;
  border-radius:7px;
}
.kc-editor-block[data-block-type="text"] .kc-editor-block-body:empty::before{
  content:"Start typing here...";
  color:#172334;
  opacity:.56;
}
.kc-editor-block[data-block-type="text"] .kc-editor-block-body:focus:empty::before{color:#172334;}

.kc-block-border-toggle{
  display:flex !important;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.kc-block-border-toggle > span{
  flex:1 1 auto;
}
.kc-block-border-checkbox{
  width:18px;
  height:18px;
  margin:0 2px 0 0;
  accent-color:#169a63;
  flex:0 0 auto;
  pointer-events:none;
}

@media (max-width:700px){
  .kc-editor-block[data-block-type="text"]{border-radius:7px;margin-bottom:14px;}
  .kc-editor-block[data-block-type="text"] .kc-editor-block-body{
    min-height:38px;
    padding:12px 14px;
    font-size:22px;
    border-radius:1px;
  }
}


/* Temporary cursor-only canvas point: no visible box or placeholder text. */
.kc-editor-block.is-canvas-placeholder,
.kc-editor-block.is-canvas-placeholder.is-active,
.kc-editor-block.is-canvas-placeholder.show-border-box {
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
}
.kc-editor-block.is-canvas-placeholder::before { display: none !important; }
.kc-editor-block.is-canvas-placeholder .kc-editor-block-body {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
.kc-editor-block.is-canvas-placeholder .kc-editor-block-body:empty::before { content: none !important; }

/* Responsive content alignment fix — keeps desktop's 32px left alignment unchanged. */
@media (max-width:1100px){
  .kc-text-editor-content{
    width:calc(100% - 32px);
    margin-left:auto;
    margin-right:auto;
    box-sizing:border-box;
  }
}

/* Floating formatting menus escape the horizontally scrolling toolbar. */
.kc-text-editor-dropdown.kc-dropdown-floating {
    position: fixed;
    right: auto;
    bottom: auto;
    z-index: 100050;
    max-height: min(70vh, 420px);
    overflow-y: auto;
}


/* Active-only toolbar state — no hover color on inactive formatting tools. */
.kc-text-editor-tool:not(.is-active):hover,
.kc-text-editor-select:hover,
.kc-text-editor-color:hover,
.kc-text-editor-highlight:hover {
    background: transparent;
}

/* Color menus use the same floating layer as the other toolbar dropdowns. */
.kc-text-editor-color-menu.kc-dropdown-floating {
    position: fixed;
    left: auto;
    top: auto;
    transform: none;
    z-index: 100050;
}

/* =========================================================
   KEEP CANVAS — CHECKLIST
   Checkbox is non-editable so tapping it only changes its
   checked state; the list text remains normal editable content.
   ========================================================= */
.kc-editor-block-body ul.kc-checklist {
    list-style: none;
    margin: 0;
    padding-left: 0;
}

.kc-editor-block-body ul.kc-checklist > li.kc-checklist-item {
    list-style: none;
    position: relative;
    display: block;
    margin: 3px 0;
    padding: 1px 0 1px 27px;
    min-height: 20px;
    line-height: 1.45;
    box-sizing: border-box;
}

.kc-editor-block-body ul.kc-checklist > li.kc-checklist-item > .kc-checklist-text {
    display: inline;
    min-height: 20px;
    outline: none;
    white-space: pre-wrap;
}

.kc-editor-block-body .kc-checklist-box {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border: 1.6px solid #8d98a3;
    border-radius: 4px;
    background: #fff;
    color: #fff;
    position: absolute;
    left: 0;
    top: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    box-sizing: border-box;
    transition: background .14s ease, border-color .14s ease, color .14s ease;
}

.kc-editor-block-body .kc-checklist-box[aria-checked="true"]::before {
    content: "\2713";
    display: block;
    line-height: 1;
}

.kc-editor-block-body .kc-checklist-box:hover {
    border-color: #169a63;
}

.kc-editor-block-body .kc-checklist-box[aria-checked="true"] {
    border-color: #169a63;
    background: #169a63;
    color: #fff;
}

.kc-editor-block-body .kc-checklist-item.is-checked {
    color: inherit;
}

/* Checked items keep the same text appearance; only the checkbox changes. */
.kc-editor-block-body .kc-checklist-item.is-checked > :not(.kc-checklist-box) {
    text-decoration: none;
}


/* Mobile code toolbar: keep language, title, theme and copy on one compact row. */
@media (max-width: 640px) {
    .kc-code-toolbar {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 5px;
        padding: 7px;
        min-width: 0;
    }

    .kc-code-language {
        order: 1;
        flex: 0 1 72px;
        width: 72px;
        min-width: 58px;
        max-width: 76px;
        padding: 6px 5px;
        font-size: 11px;
    }

    .kc-code-title {
        order: 2;
        flex: 1 1 70px;
        width: auto;
        min-width: 0;
        padding: 6px 7px;
        font-size: 11px;
        text-overflow: ellipsis;
    }

    .kc-code-title::placeholder {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .kc-code-actions {
        order: 3;
        flex: 0 0 auto;
        gap: 4px;
        margin-left: 0;
    }

    .kc-code-theme,
    .kc-code-copy {
        min-height: 29px;
        padding: 5px 7px;
        gap: 4px;
        font-size: 11px;
        white-space: nowrap;
    }

    .kc-code-copy svg {
        width: 13px;
        height: 13px;
    }
}

@media (max-width: 380px) {
    .kc-code-language {
        flex-basis: 72px;
        width: 72px;
        min-width: 58px;
        max-width: 76px;
    }

    .kc-code-theme,
    .kc-code-copy {
        padding-right: 5px;
        padding-left: 5px;
    }
}


/* =========================================================
   IMAGE BLOCK — EMPTY PLACEHOLDER + FLOATING IMAGE PICKER
   ========================================================= */
.kc-editor-block[data-block-type="image"] .kc-editor-block-body.kc-image-block-body{
    position:relative;
    display:block;
    min-height:220px;
    padding:0;
    overflow:hidden;
    /* Keep the image frame invisible unless this block is active or
       the user explicitly enables Border - box in the block menu. */
    border:1px solid transparent;
    border-radius:2px;
    background:#fafafa;
    box-sizing:border-box;
}
.kc-editor-block[data-block-type="image"].is-active .kc-editor-block-body.kc-image-block-body,
.kc-editor-block[data-block-type="image"].show-border-box .kc-editor-block-body.kc-image-block-body{
    border-color:#cfd4d8;
}
.kc-editor-block[data-block-type="image"] .kc-editor-block-body.kc-image-empty{
    display:flex;
    align-items:center;
    justify-content:center;
    aspect-ratio:16 / 9;
}
.kc-editor-block[data-block-type="image"] .kc-image-placeholder-art{
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    pointer-events:none;
    background:linear-gradient(180deg,#fff 0%,#f5f5f5 100%);
}
.kc-editor-block[data-block-type="image"] .kc-image-placeholder-art svg{
    display:block;
    width:100%;
    height:100%;
}
.kc-editor-block[data-block-type="image"] .kc-image-placeholder-art circle{
    fill:#dedede;
}
.kc-editor-block[data-block-type="image"] .kc-image-placeholder-art path{
    fill:#e2e2e2;
}
.kc-editor-block[data-block-type="image"] .kc-image-placeholder-art path:last-child{
    fill:#f0f0f0;
}
.kc-editor-block[data-block-type="image"] .kc-editor-block-body > img{
    display:block;
    width:100%;
    max-width:100%;
    max-height:560px;
    height:auto;
    margin:0;
    object-fit:contain;
    border-radius:0;
}
.kc-editor-block[data-block-type="image"] .kc-image-add-button{
    position:absolute;
    z-index:2;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    width:54px;
    height:54px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0;
    border:1px solid rgba(22,154,99,.25);
    border-radius:50%;
    background:rgba(255,255,255,.96);
    color:#169a63;
    box-shadow:0 5px 18px rgba(16,24,40,.18);
    cursor:pointer;
    -webkit-tap-highlight-color:transparent;
    transition:transform .15s ease,background .15s ease,box-shadow .15s ease;
}
.kc-editor-block[data-block-type="image"] .kc-image-add-button svg{
    width:27px;
    height:27px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
}
.kc-editor-block[data-block-type="image"] .kc-image-add-button:active{
    transform:translate(-50%,-50%) scale(.92);
}
.kc-editor-block[data-block-type="image"].kc-block-locked .kc-image-add-button{
    opacity:.45;
    cursor:not-allowed;
}
@media(max-width:700px){
    .kc-editor-block[data-block-type="image"] .kc-editor-block-body.kc-image-block-body{
        min-height:180px;
    }
    .kc-editor-block[data-block-type="image"] .kc-image-add-button{
        width:48px;
        height:48px;
    }
}


/* IMAGE BLOCK — no offset active border box; indicate selection with shadow only. */
.kc-editor-block[data-block-type="image"] {
    margin: 0 0 16px;
    padding: 0;
    border: 1px solid transparent !important;
    border-radius: 12px;
    background: transparent !important;
    box-shadow: none;
    transition: box-shadow .16s ease;
}
.kc-editor-block[data-block-type="image"].is-active {
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: 0 5px 20px rgba(20, 35, 50, .12);
}
.kc-editor-block[data-block-type="image"]::before {
    display: none !important;
}

/* IMAGE BLOCK — reveal image actions only after the image is tapped while active. */
.kc-editor-block[data-block-type="image"] .kc-image-actions {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: none;
    grid-template-columns: 1fr 1fr;
    background: rgba(20, 20, 20, .68);
}
.kc-editor-block[data-block-type="image"] .kc-image-block-body.kc-image-actions-visible .kc-image-actions {
    display: grid;
}
.kc-editor-block[data-block-type="image"] .kc-image-actions button {
    min-width: 0;
    min-height: 46px;
    padding: 10px 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    font: 600 14px/1.2 Inter, Arial, sans-serif;
    text-align: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.kc-editor-block[data-block-type="image"] .kc-image-actions button + button {
    border-left: 1px solid rgba(255, 255, 255, .45);
}
.kc-editor-block[data-block-type="image"] .kc-image-actions button:active {
    background: rgba(255, 255, 255, .12);
}
@media (max-width: 700px) {
    .kc-editor-block[data-block-type="image"] .kc-image-actions button {
        min-height: 44px;
        padding: 9px 5px;
        font-size: 12px;
    }
}

/* =========================================================
   LINK BLOCK + LINK SETTINGS DIALOG
   ========================================================= */
.kc-editor-block[data-block-type="link"] .kc-editor-block-body.kc-link-block-body {
    position: relative;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
    line-height: 1.45;
}
.kc-editor-block[data-block-type="link"] .kc-link-normal,
.kc-editor-block[data-block-type="link"] .kc-link-rich-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 16px 20px 18px;
    border: 0;
    border-radius: 3px;
   /* background: #eef8f3; */
    color: #64748b;
    text-decoration: none;
    overflow: hidden;
}
.kc-editor-block[data-block-type="link"] .kc-link-normal { min-height: 46px; }
.kc-editor-block[data-block-type="link"] .kc-link-normal-url {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
    color: #64748b;
    font-size: clamp(15px, 2.5vw, 22px);
    text-decoration: underline dotted;
    text-underline-offset: 4px;
}
.kc-editor-block[data-block-type="link"] .kc-link-normal-title {
    display: block;
    margin-right: auto;
    color: #08784f;
    font-size: clamp(17px, 2.8vw, 25px);
    font-weight: 700;
    overflow-wrap: anywhere;
}
.kc-editor-block[data-block-type="link"] .kc-link-normal:has(.kc-link-normal-title) {
    flex-wrap: wrap;
    justify-content: flex-start;
}
.kc-editor-block[data-block-type="link"] .kc-link-normal:has(.kc-link-normal-title) .kc-link-normal-url { flex-basis: calc(100% - 44px); }
.kc-editor-block[data-block-type="link"] .kc-link-external-icon {
    display: block;
    flex: 0 0 27px;
    width: 27px;
    height: 27px;
    margin-left: auto;
    fill: none;
    stroke: #15976a;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.kc-editor-block[data-block-type="link"] .kc-link-intro-text {
    margin: 10px 14px 1px;
    color: #172334;
    font-size: clamp(17px, 2.8vw, 25px);
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.kc-editor-block[data-block-type="link"] .kc-link-rich-card {
    min-height: 132px;
    padding: 12px 16px;
    gap: 18px;
}
.kc-editor-block[data-block-type="link"] .kc-link-rich-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 min(34%, 230px);
    min-width: 80px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 4px;
    background: #e2eee8;
    color: #15976a;
    font-size: 30px;
}
.kc-editor-block[data-block-type="link"] .kc-link-rich-thumb img,
.kc-editor-block[data-block-type="link"] .kc-link-preview-image {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    border-radius: 0;
}
.kc-editor-block[data-block-type="link"] .kc-link-rich-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}
.kc-editor-block[data-block-type="link"] .kc-link-rich-copy strong {
    color: #08784f;
    font-size: clamp(16px, 2.8vw, 24px);
    font-weight: 750;
    overflow-wrap: anywhere;
}
.kc-editor-block[data-block-type="link"] .kc-link-rich-copy > span {
    color: #64748b;
    font-size: clamp(13px, 2.3vw, 19px);
    overflow-wrap: anywhere;
}
.kc-editor-block[data-block-type="link"] .kc-link-preview-only {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
    background: #eef8f3;
    color: #172334;
    text-decoration: none;
    aspect-ratio: 16 / 9;
}
.kc-editor-block[data-block-type="link"] .kc-link-preview-only .kc-link-preview-image { object-fit: cover; }
.kc-editor-block[data-block-type="link"] .kc-link-play {
    position: absolute;
    left: 50%; top: 50%;
    display: flex; align-items: center; justify-content: center;
    width: 66px; height: 48px;
    transform: translate(-50%, -50%);
    border-radius: 14px;
    background: #ff0033;
    color: #fff;
    font-size: 24px;
    padding-left: 4px;
    box-sizing: border-box;
}
.kc-editor-block[data-block-type="link"] .kc-link-preview-fallback {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    gap: 9px; width: 100%; height: 100%; padding: 20px; box-sizing: border-box;
    color: #08784f; text-align: center;
}
.kc-editor-block[data-block-type="link"] .kc-link-preview-fallback > span { font-size: 34px; }
.kc-editor-block[data-block-type="link"] .kc-link-preview-fallback small { color: #64748b; }
.kc-editor-block[data-block-type="link"] .kc-link-empty {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    width: 100%;
    min-height: 48px;
    padding: 12px 10px;
    border: 1px solid #bfbfbf;
    border-radius: 8px;
   /* background: #f7fbf9; */
   background:transparent;
    color: #7d848d;
    text-align: left;
    cursor: pointer;
    font: inherit;
    box-sizing: border-box;
}

.kc-editor-block[data-block-type="link"] .kc-link-empty-icon {
    display: inline-flex;
    flex: 0 0 24px;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
     /* color: #169a63; */
    color:#7d848d;
    font-size: 22px;
    line-height: 1;
}

/*
.kc-editor-block[data-block-type="link"] .kc-link-empty-icon svg {
    display: block;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}
*/

.kc-editor-block[data-block-type="link"] .kc-link-empty small {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    color: #172334;
    font-size: clamp(17px, 2.8vw, 25px);
    line-height: 1.35;
}

.kc-link-dialog-overlay {
    /* Must render above the editor overlay (z-index: 99999), otherwise the dialog only becomes visible after the editor closes. */
    position: fixed; inset: 0; z-index: 100001;
    display: none; align-items: center; justify-content: center;
    padding: 18px; box-sizing: border-box;
    background: rgba(15, 23, 42, .38);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.kc-link-dialog-overlay.is-open { display: flex; }
.kc-link-dialog {
    display: flex; flex-direction: column;
    width: min(100%, 760px); max-height: min(88dvh, 760px);
    overflow: hidden; border: 1px solid rgba(255,255,255,.8); border-radius: 12px;
    background: rgba(255,255,255,.98); box-shadow: 0 24px 80px rgba(15,23,42,.22);
    color: #172334; font-family: Inter, Arial, sans-serif;
}
.kc-link-dialog-tabs {
    display: grid; grid-template-columns: 1fr 1fr; gap: 7px;
    padding: 12px 14px; border-bottom: 1px solid #e7ecef;
}
.kc-link-dialog-tabs button {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    min-height: 56px; border: 0; border-radius: 9px; background: #f2f2f2;
    color: #64748b; font-family: inherit; font-size: 17px; font-weight: 600; line-height: 1.2; cursor: pointer;
}
.kc-link-dialog-tabs button span { font-size: 22px; }
.kc-link-dialog-tabs button.is-selected { background: #dcf7ed; color: #08784f; }
.kc-link-dialog-content { overflow-y: auto; padding: 24px 25px 22px; }
.kc-link-dialog-content h2 { margin: 0 0 15px; color: #202124; font-size: 22px; line-height: 1.3; font-weight: 700; }
.kc-link-field {
    display: flex; align-items: center; gap: 6px; min-height: 53px;
    padding: 0 15px; border: 1px solid #dce3eb; border-radius: 10px;
    background: #f8fafc; color: #64748b; box-sizing: border-box;
}
.kc-link-field > span { font-size: 24px; color: #64748b; }
.kc-link-field input, .kc-link-advanced-input {
    width: 100%; min-width: 0; border: 0; outline: none; background: transparent;
    color: #172334; font: 400 15px/1.4 Inter, Arial, sans-serif;
}
.kc-link-field input::placeholder, .kc-link-advanced-input::placeholder { color: #7b8ba1; opacity: 0.85; }
.kc-link-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 10px; }
.kc-link-toggle-row label { color: #202124; font-size: 21px; font-weight: 600; }
.kc-link-toggle-row input[type="checkbox"] {
    appearance: none; -webkit-appearance: none; flex: 0 0 auto;
    width: 48px; height: 27px; margin: 0; border: 1px solid #cbd5d1; border-radius: 999px;
    background: #e5e7eb; position: relative; cursor: pointer; transition: background .18s, border-color .18s;
}
.kc-link-toggle-row input[type="checkbox"]::after {
    content: ""; position: absolute; left: 3px; top: 3px; width: 19px; height: 19px;
    border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: transform .18s;
}
.kc-link-toggle-row input[type="checkbox"]:checked { background: #079566; border-color: #079566; }
.kc-link-toggle-row input[type="checkbox"]:checked::after { transform: translateX(21px); }
.kc-link-advanced-input { display: block; min-height: 53px; margin: 0 0 24px; padding: 0 15px; border: 1px solid #dce3eb; border-radius: 10px; background: #f8fafc; box-sizing: border-box; }
.kc-link-display-heading { margin: 14px 0 12px; color: #172334; font-size: 14px; font-weight: 600; }
.kc-link-display-options { display: grid; grid-template-columns: 1fr 1.25fr 1.25fr; gap: 9px; }
.kc-link-display-options button {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    min-width: 0; min-height: 54px; padding: 8px 9px;
    border: 1px solid #dce3eb; border-radius: 10px; background: #f8fafc;
    color: #172334; font: 500 13px/1.2 Inter, Arial, sans-serif; cursor: pointer;
}
.kc-link-display-options button span { font-size: 20px; color: #52657b; }
.kc-link-display-options button.is-selected { border-color: #079566; background: #dcf7ed; color: #075e43; box-shadow: inset 0 0 0 1px #079566; }
.kc-link-display-options button.is-selected span { color: #08784f; }
.kc-link-dialog-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px 18px 18px; border-top: 1px solid #e7ecef; }
.kc-link-dialog-footer button { min-height: 56px; border: 0; border-radius: 10px; font: 700 15px/1.2 Inter, Arial, sans-serif; cursor: pointer; }
.kc-link-dialog-footer [data-link-cancel] { background: #f2f2f2; color: #172334; }
.kc-link-dialog-footer [data-link-apply] { background: #079566; color: #fff; }
@media (max-width: 600px) {
    .kc-link-dialog-overlay { align-items: center; padding: 12px; }
    .kc-link-dialog { width: 100%; max-height: 88dvh; border-radius: 12px; }
    .kc-link-dialog-tabs { padding: 10px; gap: 7px; }
    .kc-link-dialog-tabs button { min-height: 48px; gap: 7px; font-size: 15px; }
    .kc-link-dialog-content { padding: 19px 16px; }
    .kc-link-dialog-content h2 { font-size: 20px; }
    .kc-link-toggle-row label { font-size: 18px; }
    /* Keep all three display types in one compact horizontal row on phones. */
    .kc-link-display-options {
        grid-template-columns: .72fr 1.42fr 1.28fr;
        gap: 6px;
        width: 100%;
    }
    .kc-link-display-options button {
        justify-content: center;
        gap: 4px;
        min-height: 24px;
        padding: 7px 4px;
        white-space: nowrap;
        font-size: 11px;
        line-height: 1.1;
    }
    .kc-link-display-options button span {
        flex: 0 0 auto;
        font-size: 15px;
    }
    .kc-link-dialog-footer { padding: 11px 12px 13px; gap: 9px; }
    .kc-link-dialog-footer button { min-height: 49px; }
    .kc-editor-block[data-block-type="link"] .kc-link-rich-card { gap: 10px; padding: 9px; }
    .kc-editor-block[data-block-type="link"] .kc-link-rich-thumb { flex-basis: 32%; min-width: 65px; }
    .kc-editor-block[data-block-type="link"] .kc-link-external-icon { flex-basis: 21px; width: 21px; height: 21px; }
}
.kc-link-advanced-input[hidden] { display: none !important; }

/* =========================================================
   LINK BLOCK — ACTIVE STATE: SHADOW ONLY
   Keep the link card's own border, but remove the extra outer
   active border so selecting the block never creates a double border.
   ========================================================= */
.kc-editor-block[data-block-type="link"].is-active {
    border-color: #bfbfbf !important;
    background: transparent !important;
    box-shadow: 0 5px 18px rgba(20, 35, 50, .055) !important;
}

/* Link block — show the same black outer frame when Border - box is enabled.
   Active links already use this frame; this rule keeps it visible when inactive. */
.kc-editor-block[data-block-type="link"].show-border-box {
    border-color: #bfbfbf !important;
}
.kc-editor-block[data-block-type="link"].is-active::before {
    display: none !important;
}

/* Hide only the empty link button's own border while its parent block is active.
   The parent supplies the single black active border; inactive empty links
   keep their existing #cfdad5 border unchanged. */
.kc-editor-block[data-block-type="link"].is-active .kc-link-empty {
    border-color: transparent !important;
}


/* LINK BLOCK — prevent the browser's inner focus outline on long-press.
   Keep the parent .kc-editor-block active/border-box frame unchanged. */
.kc-editor-block[data-block-type="link"] .kc-link-normal:focus,
.kc-editor-block[data-block-type="link"] .kc-link-normal:focus-visible,
.kc-editor-block[data-block-type="link"] .kc-link-rich-card:focus,
.kc-editor-block[data-block-type="link"] .kc-link-rich-card:focus-visible,
.kc-editor-block[data-block-type="link"] .kc-link-preview-only:focus,
.kc-editor-block[data-block-type="link"] .kc-link-preview-only:focus-visible,
.kc-editor-block[data-block-type="link"] .kc-link-empty:focus,
.kc-editor-block[data-block-type="link"] .kc-link-empty:focus-visible {
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}


/* KeepCanvas table block controls — scoped to table blocks only. */
.kc-editor-block[data-block-type="table"]{overflow:visible;}
.kc-editor-block[data-block-type="table"] .kc-editor-block-body{padding:0;overflow-x:auto;}
.kc-editor-block[data-block-type="table"] .kc-editor-table{width:100%;border-collapse:collapse;table-layout:fixed;background:#fff;color:#202b3b;}
.kc-editor-block[data-block-type="table"] .kc-editor-block-body{min-width:0;max-width:100%;}
.kc-editor-block[data-block-type="table"] .kc-editor-table col{box-sizing:border-box;}
.kc-editor-block[data-block-type="table"] .kc-editor-table th{background:#f0f0f0;font-weight:600;text-align:center;}
.kc-editor-block[data-block-type="table"] .kc-editor-table td,
.kc-editor-block[data-block-type="table"] .kc-editor-table th{border:1px solid #777;padding:13px 10px;min-width:0;height:56px;vertical-align:middle;overflow-wrap:anywhere;}
.kc-editor-block[data-block-type="table"] .kc-editor-table td[data-kc-serial-cell],
.kc-editor-block[data-block-type="table"] .kc-editor-table th[data-kc-serial-cell]{width:14%;text-align:center;}
.kc-table-settings-topbar{display:flex;align-items:center;gap:10px;min-height:40px;margin:0 0 8px;}
.kc-editor-block[data-block-type="table"]:not(.kc-table-settings-open) .kc-table-settings-topbar{justify-content:flex-end;}
.kc-table-settings-button{display:none;position:relative;flex:0 0 42px;width:42px;height:38px;align-items:center;justify-content:center;border:1px solid #777;background:#fff;color:#7aa8b8;cursor:pointer;z-index:5;padding:0;box-sizing:border-box;}
.kc-table-settings-button.is-save{width:auto;min-width:68px;flex:0 0 auto;padding:0 12px;color:#202b3b;font:inherit;font-size:15px;font-weight:600;}
.kc-table-settings-button svg{width:25px;height:25px;fill:currentColor;stroke:currentColor;stroke-width:1.2;}
.kc-editor-block[data-block-type="table"].is-active .kc-table-settings-button{display:flex;}
.kc-table-settings-toolbar{display:none;flex:1;align-items:center;gap:14px;min-width:0;}
.kc-editor-block[data-block-type="table"].kc-table-settings-open .kc-table-settings-toolbar{display:flex;}
.kc-table-settings-toolbar .kc-table-setting-row{display:flex;align-items:center;gap:8px;padding:0;font-size:14px;font-weight:600;min-width:0;}
.kc-table-settings-toolbar .kc-table-setting-row label{white-space:nowrap;}
.kc-table-settings-panel{position:relative;margin:0 0 12px;padding:0;background:#fff;color:#202b3b;}
.kc-table-settings-panel[hidden]{display:none!important;}
.kc-table-setting-actions{display:flex;flex-wrap:nowrap;align-items:stretch;gap:8px;padding:12px 0 2px;width:100%;box-sizing:border-box;}
.kc-table-setting-actions button{flex:1 1 0;min-width:0;min-height:40px;padding:7px 8px;border:1px solid #777;background:#fff;color:#202b3b;font:inherit;font-weight:600;cursor:pointer;white-space:normal;overflow-wrap:anywhere;}
.kc-table-setting-actions button[data-table-action="remove"]{flex:1.45 1 0;margin-left:auto;}
.kc-table-setting-actions.is-removing button[data-table-action="add-row"],
.kc-table-setting-actions.is-removing button[data-table-action="add-column"]{display:none!important;}
.kc-table-switch{width:42px;height:24px;border:0;border-radius:20px;background:#b9c1c7;padding:3px;display:inline-flex;align-items:center;cursor:pointer;flex-shrink:0;}
.kc-table-switch span{display:block;width:18px;height:18px;border-radius:50%;background:#fff;transition:transform .16s;}
.kc-table-switch.is-on{background:#079b6c;}
.kc-table-switch.is-on span{transform:translateX(18px);}
@media(max-width:600px){
  .kc-table-settings-topbar{gap:6px;}
  .kc-table-settings-toolbar{gap:8px;}
  .kc-table-settings-toolbar .kc-table-setting-row{gap:5px;font-size:11px;}
  .kc-table-switch{width:34px;height:21px;}
  .kc-table-switch span{width:15px;height:15px;}
  .kc-table-switch.is-on span{transform:translateX(13px);}
  .kc-table-setting-actions{gap:5px;}
  .kc-table-setting-actions button{font-size:12px;padding:7px 4px;line-height:1.2;}
  .kc-table-setting-actions button[data-table-action="remove"]{margin-left:auto;}
}


/* Draggable row/column resize handles — shown only after tapping a table grid line. */
.kc-editor-block[data-block-type="table"]{position:relative;}
/* Reserve breathing room above and below the grid while resize handles are visible,
   so handles do not overlap the settings Save button or row/column action buttons. */
.kc-editor-block[data-block-type="table"].kc-table-resize-active .kc-editor-block-body table{
  margin-top:18px!important;
  margin-bottom:18px!important;
}
.kc-table-resize-layer{position:absolute;inset:0;z-index:30;pointer-events:none;overflow:visible;}
.kc-table-resize-handle{position:absolute;transform:translate(-50%,-50%);width:34px;height:34px;border:2px solid #202124;border-radius:50%;background:#e8e8e8;color:#202124;display:flex;align-items:center;justify-content:center;font-family:Arial,sans-serif;font-size:25px;line-height:1;font-weight:500;padding:0;box-shadow:0 1px 3px rgba(0,0,0,.16);cursor:col-resize;touch-action:none;pointer-events:auto;z-index:31;
    
}
.kc-table-resize-row{cursor:row-resize;}
/* Nudge the horizontal arrow glyph upward slightly to visually center it in its circle. */
.kc-table-resize-column{padding-bottom:4px;} 
.kc-table-resize-handle:active{background:#d5d5d5;transform:translate(-50%,-50%) scale(.96);}
@media(max-width:600px){.kc-table-resize-handle{width:30px;height:30px;font-size:22px;}}

/* Table row/column removal mode — scoped to table editor blocks. */
.kc-table-remove-ui{margin-top:12px;color:#202b3b;}
.kc-table-remove-ui[hidden]{display:none!important;}
.kc-table-remove-hint-row{display:flex;align-items:center;gap:12px;width:100%;margin:0 0 12px;}
.kc-table-remove-hint{flex:1;min-width:0;font-size:14px;line-height:1.45;margin:0;padding:0 2px;}
.kc-table-remove-hint-row [data-table-action="remove"]{flex:0 0 auto;min-height:40px;padding:7px 10px;border:1px solid #777;background:#fff;color:#202b3b;font:inherit;font-weight:600;cursor:pointer;}
.kc-table-remove-ui:not(.has-selection) .kc-table-remove-actions{display:none!important;}
.kc-table-remove-ui.has-selection .kc-table-remove-hint-row [data-table-action="remove"]{display:none!important;}
.kc-table-remove-ui.has-selection .kc-table-remove-hint-row{display:none!important;}
.kc-table-remove-actions{display:flex;align-items:stretch;gap:10px;width:100%;}
.kc-table-remove-actions button{flex:1 1 0;min-width:0;min-height:42px;padding:8px 10px;border:1px solid #777;background:#fff;color:#202b3b;font:inherit;font-weight:600;line-height:1.2;white-space:normal;overflow-wrap:anywhere;cursor:pointer;}
.kc-editor-block[data-block-type="table"].kc-table-remove-mode .kc-editor-table td,
.kc-editor-block[data-block-type="table"].kc-table-remove-mode .kc-editor-table th{cursor:pointer;}
.kc-editor-block[data-block-type="table"] .kc-editor-table tr.kc-table-row-selected > td,
.kc-editor-block[data-block-type="table"] .kc-editor-table tr.kc-table-row-selected > th,
.kc-editor-block[data-block-type="table"] .kc-editor-table td.kc-table-cell-selected,
.kc-editor-block[data-block-type="table"] .kc-editor-table th.kc-table-cell-selected{background:#e3e3e3;}
@media(max-width:600px){
 .kc-table-remove-hint-row{gap:6px;margin-bottom:10px;}
 .kc-table-remove-hint{font-size:12px;}
 .kc-table-remove-hint-row [data-table-action="remove"]{font-size:12px;padding:7px 5px;}
 .kc-table-remove-actions{gap:6px;}
 .kc-table-remove-actions button{font-size:12px;padding:8px 5px;}
}


/* Premium unsaved table settings decision dialog */
.kc-table-unsaved-modal-overlay{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(15,23,42,.52);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);box-sizing:border-box;animation:kcTableModalFade .16s ease-out;}
.kc-table-unsaved-modal{width:min(100%,420px);box-sizing:border-box;padding:26px 24px 20px;border:1px solid rgba(255,255,255,.75);border-radius:24px;background:#fff;color:#172033;box-shadow:0 24px 70px rgba(15,23,42,.24);animation:kcTableModalRise .2s ease-out;}
.kc-table-unsaved-modal-icon{width:48px;height:48px;display:flex;align-items:center;justify-content:center;border-radius:15px;background:#fff4d8;color:#b77908;margin-bottom:17px;}
.kc-table-unsaved-modal-icon svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.kc-table-unsaved-modal h2{margin:0 0 9px;font-size:21px;line-height:1.3;font-weight:750;letter-spacing:-.35px;color:#172033;}
.kc-table-unsaved-modal p{margin:0;color:#657084;font-size:15px;line-height:1.55;}
.kc-table-unsaved-modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:25px;}
.kc-table-unsaved-modal-actions button{min-height:44px;padding:0 16px;border-radius:12px;font:inherit;font-size:14px;font-weight:700;cursor:pointer;transition:transform .15s ease,background .15s ease,box-shadow .15s ease;}
.kc-table-unsaved-modal-actions button:active{transform:scale(.98);}
.kc-table-unsaved-discard{border:1px solid #d8dee8;background:#fff;color:#4b5565;}
.kc-table-unsaved-discard:hover{background:#f5f7fa;}
.kc-table-unsaved-save{border:1px solid #13885f;background:#169a63;color:#fff;box-shadow:0 4px 10px rgba(22,154,99,.18);}
.kc-table-unsaved-save:hover{background:#118456;box-shadow:0 6px 14px rgba(22,154,99,.24);}
@keyframes kcTableModalFade{from{opacity:0}to{opacity:1}}
@keyframes kcTableModalRise{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:480px){.kc-table-unsaved-modal{padding:23px 20px 18px;border-radius:22px}.kc-table-unsaved-modal h2{font-size:19px}.kc-table-unsaved-modal p{font-size:14px}.kc-table-unsaved-modal-actions{gap:8px}.kc-table-unsaved-modal-actions button{flex:1;padding:0 10px;font-size:13px;}}

/* Keep inactive table blocks visually clean: only the table remains visible.
   The active block's settings state is preserved so its controls return when
   the user selects that table again. The existing JS unsaved-changes prompt
   and save/discard rollback workflow are intentionally unchanged. */
.kc-editor-block[data-block-type="table"]:not(.is-active) > .kc-table-settings-topbar,
.kc-editor-block[data-block-type="table"]:not(.is-active) > .kc-table-settings-panel{
    display:none !important;
}
