/*
 * Released under BSD License
 * Copyright (c) 2014-2021 hizzgdev@163.com
 * 
 * Project Home:
 *   https://github.com/hizzgdev/jsmind/
 */

/*
Copyright (c) 2021 Kil Hyung-jin, with Reserved Font Name Pretendard.
https://github.com/orioncactus/pretendard

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
*/

@font-face {
	font-family: 'Pretendard Variable';
	font-weight: 45 920;
	font-style: normal;
	font-display: swap;
	src: url('../font/Pretendard/PretendardVariable.woff2') format('woff2-variations');
}

:root{
    --head:92px;
    /* --sprites:url(../img/mindmap_sprites.png) left top/auto 98px no-repeat; */
    font-family: "Pretendard Variable", sans-serif;
}
html:has( body.is_android ),
body.is_android {
    touch-action: manipulation;
}
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}
canvas{
    position: absolute;
}
body > section{
    display: grid;
    grid-template-rows: var(--head) auto;
    width: 1230px;
}

li {
    margin-top: 2px;
    margin-bottom: 2px;
}

button {
    width: 140px;
}

select {
    width: 140px;
}

#layout {
    width: 1230px;
}

.file_input {
    width: 100px;
}

button.sub {
    width: 100px;
}

.blind {
    width: 0;
    height: 0;
    margin: -1px;
    padding: 0;
    border: 0;
    font-size: 0;
    line-height: 0;
    visibility: hidden;
    overflow: hidden;
    position: absolute;
    clip-path: inset(0% 100% 100% 0);
}

/* 
.file_input_style {
    position: absolute;
    right: 350px;
    bottom: 48px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
} */

.bottom_area {
    --gap: 30px;
    position: absolute;
    bottom: 50px;
    right: 60px;
    display: grid;
    grid-template-columns: auto auto;
    justify-items: end;
    gap: 54px;
}

.button_area {
    display: flex;
    flex-direction: row-reverse;
    gap: var(--gap);
    z-index: 5;

    & button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 50px;
        height: 50px;
        transition: 0.3s;
        border-radius: 50%;
        box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
        border: none;
        cursor: pointer;
        background: var(--sprites);
        user-select: none;

        &:hover {
            background-color: #ccc;
        }

        &:active {
            background-color: #fff;
            box-shadow: none;
        }

        &>img {
            display: inline-block;
            width: 40px;
            height: 40px;
        }
    }
}

#jsmind_container {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    background: #e9e9e9;
    z-index: 2;
    /* float:left; */
}

jmnode {
    position: relative;
    white-space: pre-line;
    word-break: break-all;
}

.jsmind-editor {
    width: 83%;
    height: auto;
    min-height: max-content;
    font-size: inherit;
    font-family: inherit;
    background-color: transparent;
    resize: none;
    border: 2px dotted rgb(213, 194, 194);
    outline: none;
    overflow: hidden;
    /* white-space: normal; */
    text-align: center;
    vertical-align: middle;
}

.root::before {
    /* content: ""; */
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-block;
    background-color: transparent;
    box-shadow: 0px 0px 75.4px 21px rgba(254, 126, 118, 0.35);
    width: 300px;
    height: 250px;
    border-radius: 50%;
}

