
@charset "utf-8";

#wrap {
    
    #sidePanel {
        /* gnb */
        #nav {
            position: fixed;
            top: 4.4rem;
            left: 0;
            z-index: 100;
            width: 4.3rem;
            height: calc(100% - 4.4rem);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            background: var(--secondary1);
            border-right: 1px solid var(--tertiary2);

            .gnb {
                width: 4.2rem;
                display: flex;
                flex-direction: column;

                li {
                width: 100%;
                height: 4.4rem;
                display: flex;
                align-items: center;
                justify-content: center;

                button {
                    width: 100%;
                    height: 100%;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    background-repeat: no-repeat;
                    background-position: center;
                    background-size: 3rem;

                    /* 공통 상태 */
                    &:hover,
                    &:active,
                    &.active {
                    background-color: var(--primary1);
                    }

                    /* gnb icons */
                    &.gnb1 {
                    background-image: url(../assets/images/ico_gnb01.svg);

                    &:hover,
                    &:active,
                    &.active {
                        background-image: url(../assets/images/ico_gnb01_on.svg);
                    }
                    }

                    &.gnb2 {
                    background-image: url(../assets/images/ico_gnb02.svg);

                    &:hover,
                    &:active,
                    &.active {
                        background-image: url(../assets/images/ico_gnb02_on.svg);
                    }
                    }

                    &.gnb3 {
                    background-image: url(../assets/images/ico_gnb03.svg);

                    &:hover,
                    &:active,
                    &.active {
                        background-image: url(../assets/images/ico_gnb03_on.svg);
                    }
                    }

                    &.gnb4 {
                    background-image: url(../assets/images/ico_gnb04.svg);

                    &:hover,
                    &:active,
                    &.active {
                        background-image: url(../assets/images/ico_gnb04_on.svg);
                    }
                    }

                    &.gnb5 {
                    background-image: url(../assets/images/ico_gnb05.svg);

                    &:hover,
                    &:active,
                    &.active {
                        background-image: url(../assets/images/ico_gnb05_on.svg);
                    }
                    }

                    &.gnb6 {
                    background-image: url(../assets/images/ico_gnb06.svg);

                    &:hover,
                    &:active,
                    &.active {
                        background-image: url(../assets/images/ico_gnb06_on.svg);
                    }
                    }

                    &.gnb7 {
                    background-image: url(../assets/images/ico_gnb07.svg);

                    &:hover,
                    &:active,
                    &.active {
                        background-image: url(../assets/images/ico_gnb07_on.svg);
                    }
                    }

                    &.gnb8 {
                    background-image: url(../assets/images/ico_gnb08.svg);

                    &:hover,
                    &:active,
                    &.active {
                        background-image: url(../assets/images/ico_gnb08_on.svg);
                    }
                    }
                }
                }
            }
            .side {
                width: 4.2rem;
                display: flex;
                flex-direction: column;

                li {
                    width: 100%;
                    height: 4.4rem;
                    display: flex;
                    align-items: center;
                    justify-content: center;

                    button {
                    width: 3rem;
                    height: 3rem;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    background-repeat: no-repeat;
                    background-position: center;
                    background-size: 3rem;
                    background-color: var(--primary3);

                    &.filter {
                        background-image: url('../assets/images/ico_side01.svg');
                    }

                    &.layer {
                        background-image: url('../assets/images/ico_side02.svg');
                    }
                    }
                }
            }

        }


        /* side-pannel */
        .slidePanel {
            position: fixed;
            top: 4.4rem;
            left: 4.3rem;
            width: 54rem;
            height: calc(100% - 4.4rem);
            min-height: 0;
            display: flex;
            flex-direction: column;
            background-color: var(--secondary2);
            z-index: 99;
            transform: translateX(0);
            transition: transform .3s ease;

            /* 닫힘 상태 */
            &.is-closed {
                transform: translateX(-100%);

                .toogle::after {
                transform: translate(-50%, -50%) rotate(180deg);
                }
            }

            .tabBox {
                flex-shrink: 0;
                width: 100%;
                padding: 1.5rem 2rem 0 2rem;
            }

            .tabWrap {
                flex: 1;
                min-height: 0;
                display: none;
                flex-direction: column;

                &.is-active {
                display: flex;
                }

                .tabWrapInner {
                    display: flex;
                    flex-direction: column;
                    flex: 1;
                    min-height: 100%;

                    .tabWrapCnt {
                    flex: 1 1 auto;
                    min-height: 0;
                    overflow-y: auto;
                    padding-bottom: 3rem;

                        // 필터 스위치그룹
                        .switchGroup {
                        display: flex;
                        flex-direction: column;
                        width: 100%;

                        .sgHeader {
                            display: flex;
                            align-items: center;
                            justify-content: space-between;
                            padding: 1.2rem 1rem;
                            background-color: var(--secondary1);
                            border-bottom: .1rem solid var(--secondary3);

                            .colL {
                            display: flex;
                            align-items: center;
                            gap: 1rem;
                            font-weight: var(--fw-bold);

                            .favship {
                                width: 2rem;
                                height: 2rem;
                                background: url(../assets/images/ico_favship.svg) no-repeat center / contain;
                            }

                            .btnDelDark {
                                padding: 0.2rem 0.6rem;
                                font-size: 1.1rem;
                                font-weight: var(--fw-regular);
                                color: var(--danger, #ff4d4f);
                                border: .1rem solid var(--danger, #ff4d4f);
                                border-radius: 0.4rem;
                                background: transparent;
                                cursor: pointer;
                                line-height: 1.4;

                                &:hover {
                                    background: var(--danger, #ff4d4f);
                                    color: #fff;
                                }
                            }
                            }

                            .toggleBtn {
                            display: flex;
                            align-items: center;
                            width: 2.4rem;
                            height: 2.4rem;
                            background: url(../assets/images/ico_arrow_toggle_down.svg) no-repeat center / contain;
                            transition: transform 0.3s ease;

                            &.is-open {
                                transform: rotate(180deg);
                            }
                            }
                        }

                        .switchBox {
                            overflow: hidden;
                            max-height: 0;
                            transition: max-height 0.3s ease;

                            &.is-open {
                            max-height: 500rem;
                            }

                            .switchList {
                            display: flex;
                            flex-direction: column;
                            width: 100%;
                            background-color: var(--tertiary1);
                            padding: 1rem;

                            li {
                                display: flex;
                                justify-content: space-between;
                                height: 2.4rem;

                                span {
                                }
                            }
                            }
                        }
                        }
                    }

                    .btnBox {
                    flex: 0 0 auto;
                    margin-top: auto; 
                    display: flex;
                    justify-content: flex-end;
                    padding: 2rem;
                    }
                }

                .tabTop {
                flex-shrink: 0;
                width: 100%;
                padding: 0 2rem;

                .title {
                    font-size: var(--fs-ml);
                    color: var(--white);
                    font-weight: var(--fw-bold);
                    padding: 1.7rem 0;
                }
                // 기상패널 범례
                .legend {
                    display: flex;
                    align-items: flex-start;
                    flex-direction: column;
                    gap: .4rem;
                    margin-bottom: 2.5rem;

                    .legendTitle {
                    font-size: var(--fs-m);
                    }

                    .legendList {
                    width: 100%;
                    border-radius: .6rem;
                    padding: 1.5rem;
                    background-color: rgba(var(--secondary4-rgb), .2);
                    display: grid;
                    grid-template-columns: repeat(3, 1fr);
                    gap: 1rem;

                    li {
                        display: flex;
                        align-items: center;
                        justify-content: flex-start;
                        font-size: var(--fs-ml);

                        img {
                            width: 2.6rem;
                            height: 2.6rem;
                             margin-right: .5rem;
                        }
                    }
                    }
                }
                }

                .tabBtm {
                flex: 1;
                min-height: 0;
                overflow-y: auto;
                overflow-x: hidden;
                border-top: 1px solid var(--secondary1);
                padding: 3rem 2rem;

                &.noLine {
                    overflow-x: hidden;
                    overflow-y: auto;
                    border-top: 0;
                    padding: 0 2rem;
                }

                &.noSc {
                    overflow-y: visible;
                    padding-bottom: 0;
                }
                .tabBtmInner {
                    display: flex;
                    flex-direction: column;
                    height: 100%;
                    min-height: 0;

                    .tabBtmCnt {
                    flex: 1 1 auto;
                    min-height: 0;
                    overflow-x: hidden;
                    overflow-y: auto;
                    padding-bottom: 2rem;
                    }

                    .btnBox {
                    flex: 0 0 auto;
                    margin-top: auto; 
                    display: flex;
                    justify-content: flex-end;
                    gap: 1rem;
                    padding: 2rem 0;

                    &.rowSB {
                        justify-content: space-between;
                    }

                        button {
                            flex: initial;
                            min-width: 12rem;
                        }
                    }
                }
                }

            }

            .toogle {
                position: absolute;
                overflow: hidden;
                z-index: 10;
                top: 50%;
                left: 100%;
                width: 2.4rem;
                height: 5rem;
                border-radius: 0 1rem 1rem 0;
                transform: translateY(-50%);
                background-color: var(--secondary2);
                border: solid 1px var(--secondary3);

                &::after {
                content: "";
                position: absolute;
                top: 50%;
                left: 50%;
                width: 2.4rem;
                height: 2.4rem;
                transform: translate(-50%, -50%);
                background: url(../assets/images/ico_toggle.svg) no-repeat center / 2.4rem;
                transition: transform .3s ease;
                }
            }
            // ai모드
            .panelHeader {
                display: flex;
                align-items: center;
                padding: 0 2rem;

                .panelTitle {
                    padding: 1.7rem 0;
                    font-size: var(--fs-ml);
                    font-weight: var(--fw-bold);
                }
                }

                .panelBody {
                display: flex;
                flex: 1;
                min-height: 0;
                padding: 0 2rem;

                .ai {
                    display: grid;
                    grid-template-columns: repeat(2, 1fr);
                    align-items: start;
                    gap: 1rem;
                    row-gap: 1rem;
                    grid-auto-rows: min-content;
                    width: 100%;

                    li {
                    display: flex;
                    align-items: center;
                    justify-content: flex-start;

                    a {
                        position: relative;
                        display: flex;
                        flex-direction: column;
                        gap: .6rem;
                        width: 100%;
                        height: auto;
                        padding: 2rem 1.2rem;
                        background-color: var(--secondary1);
                        border: 2px solid transparent;
                        border-radius: .6rem;

                        &.on {
                        background-color: var(--secondary5);
                        border-color: var(--primary1);
                        }

                        &:not(.on) > * {
                        opacity: .5;
                        }

                        .title {
                        display: flex;
                        align-items: center;
                        font-weight: var(--fw-bold);

                        img {
                            width: 2.2rem;
                            height: 2.2rem;
                            margin-right: .5rem;
                        }
                        }

                        .keyword {
                        font-weight: var(--fw-bold);
                        }

                        .control {
                        position: absolute;
                        top: 2rem;
                        right: 1.5rem;
                        display: flex;
                        align-items: center;

                        i {
                            width: .8rem;
                            height: .8rem;
                            border-radius: 50%;
                            background-color: var(--white);
                            margin-right: .5rem;
                        }
                        }
                    }
                    }
                }
            }

            .panelFooter {
            border-top: 1px solid var(--secondary1);
            padding: 1rem 2rem;
            }

        }

    }
}