@charset "utf-8";

// Fonts
@import url('https://fonts.bunny.net/css?family=Nunito');
@import "common/font";

// Variables
// Body
$font-family-base: "Nanum-Square-Neo-Regular";

// Typography
$font-family-sans-serif: "Nanum-Square-Neo-Regular";
$font-size-base: 0.9rem;
$line-height-base: 1.6;
$link-color: #2293e3;
$link-hover-color: #00558c;
$link-decoration: none;

// input
$input-border-color: #ced4da;

// Bootstrap
@import 'bootstrap/scss/bootstrap';

// Select2 - bootstrap-5
@import "select2/src/scss/core";
@import "select2-bootstrap-5-theme/src/select2-bootstrap-5-theme";

// Common
@import 'common/reset';

// CSS 파일도 함께
@import '../css/app.css';

html {
    position: relative;
}

body {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    background-color: #fff;
}

/* 관리자 기본구조 */
#aside {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    flex-grow: 1;
    width: 20%;
    min-width: 200px;
    max-width: 230px;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid #c3c4c6;
    background: #f8f9fa;
    transition: all 0.3s;

    a.logo {
        display: block;
        font-family: 'Open-Sans-Extrabold';
        font-size: 1.5rem;
        font-weight: bold;
        padding: 20px;
        color: #383838;

        &:hover,
        &:focus,
        &:active {
            color: #000;
            text-decoration: underline;
        }
    }

    ul {
        li {
            a {
                background: #F8F9FA;
                color: #0A0A0A;

                &[data-bs-toggle="collapse"] {
                    position: relative;
                }

                &[data-bs-toggle="collapse"]:before {
                    content: "\f0d7";
                    font-family: "Font Awesome 6 Free";
                    font-weight: 900;
                    position: absolute;
                    right: 1rem;
                }

                &[aria-expanded="true"]:before {
                    content: "\f0d8"
                }

                &[aria-expanded="true"] {
                    background: #E0E0E0;
                }

                &:hover,
                &:active,
                &:focus {
                    color: #0A0A0A;
                    background: #e0e0e0;
                }
            }

            &.active {
                > a {
                    color: #0A0A0A;
                    background: #e0e0e0;
                }

                div.collapse {
                    display: block;
                }
            }
        }
    }

    #footer {
        margin-top: auto;
        padding: 20px;
        text-align: right;

        p {
            margin-bottom: 0;
        }

        cite {
            display: block;
            font-size: 12px;
        }
    }
}

#main {
    flex-grow: 1;
    height: 100vh;
    padding: 20px 10px;
    overflow-y: auto;
}


.table {
    // .table-responsive & {
    //     min-width: 860px;
    // }

    caption {
        caption-side: top;
        color: #333;
    }

    th, td {
        text-align: center;
        vertical-align: middle;
        word-break: break-all;
    }

    th {
        background-color: #F3F3F3;
        white-space: nowrap;
    }

    td {
        white-space: inherit;
    }
}

div.modal {
    table {
        min-width: auto;
    }
}

/* 특수문자 입력창 */
.popup-special-char {
    display: none;
    z-index: 10;
    position: absolute;
    left: 0;
    border: 1px solid #E9E9E9;
    background: #F7F7F7;
    top: 34px;
}

.popup-special-char-list {
    z-index: 11;
    margin: 0;
    padding: 0;
    width: 190px;
    height: 150px;
    background: #FFF;
    overflow-y: scroll;

    button {
        margin: 4px;
        padding: 0;
        border: 0;
        background: transparent;
    }
}

.pagination {
    justify-content: center;
}

/* 오류 메시지 */
#infoList {
    display: block;
    color: #276F86;
    background-color: #F8FFFF;
    border-color: #A9D5DE;
    margin-bottom: 14px;

    ul {
        padding: 10px 15px 0 15px;
        margin: 0;
    }
}

#errorList {
    display: block;
    color: #9F3A38;
    background-color: #FFF6F6;
    border-color: #E0B4B4;
    margin-bottom: 14px;

    ul {
        padding: 10px 15px 0 15px;
        margin: 0;
    }
}

#warningList {
    display: block;
    color: #B58105;
    background-color: #FFF8DB;
    border-color: #E0B4B4;
    margin-bottom: 14px;

    ul {
        padding: 10px 15px 0 15px;
        margin: 0;
    }
}

/* 처리중 */
#loading {
    display: none;
    background: #000;
    opacity: 60%;
    position: fixed;
    top: 0;
    width: 100%;
    height: 100%;
    text-align: center;

    figure {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);

        img {
            width: 50%;
        }

        figcaption {
            position: relative;
            top: -50px;
            font-size: 17px;
            color: #bbb;
        }
    }
}

/* 모든 단말기 */
@media all and (-ms-high-contrast: none) {
    html {
        display: -ms-flexbox;
        display: flex;
        -ms-flex-direction: column;
        flex-direction: column;
    }
}

/* 모바일 */
@media (max-width: 767px)
{
    #aside {
        display: none;
    }

    #main {
        width: 100%;
        padding: 10px 0;
    }
}

/* 태블릿 */
@media (min-width: 768px) and (max-width: 1023px)
{
    #aside {
        display: none;
    }

    #main {
        width: 100%;
        padding: 10px 0;
    }
}

/* PC */
@media (min-width: 1024px)
{
    #aside {
        display: flex;
    }
}

.modal-body {
    table {
        min-width: auto !important;
    }
}

table.table-hover-rows {
    > tbody:hover {
        > tr {
            --bs-table-accent-bg: none;
            background-color: var(--bs-table-hover-bg);
            color: var(--bs-table-hover-color);
        }
    }
}

#orderView {
    .order-detail {
        table {
            tr {
                th{
                    font-weight: 500;
                }

                td {
                    text-align: left;
                    padding-left: 14px;
                }
            }
        }
    }
}
