/*--------------------------------------------------------------------------
    Layout
--------------------------------------------------------------------------*/
    #app {
        position: relative;
        width: 100%;
        height: 100%;
        padding-top: 90px;
        max-width: 720px;
        margin: 0 auto;
    }

/*--------------------------------------------------------------------------
    Header
--------------------------------------------------------------------------*/
    #header {
        position: fixed;
        z-index: 30;
        top: 0;
        left: 0;
        width: 100%;

        -webkit-transition-duration: .75s;
        transition-duration: .75s;

        -webkit-transition-timing-function: cubic-bezier( 0.215, 0.610, 0.355, 1.000 );
        transition-timing-function: cubic-bezier( 0.215, 0.610, 0.355, 1.000 );

        -webkit-transition-property: -webkit-transform, background;
        transition-property: transform, background;
    }

    #header.hide {
        -webkit-transform: translateY( -100% );
        -ms-transform: translateY( -100% );
        transform: translateY( -100% );
    }

/*  header design */
    #logo {
        width: 320px;
    }

    #logo a {
        display: block;
        height: 60px;
        background-image: url(/logo.svg);
        background-repeat: no-repeat;
    }

    #header.invert #logo a {
        background-image: url(/logo-white.svg);
    }

    #header section {
        display: flex;
        align-items: center;
        padding: 1rem 1.5rem;
        max-width: 960px;
        margin-left: auto;
        margin-right: auto;
    }

    #header a {
        color: var(--black);
    }

    #header a:hover {
        color: var(--red-dark);
        transition: color .3s ease-out;
    }

    @media (min-width: 576px) {
        #app {
            max-width: 540px;
        }

        #header section {
            max-width: 540px;
            padding-left: 0;
        }
    }

    @media (min-width: 768px) {
        #app {
            max-width: 720px;
            padding-top: 124px;
        }

        #header section {
            max-width: 720px;
            padding-top: 3rem;
        }
    }

    /*@media (min-width: 992px) {
        #app {
            max-width: 960px;
        }

        #header section {
            max-width: 1004px;
        }
    }*/