.root {
    width: 320px;
    height: 280px;
    /* min-width: 290px;
    max-width: 300px; */
    /* width: fit-content;
    height: 184px; */
    line-height: normal;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(45deg, #FE7E76 0%, #ffe6d4 100%);
    box-shadow: 0 0 12px 0 rgba(254, 126, 118, 0.4);
    animation: morph 12s ease-in-out infinite;
}

@keyframes morph {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }

    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

jmnode>span,
.root>span {
    position: absolute;
    top: auto;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
    width: 28px;
    height: 28px;
    line-height: 22px;
    background-color: #dcdcdc;
    border-radius: 50%;
    font-size: 36px;
    color: #fff;
    transition: 0.2s;
    cursor: pointer;
}

jmnode>span:hover {
    background-color: #ABEEFF;
}

.root>span:hover {
    background: linear-gradient(45deg, #FE7E76 0%, #ffe6d4 100%);
}

jmnode[data-depth]>span:hover {
    background-color: var(--color);
}

jmnode[data-depth]{
    --color:#b0efff;
}

jmnode[data-depth="1"]{
    --color:#ABBDFF;
}

jmnode[data-depth="2"]{
    --color: #F9C98E;
}

jmnode[data-depth="3"]{
    --color: #A2DC9D;
}

jmnode[data-depth="4"]{
    --color: #FF9791;
}

/* jmnode[data-depth="5"] > span:hover {
     background-color: #7b7b7b;
 } */

/*  */
#etc_acc {
    position: absolute;
    top: 0px;
    left: 400px;
    /* left: 50% !important;
    transform: translateX(-50%); */
    z-index: 10;
    display: none;
    /* align-items: center;
    justify-content: center; */
    padding: 12px;
    box-sizing: border-box;
    width: fit-content;
    height: 50px;
    background-color: rgb(226 226 226);
    border-radius: 6px;
}

#etc_acc .etc_acc_inner{
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap:8px;
}

#etc_acc .etc_acc_inner button {
    position: relative;
    width: 30px;
    height: 30px;
    transition: 0.2s;
    cursor: pointer;
    background: var(--bg) no-repeat center / 100%;

    &:is(.bgImgBtn,.deleteBtn){
        border: none;
    }
}

#etc_acc .etc_acc_inner .bgImgBtn {
    --bg: url(../img/img_btn.png);
}

#etc_acc .etc_acc_inner .bgColorBtn {
    --bg: #FE7E76;
    border-radius: 50%;
    border: 2px solid transparent;
}
#etc_acc .etc_acc_inner :is(.bgColorBtn, .fontColorBtn, .fontSizeBtn):hover{
    border-color: #FFDC00 !important;
}
#etc_acc .etc_acc_inner :is(.fontColorBtn, .fontSizeBtn):hover{
    background-color: #fff !important;
}


#etc_acc .etc_acc_inner  :where(.fontColorBtn, .fontSizeBtn) {
    color: #2450de;
    font-size: 20px;
    font-weight: bold;
    line-height: 20px;
    --bg: rgba(255, 255, 255, 0.9);
    background-image: none;
    border-radius: 50%;
    border: 2px solid transparent;
}

#etc_acc .etc_acc_inner .fontSizeBtn {
    position: relative;
    color: #000;
    font-weight: normal;
}

#etc_acc .etc_acc_inner .fontSizeBtn>div {
    position: absolute;
    left: 4px;
    top: 5px;
    display: inline;
}

#etc_acc .etc_acc_inner .fontSizeBtn>div:last-child {
    left: 14px;
    top: 7px;
    font-size: 14px;
}

#etc_acc .etc_acc_inner .deleteBtn::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 0px;
    display: inline-block;
    width: 2px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.4);
}

#etc_acc .etc_acc_inner .deleteBtn {
    margin-left: 14px;
    --bg: url(../img/delete_btn.png);
}

#etc_acc .bgColorBoard,
#etc_acc .fontColorBoard,
#etc_acc .fontSizeBoard {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 52px;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    box-sizing: border-box;
    width: 360px;
    height: auto;
    background-color: rgb(226 226 226);
    border-radius: 6px;
}

#etc_acc .bgColorBoard>button {
    width: 26px;
    height: 26px;
    background-color: #FE7E76;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: 0.2s;
}

#etc_acc .bgColorBoard>button:nth-child(2) {
    background-color: #A8BAF8;
}

#etc_acc .bgColorBoard>button:nth-child(3) {
    background-color: #FFC47C;
}

#etc_acc .bgColorBoard>button:nth-child(4) {
    background-color: #A2DC9D;
}

#etc_acc .bgColorBoard>button:nth-child(5) {
    background-color: #B0EFFF;
}

