:root {
    --common-modal-width-sm: 500px;
    --common-modal-width-md: 40rem;
    --common-modal-width-lg: 51.25rem;
    --common-modal-height-sm: 20rem;
    --common-modal-height-md: 30rem;
    --common-modal-height-lg: 45rem;
    --common-modal-backdrop-color: rgb(0 0 0 / 0.7);
    --common-modal-reservation-backdrop-color: var(--theme-color-overlay-black-80);
    --common-modal-backdrop-blur: 6px;
}

.common-modal {
    position: fixed;
    z-index: 1050;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 10px;
}

dialog.common-modal {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    color: inherit;
    background: transparent;
}

dialog.common-modal:not([open]),
dialog.common-modal[hidden] {
    display: none;
}

dialog.common-modal::backdrop {
    background: transparent;
}

.common-modal__backdrop {
    position: absolute;
    inset: 0;
    background: var(--common-modal-backdrop-color);
    -webkit-backdrop-filter: blur(var(--common-modal-backdrop-blur));
    backdrop-filter: blur(var(--common-modal-backdrop-blur));
}

.common-modal__backdrop--transparent {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.common-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--common-modal-width-md);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    min-width: 0;
    overflow: auto;
    overscroll-behavior: contain;
    color: inherit;
    background: var(--theme-color-surface);
    border-radius: 5px;
    box-shadow: var(--theme-shadow-dialog);
}

.common-modal__dialog--sm {
    max-width: var(--common-modal-width-sm);
    max-height: min(var(--common-modal-height-sm), calc(100vh - 20px));
    max-height: min(var(--common-modal-height-sm), calc(100dvh - 20px));
}
.common-modal__dialog--md {
    max-width: var(--common-modal-width-md);
    max-height: min(var(--common-modal-height-md), calc(100vh - 20px));
    max-height: min(var(--common-modal-height-md), calc(100dvh - 20px));
}
.common-modal__dialog--lg {
    max-width: var(--common-modal-width-lg);
    max-height: min(var(--common-modal-height-lg), calc(100vh - 20px));
    max-height: min(var(--common-modal-height-lg), calc(100dvh - 20px));
}

.common-modal__dialog--sm > .common-modal__body > .pop_box {
    max-height: min(calc(var(--common-modal-height-sm) - 2.5rem), calc(100vh - 4.375rem));
    max-height: min(calc(var(--common-modal-height-sm) - 2.5rem), calc(100dvh - 4.375rem));
}
.common-modal__dialog--full { max-width: none; height: 100%; max-height: none; border-radius: 0; }

.common-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12.5px;
    border-bottom: 1px solid var(--theme-color-border-light);
}

.common-modal__title { min-width: 0; overflow-wrap: anywhere; font-size: 16px; font-weight: 700; }

.common-modal__close {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 15px;
    line-height: 1;
    color: inherit;
    background: transparent;
    border: 0;
}

.common-modal__body { padding: 12.5px; }
.common-modal__close:focus-visible, .common-modal__dialog:focus-visible { outline: 2px solid var(--theme-color-action-primary); outline-offset: 2px; }