/*--------------------------------------------------------------------------
    nav
--------------------------------------------------------------------------*/
    #nav {
        position: fixed;
        z-index: -1;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        padding-top: 80px;
        background-color: #fff;
        transform: translateY(-100vh);
        opacity: 0;
        transition: all 0.5s ease-in;

        width: 100%;
        height: 100%;
        overflow-y: auto;
        min-height: 100vh;
        min-height: -webkit-fill-available;

        display: grid;
        grid-template-rows: auto 1fr auto;
    }

    #header.nav-open #nav {
        opacity: 1;
        transform: translateY(0);
        transition: all 0.5s ease;
    }

    #nav > ul {
        display: grid;
        grid-gap: 1rem;
        grid-template-columns: repeat(2, 1fr);
        list-style: none;
        margin: 0;
        padding: 1.5rem;
        font-size: 1.5rem;
        line-height: 1;
    }

    /* 최상위 메뉴 */
    #nav > ul > li {
        font-family: var(--font-serif);
        font-weight: 700;
        font-size: 2rem;
        border: dashed 1px var(--black);
        border-radius: 0.5rem;
        background-size: cover;
        background-position: top center;
    }

    #nav > ul > li:hover {
        border: solid 1px var(--black);
    }

    #nav > ul > li.has-bg, #nav > ul > li.has-bg:hover {
        border: none;
    }

    #nav > ul > li > a {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
    }

    #nav > ul > li.has-bg > a {
        color: #fff;
        text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
    }

    #nav > ul > li.has-bg > a:hover {
        color: var(--red-dark);
    }

    #nav .home {
        text-align: center;
        padding-top: 28px;
        font-family: var(--font-serif);
    }

    #nav .member-nav {
        padding: 2rem;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #nav .member-nav a {
        font-size: 30px;
        margin: 1rem;
    }

    /* 서브메뉴 */
    #nav > ul > li > ul {
        position: fixed;
        z-index: 11;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #fff;
        list-style: none;
        padding: 80px 1rem 1rem 1rem;
        margin: 0;
        transform: translateX(100%);
        transition: transform 0.3s ease-out;
        overflow-y: auto;
        text-align: center;
    }

    #header.nav-open #nav > ul > li > ul.sub-open {
        transform: translateX(0);
        transition: transform 0.5s cubic-bezier( 0.2, 0.5, 0.3, 1 );

        display: grid;
        grid-template-rows: auto auto 1fr;
    }

    #nav > ul > li > ul a.back {
        display: inline-block;
        font-size: 1rem;
        margin-bottom: 1rem;
        padding-right: 1rem;
    }

    #nav > ul > li > ul a.back i {
        font-size: 0.8em;
    }

    #nav > ul > li > ul > li.title {
        font-family: var(--font-gothic);
        font-weight: 700;
        margin-bottom: 2rem;
    }

    #nav > ul > li > ul .subs {
        display: grid;
        gap: 1rem;
        grid-template-columns: repeat(2, 1fr);
        padding-bottom: 100px;
    }

    #nav > ul > li > ul .subs li {
        background-size: cover;
        background-position: top center;
        border: dashed 1px var(--black);
        border-radius: 0.5rem;
    }

    #nav > ul > li > ul .subs li:hover {
        border: solid 1px var(--black);
    }

    #nav > ul > li > ul .subs li.has-bg, #nav > ul > li > ul .subs li.has-bg:hover {
        border: none;
    }

    #nav > ul > li > ul .subs li a {
        font-family: var(--font-serif);
        font-weight: 300;
        font-size: 2rem;

        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
    }

    #nav > ul > li > ul .subs li.has-bg a {
        color: #fff;
        text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
    }

    #nav > ul > li > ul .subs li.has-bg a:hover {
        color: var(--red-dark);
    }

    #nav > ul > li > ul .subs li a .menu-id {
        display: none;
    }

    #nav > ul > li.logon {
        grid-column: span 2;
        text-align: center;
        font-size: medium;
    }

    @media (min-width: 576px) {
        #nav > ul {
            margin: 1.5rem auto;
        }
    }

    @media (min-width: 768px) {
        #nav > ul > li {
            font-size: 3rem;
        }

        #nav > ul, #nav > ul > li > ul .subs {
            grid-template-columns: repeat(3, 1fr);
        }
    }

    /*@media (min-width: 992px) {
        #nav > ul, #nav > ul > li > ul .subs {
            grid-template-columns: repeat(4, 1fr);
        }
    }*/

/*  nav .search */
    #nav .search .search-input {
        display: flex;
        margin: 1rem 1.5rem;
    }

    #nav .search input[type="text"] {
        width: 100%;
        border: solid 1px var(--bs-gray-100);
        background-color: var(--bs-gray-100);
        border-radius: 0;
        font-size: 1.25rem;
        line-height: 1.5;
        padding: .5rem;
        -webkit-appearance: none;
    }

    #nav .search input[type="text"]:focus {
        outline: none;
    }

    #nav .search button {
        border: solid 1px var(--bs-gray-100);
        background-color: var(--bs-gray-100);
        padding: 0 1rem;
    }

    @media (min-width: 768px) {
        #nav .search {
            max-width: 720px;
            margin: 1rem auto;
        }
    }

/*  nav-icon */
    #nav-icon {
        position: relative;
        width: 16px;
        height: 16px;
        margin-right: 1rem;

        -webkit-tap-highlight-color: transparent;
    }

    #nav-icon:before,
    #nav-icon:after {
        content: '';
        position: absolute;
        inset: 0;
    }

    #nav-icon:hover {
        cursor: pointer;
    }


    #nav-icon span {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;

        border-radius: 50%;
        z-index: 1;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #nav-icon span:before {
        content: '';
        position: absolute;
        top: 0;
        left: -50%;
        width: 100%;
        height: 100%;
    }

    #nav-icon em, #nav-icon em::after, #nav-icon em::before {
        display: block;
        position: relative;
        height: 1px;
        width: 16px;
        background-color: #000;
        backface-visibility: hidden;
    }

    #nav-icon em::before, #nav-icon em::after {
        position: absolute;
        content: '';
        left: 0;
        transition: transform .2s;
    }

    #nav-icon em::before {
        transform: translateY(-5px)
    }

    #nav-icon em::after {
        transform: translateY(5px)
    }

    #header.invert #nav-icon em, #header.invert #nav-icon em::after, #header.invert #nav-icon em::before {
        background-color: #fff;
    }

    #header.nav-open #nav-icon em {
        background-color: transparent;
        box-shadow: none;
    }

    #header.nav-open #nav-icon em::before {
        background-color: #000;
        transform: rotate(45deg);
    }

    #header.nav-open #nav-icon em::after {
        background-color: #000;
        transform: rotate(-45deg);
    }

    #header.nav-open #logo a {
        background-image: url(/logo.svg);
    }

    #header form[name="logout"] button {
        border: none;
        padding: 0;
        background: none;
        font-size: 30px;
        line-height: 30px;
        transition: color .5s;
    }

    #header form[name="logout"] button:hover {
        color: var(--red-dark);
        transition: color .5s;
    }