/* #etc_acc .bgColorBoard > button:nth-child(6) {
    background-color: #A2DC9D;
}
#etc_acc .bgColorBoard > button:nth-child(7) {
    background-color: #B0EFFF;
} */
/* #etc_acc .bgColorBoard > button:nth-child(8)::before {
    content: "";
    position: absolute;
    left: 268px;
    top: 9px;
    display: inline-block;
    width: 2px;
    height: 28px;
    background-color: rgba(0, 0, 0, 0.4);
} */
#etc_acc .bgColorBoard>button:nth-child(6),
#etc_acc .bgColorBoard>button:nth-child(7),
#etc_acc .bgColorBoard>button:nth-child(8),
#etc_acc .bgColorBoard>button:nth-child(9) {
    border: 2px solid transparent;
    border-radius: 0%;
}

#etc_acc .bgColorBoard>button:nth-child(6) {
    /* margin-left: 18px; */
    background: transparent url(../img/bg_flower.png) no-repeat center / 100%;
}

#etc_acc .bgColorBoard>button:nth-child(7) {
    background: transparent url(../img/bg_heart.png) no-repeat center / 100%;
}

#etc_acc .bgColorBoard>button:nth-child(8) {
    background: transparent url(../img/bg_leaf.png) no-repeat center / 100%;
}

#etc_acc .bgColorBoard>button:nth-child(9) {
    background: transparent url(../img/bg_cloud.png) no-repeat center / 100%;
}


#etc_acc .bgColorBoard>button:hover,
#etc_acc .fontColorBoard>button:hover {
    border: 2px solid #FFDC00;
}

#etc_acc .fontColorBoard {
    width: 160px;
}

#etc_acc .fontColorBoard>button {
    width: 26px;
    height: 26px;
    background-color: #000;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: 0.2s;
}

#etc_acc .fontColorBoard>button:nth-child(2) {
    background-color: #fff;
}

#etc_acc .fontColorBoard>button:nth-child(3) {
    background-color: red;
}

#etc_acc .fontColorBoard>button:nth-child(4) {
    background-color: blue;
}

#etc_acc .fontColorBoard>button:nth-child(5) {
    background-color: #ddde;
}

#etc_acc .fontSizeBoard {
    width: 190px;
}

#etc_acc .fontSizeBoard>button {
    padding: 0;
    width: 40px;
    height: 40px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    background-color: transparent;
    border-radius: 50%;
    transition: 0.2s;
}

#etc_acc .fontSizeBoard>button:nth-child(2) {
    font-size: 19px;
}

#etc_acc .fontSizeBoard>button:nth-child(3) {
    font-size: 24px;
}

#etc_acc .fontSizeBoard>button:nth-child(4) {
    font-size: 30px;
}

#etc_acc .fontSizeBoard>button:hover {
    background-color: #fff;
}


/* 확대 축소 */
#etc_zoom {
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 140px;
    height: auto;
    font-size: 30px;
}

#etc_zoom>button {
    width: 40px;
    height: 40px;
    background: url(../img/zoom_in.png) no-repeat center / 100%;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    user-select: none;
}

#etc_zoom>#zoom-out-button {
    background-image: url(../img/zoom_out.png);
}

#etc_zoom>button:hover {
    background-image: url(../img/zoom_in_h.png);
}

#etc_zoom>#zoom-out-button:hover {
    background-image: url(../img/zoom_out_h.png);
}


/* 마인드맵 가이드 */
.mindGuide {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 20px;
    z-index: 5;
    font-size: 28px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.12);

    & p{
        white-space: nowrap;
        text-align: center;
    }

    /* padding-right: 140px;
    margin-left: -140px; */
}

/* important section */
.jsmind-inner {
    position: relative;
    overflow: auto;
    width: 100%;
    height: 100%;
    outline: none;
}