/* Keep modal content scrollable while hiding browser-specific scrollbar chrome. */
.common-modal,
.common-modal * {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.common-modal::-webkit-scrollbar,
.common-modal *::-webkit-scrollbar {
    display: none;
}

.common-modal--reservation {
    display: flex;
    overflow: auto;
    padding: 10px 15px;
    font-size: 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.common-modal--reservation::-webkit-scrollbar {
    display: none;
}

.common-modal--reservation .common-modal__backdrop--dimmed {
    background: var(--common-modal-reservation-backdrop-color);
}

.common-modal--reservation > .common-modal__dialog {
    max-height: none;
    margin: auto;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
}

.common-modal--reservation > .common-modal__dialog--md > .common-modal__body > .pop_box {
    height: min(var(--common-modal-height-md), calc(100vh - 4.375rem));
    height: min(var(--common-modal-height-md), calc(100dvh - 4.375rem));
    max-height: min(var(--common-modal-height-md), calc(100vh - 4.375rem));
    max-height: min(var(--common-modal-height-md), calc(100dvh - 4.375rem));
}

.common-modal--reservation > .common-modal__dialog--lg > .common-modal__body > .pop_box {
    height: min(var(--common-modal-height-lg), calc(100vh - 4.375rem));
    height: min(var(--common-modal-height-lg), calc(100dvh - 4.375rem));
    max-height: min(var(--common-modal-height-lg), calc(100vh - 4.375rem));
    max-height: min(var(--common-modal-height-lg), calc(100dvh - 4.375rem));
}

.common-modal--reservation .common-modal__header {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.common-modal--reservation .common-modal__close {
    display: none;
}

.common-modal--reservation .common-modal__body {
    padding: 0;
}

.common-modal--reservation .pop_box {
    display: flex;
    width: 100%;
    flex-direction: column;
    position: relative;
    margin: auto;
    box-shadow: 0 0 10px var(--theme-color-overlay-black-15);
    text-align: left;
    pointer-events: auto;
}

.common-modal--reservation .pop_box > .con_box {
    min-height: 0;
    max-height: calc(100vh - 70px);
    max-height: calc(100dvh - 70px);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.common-modal--reservation .pop_box > .con_box::-webkit-scrollbar {
    display: none;
}

.common-modal--reservation .pop_tit {
    display: block;
    padding: 12px 15px;
    border-radius: 10px 10px 0 0;
    background: var(--theme-color-slider-pagination);
    color: var(--theme-color-white);
    font-size: 16px;
    overflow-wrap: break-word;
}

.common-modal--reservation .con_each {
    min-width: 0;
    padding: 15px;
    border-radius: 0 0 10px 10px;
    background: var(--theme-color-white);
}

.common-modal--reservation .con_each .bg_box {
    display: block;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 10px;
    background: var(--theme-color-search-panel);
    font-size: 1.125em;
    font-weight: 500;
    text-align: center;
}

.common-modal--reservation .con_each .bg_box .chk_each {
    display: block;
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 400;
    text-align: left;
}

.common-modal--reservation .con_each .bg_box .chk_each:last-child {
    margin-bottom: 0;
}

.common-modal--reservation .img_top_box {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 15px;
}

.common-modal--reservation .img_top_box > .img_box {
    position: relative;
    flex: none;
    width: auto;
    height: 160px;
    overflow: hidden;
    border-radius: 10px;
}

.common-modal--reservation .img_top_box > .img_box img {
    position: absolute;
    top: 50%;
    left: 50%;
    max-width: 100%;
    transform: translate(-50%, -50%);
}

.common-modal--reservation .img_top_box > .con_box {
    flex: 1;
    min-width: 0;
    margin-top: 15px;
}

.common-modal--reservation .img_top_box .tit1 {
    position: relative;
    display: block;
    margin-bottom: 10px;
    padding-bottom: 10px;
    font-size: 15px;
    font-weight: 500;
}

.common-modal--reservation .img_top_box .tit1::after {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 24px;
    height: 1px;
    background: var(--theme-color-disabled);
    content: '';
}

.common-modal--reservation .tableB + .info_box {
    margin-top: 20px;
}

.common-modal--reservation .btn_box button {
    display: inline-block;
    padding: 8px 20px;
    margin: 0 5px;
    white-space: nowrap;
    color: var(--theme-color-white);
    background: transparent;
    border: 1px solid var(--theme-color-white);
    border-radius: 30px;
    font-size: 15px;
}

.common-modal--reservation .btn_box {
    position: static;
    width: 100%;
    flex: 0 0 auto;
    margin-top: 10px;
    text-align: center;
    pointer-events: auto;
}

.common-modal--reservation .btn_box .pop_x .ico {
    display: inline-block;
    position: relative;
    padding-right: 20px;
}

.common-modal--reservation .btn_box .pop_x .ico::after {
    position: absolute;
    top: 50%;
    right: 0;
    width: 12px;
    height: 12px;
    margin-top: -5px;
    background: url("../../../common/img/ko/pop_x.png") no-repeat;
    content: '';
}

.common-modal--reservation::before {
    display: none;
}

@media (min-width: 768px) {
    .common-modal--reservation {
        padding-right: 10px;
        padding-left: 10px;
    }
}

@media (min-width: 1025px) {
    .common-modal--reservation .pop_box > .con_box {
        max-height: calc(100vh - 80px);
        max-height: calc(100dvh - 80px);
    }

    .common-modal--reservation .pop_tit {
        padding: 17px 30px;
        border-radius: 30px 30px 0 0;
        background: var(--theme-color-slider-pagination) url("../../../common/img/ko/pop_bg.png") no-repeat right bottom;
        font-size: 20px;
    }

    .common-modal--reservation .con_each {
        padding: 30px;
        border-radius: 0 0 30px 30px;
    }

    .common-modal--reservation .con_each .bg_box {
        margin-bottom: 30px;
    }

    .common-modal--reservation .con_each .bg_box .chk_each {
        display: inline-block;
        margin: 0;
        text-align: center;
    }

    .common-modal--reservation .img_top_box {
        flex-direction: row;
        gap: 25px;
        margin-bottom: 30px;
    }

    .common-modal--reservation .img_top_box > .img_box {
        flex: 0 0 255px;
        width: 255px;
        height: 155px;
    }

    .common-modal--reservation .img_top_box > .con_box {
        margin-top: 0;
    }

    .common-modal--reservation .img_top_box .tit1 {
        margin-bottom: 15px;
        padding-bottom: 16px;
        font-size: 1.25em;
    }

    .common-modal--reservation .tableB + .info_box {
        margin-top: 25px;
    }

    .common-modal--reservation .btn_box button {
        padding: 12px 30px;
        font-size: 16px;
    }
}