/*--------------------------------------------------------------------------
    Form
--------------------------------------------------------------------------*/
    .form-control:focus,
    .form-select:focus {
        box-shadow: none;
        background-color: var(--blue-light);
        transition: all .5s;
    }

    input::placeholder, textarea::placeholder {
        color: var(--bs-gray-400);
        font-weight: 300;
    }

/*--------------------------------------------------------------------------
    Components
--------------------------------------------------------------------------*/
    ul.error {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    ul.error li {
        border: solid 1px var(--bs-gray-200);
        border-radius: 4px;
        background-color: var(--bs-gray-100);
        margin: 1px 0;
        text-align: left;
        padding: .5rem 1rem;
        font-size: 0.85rem;
        font-weight: 600;
    }

    /* paginator */
    nav.paginator {

    }

    nav.paginator .pc {
        display: none;
    }

    @media (min-width: 576px) {
        nav.paginator .pc {
            display: block;
        }

        nav.paginator .mobile {
            display: none;
        }
    }

    .page-link {
        font-weight: 600;
        font-size: 0.9rem;
        background-color: rgba(255,255,255,0.4);
        text-shadow: 0 0 3px #fff;
    }

    .page-link:link, .page-link:visited {
        color: #000;
    }

    .page-link:hover {
        color: #000;
    }

/*--------------------------------------------------------------------------
    Auth
--------------------------------------------------------------------------*/
    main.centered-box {
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    form.auth {
        width: 100%;
        max-width: 600px;
        padding: 1.5rem;
        padding-bottom: 125px;
    }

    form.auth .form-submit button {
        margin-left: 1rem;
        height: 100%;
    }

    body.swal2-height-auto {
        height: 100% !important;
    }

/*--------------------------------------------------------------------------
    files
--------------------------------------------------------------------------*/
    .files-wrap {
        display: flex;
        flex-wrap: wrap;
    }

    .files-wrap input {
        flex: 1 1 auto;
        width: 1%;
        min-width: 32%;
        margin: 1px;
    }

    ul.file-edit-form {
        list-style: none;
        margin: 1rem 0;
        padding: 0;
    }

    ul.file-edit-form li {
        margin: 1rem 0;
        padding: 0
    }

    ul.file-edit-form li label {
        font-weight: 700;
        font-size: 0.6rem;
        color: var(--bs-gray-600);
    }

    ul.file-edit-form input[type=text],
    ul.file-edit-form input[type=file],
    ul.file-edit-form textarea {
        width: 100%;
        border: none;
        background-color: var(--bs-gray-100);
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    ul.file-edit-form input[type=text],
    ul.file-edit-form input[type=file] {
        margin-bottom: 3px;
    }

    ul.file-edit-form input[type=text]:focus,
    ul.file-edit-form input[type=file]:focus,
    ul.file-edit-form textarea:focus {
        outline: none;
        background-color: var(--blue-light);
        transition: all .5s;
    }

    ul.file-edit-form .file-info {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        font-size: 0.75rem;
        font-weight: 600;
        margin-top: 3px;
    }

    ul.file-edit-form .file-info span {
        margin-right: 1rem;
    }

    ul.file-edit-form li.remove {
        opacity: 0.3;
    }

    @media (min-width: 768px) {
        ul.file-edit-form {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            grid-gap: 1rem;
        }

        ul.file-edit-form li {
            margin: 0;
        }
    }