/*box-shadow:0 0 2px #000;*/
.jsmind-inner {
    moz-user-select: -moz-none;
    -moz-user-select: none;
    -o-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* z-index:1 */
svg.jsmind {
    position: absolute;
    z-index: 1;
}

canvas.jsmind {
    position: absolute;
    transform-origin: 0px 0px;
    z-index: 1;
}

/* z-index:2 */
jmnodes {
    position: absolute;
    z-index: 2;
    transform-origin: 0px 0px;
    background-color: rgba(0, 0, 0, 0);
    margin: 0;
}

/*background color is necessary*/
jmnode {
    position: absolute;
    cursor: default;
    /* max-width: 400px; */
}

jmexpander {
    position: absolute;
    width: 11px;
    height: 11px;
    display: block;
    overflow: hidden;
    line-height: 12px;
    font-size: 12px;
    text-align: center;
    border-radius: 6px;
    border-width: 1px;
    border-style: solid;
    cursor: pointer;
}

/* default theme */
jmnode {
    padding: 10px;
    background-color: #fff;
    /* color: #333;
    border-radius: 5px;
    box-shadow: 1px 1px 1px #666;
    font: 16px/1.125 Verdana, Arial, Helvetica, sans-serif; */
}

/* jmnode:hover {
    box-shadow: 2px 2px 8px #000;
    background-color: #ebebeb;
    color: #333;
} */

/* jmnode.selected {
    background-color: transparent;
    box-shadow: none;
} */

jmnode.root {
    font-size: 30px;
    font-weight: bold;
}

jmexpander {
    border-color: gray;
}

jmexpander:hover {
    border-color: #000;
}

@media screen and (max-device-width: 1024px) {
    jmnode {
        padding: 5px;
        border-radius: 3px;
        font-size: 18px;
    }

    jmnode.root {
        font-size: 21px;
    }
}


jmnode {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 12px;
    box-sizing: border-box;
    width: 220px;
    height: 80px;
    /* min-width: 250px;
    max-width: 240px; */
    /* min-height: 88px; */
    max-height: 500px;
    background: url(../img/bg07.png) no-repeat center / 100%;
    color: #000;
    text-align: center;
    /* line-height: 70px; */
    /* border-radius: 20px; */
    cursor: pointer;
    font-size: 16px;
    font-weight: 400;
    /* text-shadow: 0px 2px 2px rgba(0, 0, 0, 0.5); */
    /* background-repeat: no-repeat; */
    & textarea{
        background-color: #fff !important;
    }
}

/* jmnode[data-depth="0"] {
    background-image: url(../img/bg01.png);
} */
jmnode[data-depth="1"] {
    background-image: url(../img/bg02.png);
}

jmnode[data-depth="2"] {
    background-image: url(../img/bg03.png);
}

jmnode[data-depth="3"] {
    background-image: url(../img/bg04.png);
}

jmnode[data-depth="4"] {
    background-image: url(../img/bg08.png);
}
jmnode textarea{
    border:none;
    padding: 0;
    margin: 0;
}
/* jmnode[data-depth="5"] {
    background-image: url(../img/bg06.png);
} */

/* 
jmnode[data-depth="0"]:hover,
jmnode[data-depth="0"].selected {
    box-shadow: 0px 0px 20px 6px rgba(254, 126, 118, 0.40);
}
jmnode[data-depth="1"]:hover,
jmnode[data-depth="1"].selected {
    box-shadow: 0px 0px 20px 6px rgba(124, 149, 233, 0.4);
}
jmnode[data-depth="2"]:hover,
jmnode[data-depth="2"].selected {
    box-shadow: 0 0 20px 6px rgba(187, 201, 248, 0.4);
}
jmnode[data-depth="3"]:hover,
jmnode[data-depth="3"].selected {
    box-shadow: 0 0 20px 6px rgba(255, 196, 124, 0.4);
}
jmnode[data-depth="4"]:hover,
jmnode[data-depth="4"].selected {
    box-shadow: 0 0 20px 6px rgba(255, 199, 168, 0.4);
}
jmnode[data-depth="5"]:hover,
jmnode[data-depth="5"].selected {
    box-shadow: 0 0 20px 6px rgba(118, 178, 113, 0.4);
} */

.add_btn{
    --h:42px;
    position: absolute;
    left:50%;
    bottom:-59px;
    transform: translateX(-50%);
    background-color: #fff;
    font-weight: 600;
    width: 93px;
    height: var(--h);
    border-radius: calc(var(--h) / 2);
    border:none;
    color:#ee5a4d;
    font-size: 14px;
    z-index: 1;
    display:none;
}

jmnode:not(.root) .add_btn{
    color: var(--color);
    --h: 24px;
    bottom: -49px;
}

.logo{
    position: absolute;
    left:0px;
    top:0px;
    width: 240px;
    z-index: 10;

    & img{
        width: 100%;
    }
}