@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&display=swap");

@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");

@font-face {
    font-family: "GmarketSansMedium";
    src: url("https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansMedium.woff") format("woff");
    font-weight: normal;
    font-style: normal;
}

@supports (height: 100dvh) {
    .area {
        height: 100dvh; /* 최신 브라우저에서만 덮어씀 */
    }
}

:root{
  --vh: 1vh;           /* 실측 vh */
  --kb-padding: 0px;   /* 키보드 여백(동적) */
}

/* Reset some basic elements to remove default browser styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

button,
a,
input,
div {
    -webkit-tap-highlight-color: transparent;
}

/* Basic HTML5 defaults */
html {
    font-size: 100%;
    /* 16px */
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: "Noto Sans KR", sans-serif;
    background-color: #f5f5f5;
    color: #333;
    margin: 0 auto;
    padding: 0;
    line-height: 1.5;
    max-width: 480px;
    position: relative;
    z-index: 1;
}

html,
body {
    height: 100vh;
    user-select: none;
}

:lang(ko) {
    word-break: keep-all;
}

/* Links */
a {
    /* color: #007bff; */
    /* text-decoration: none; */
    color: inherit;
    text-decoration: inherit;
}

a:hover,
a:focus {
    color: #0056b3;
    text-decoration: underline;
    cursor: pointer;
}

a:active, button:active {
    background-color: none; /* 기본 배경 제거 */
    color: inherit; /* 텍스트 색상 유지 */
}

/* Images */
/* img {
    max-width: 100%;
    height: auto;
    display: block;
} */

/* Form elements */
input,
button,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
    outline: none;
    border: none;
}

/* 모든 브라우저 대응용 */
input::placeholder {
    color: #ccc;
    opacity: 1; /* iOS 사파리 투명도 이슈 방지 */
}

/* iOS 사파리 전용 (WebKit) */
input::-webkit-input-placeholder {
    color: #ccc;
}

/* Firefox 전용 */
input::-moz-placeholder {
    color: #ccc;
}

/* Internet Explorer 10-11 */
input:-ms-input-placeholder {
    color: #ccc;
}

/* Microsoft Edge */
input::-ms-input-placeholder {
    color: #ccc;
}

select {
    /*ios대응*/
    appearance: none; /* iOS, Android 공통 */
    -webkit-appearance: none; /* iOS */
    -moz-appearance: none; /* Firefox */

    /*화살표 배경 넣기*/
    background: url("../images/arrow.png") no-repeat 96% 50% #f8f8f8;
    background-size: 16px 16px;
}

select:invalid {
    color: #ccc; /* placeholder 색상 */
}

select::-ms-expand {
    display: none;
    /* 화살표 없애기 for IE10, 11*/
}

select {
    color: #000 !important; /* 원하는 색상 */
    -webkit-appearance: none !important;
    appearance: none !important;
}

/* iOS Safari 전용 */
select:focus {
    color: #000 !important;
}

/* option도 함께 */
select option {
    color: #000 !important;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox  */
input[type="number"] {
    -moz-appearance: textfield;
}


/* Basic layout elements */
header,
nav,
main,
footer,
section,
article,
aside {
    display: block;
}

/* Utility classes */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.hidden {
    display: none !important;
}

.visually-hidden {
    border: 0;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.margin-top {
    margin-top: 1rem;
}

.margin-bottom {
    margin-bottom: 1rem;
}

.padding {
    padding: 1rem;
}

.border {
    border: 1px solid #ddd;
}

.rounded {
    border-radius: 0.25rem;
}

.bg-light {
    background-color: #f8f9fa;
}

.bg-dark {
    background-color: #343a40;
    color: #fff;
}

.bg-primary {
    background-color: #007bff;
    color: #fff;
}

.area {
    font-size: 1rem;
    padding: 1rem;
    background: #fff;
    position: relative;

    overflow: scroll;
    overflow-x: hidden;
    overflow-y: auto;
}

/* 스크롤 되는 메인 영역 */
.area{
  min-height: 100vh;
  height: calc(var(--vh) * 100);
  padding-bottom: calc(16px + var(--kb-padding, 0px) + env(safe-area-inset-bottom, 0px));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.container {
    width: 100%;
    margin-right: auto;
    margin-left: auto;

    padding-bottom: 24px;
}

.container:first-of-type {
    padding-top: 24px;
}

.container:last-of-type {
    padding-bottom: 0;
}

.container.footer {
    padding: 16px 0 16px;
    background: linear-gradient(to bottom, rgb(255 255 255 / 0%), white 15%);
    bottom: 0;
}

/* 메뉴 */
.tnv {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 20px;
    position: relative;
    height: 30px;
}

.tnv > div {
    /* width: calc(100% / 3); */
    flex: 1;
}

.tnv .tnv_info {
    font-family: "GmarketSansMedium", sans-serif;
    font-weight: 400;
    letter-spacing: -1px;
    padding-top: 5px;
    text-align: center;
    white-space: nowrap;
}

.tnv .tnv_info a {
    font-size: 20px;
    text-decoration: none;
}

.tnv a {
    color: #000;
}

.tnv a.back {
    text-align: left;
    font-size: 24px;
}

.tnv a.menu {
    text-align: right;
}

/* 햄버거버튼 */
.ham {
    width: 40px;
    height: 40px;
    cursor: pointer;
    border-radius: 3px;
    position: relative;
    z-index: 1000;
}

.ham .bar {
    display: block;
    width: 0px;
    height: 4px;
    border-radius: 3px;
    background-color: #000;
    margin-top: 28px;
    margin-left: 9px;
    right: 31px;
    position: absolute;
}

.ham .bar:before {
    content: "";
    width: 30px;
    height: 3px;
    border-radius: 3px;
    background-color: #000;
    position: absolute;
    left: 0;
    bottom: 10px;
    transition: transform 0.3s;
}

.ham .bar:after {
    content: "";
    width: 30px;
    height: 3px;
    border-radius: 3px;
    background-color: #000;
    position: absolute;
    left: 0;
    bottom: 10px;
    transition: transform 0.3s;
}

.ham.active span:before {
    transform: rotate(45deg);
    transition: transform 0.3s 0.8s;
}

.ham.active span:after {
    transform: rotate(-45deg);
    transition: transform 0.3s 0.8s;
}

.ham:before {
    content: "";
    width: 30px;
    height: 3px;
    background-color: #000;
    border-radius: 3px;
    position: absolute;
    right: 1px;
    bottom: 10px;
    transition: width 0.3s 0.4s;
}

.ham:after {
    content: "";
    width: 30px;
    height: 3px;
    background-color: #000;
    border-radius: 3px;
    position: absolute;
    right: 1px;
    top: 11px;
    transition: width 0.3s 0.4s;
}

.ham.active:before {
    width: 0;
    right: 1px;
    bottom: 10px;
}

.ham.active:after {
    width: 0;
    right: 1px;
    top: 11px;
}

/*스크롤*/
::-webkit-scrollbar {
    width: 4px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background-color: #ffffff00;
}

::-webkit-scrollbar-thumb {
    background-color: #dedede;
    border-radius: 8px;
    cursor: pointer;
}

::-webkit-scrollbar-button:start:decrement,
::-webkit-scrollbar-button:end:increment {
    width: 12px;
    height: 12px;
    background: #fff;
    cursor: pointer;
}

.scroll::-webkit-scrollbar {
    display: none;
}

.scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.fr {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.fc {
    display: flex;
    flex-direction: column;
    align-items: center;
}

nav a {
    pointer-events: none;
}

nav.nav-open a {
    pointer-events: inherit;
}


/*장소검색*/
.ui-widget {
    font-family: "Noto Sans KR", sans-serif !important;
    font-size: 1rem !important;
    width: 100% !important;
}

.ui-widget-content {
    background: #fff;
    max-height: 500px;
    overflow: auto;
    overflow-x: hidden;
    overflow-y: scroll;
}

.ui-menu .ui-menu-item {
    padding: 5px 16px !important;
}

.ui-menu .ui-menu-item:last-child {
    border-bottom: 1px dashed #fff;
}

.ui-menu .ui-menu-item:hover,
.ui-menu .ui-menu-item:focus {
    background: #e0f2ff;
    color: #003571;
}

.ui-state-focus,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus {
    background: #e0f2ff !important;
    color: #003571 !important;
}

.ui-menu .ui-menu-item > div {
    color: #090909;
    letter-spacing: -1px;
}

.ui-widget-content {
    border: none !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.ui-widget-content .highlight {
    color: dodgerblue;
    font-weight: 500;
}

.ui-widget-content .sido {
    font-size: 14px;
    color: #777;
    word-break: break-all;
    display: inline-block;
    line-height: 1.3;
    margin-top: 4px;
}

.ui-menu .ui-state-focus,
.ui-menu .ui-state-active {
    margin: 0 !important;
}

/* Alert Modal 열림 상태 */

/* 모달 */
.area.alert-modal-open {
    overflow: hidden; /* Body 스크롤 방지 */
    position: fixed;
    width: 100%;
    max-width: 480px;
}

/* Alert Modal 전체 컨테이너 */
.alert-modal {
    max-width: 480px;
    width: 100%; /* 모바일 환경 대응 */
    height: 100%;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.2); /* 배경 반투명 */
    backdrop-filter: blur(5px); /* 배경 블러 효과 */
    visibility: hidden;
    opacity: 0;
    z-index: 3000; /* 다른 요소 위에 표시 */
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Alert Modal 열림 상태 */
.area.alert-modal-open .alert-modal {
    visibility: visible;
    opacity: 1;
}

.outside_alert_modal {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 100%;
    transition: all 0.5s ease-in-out;
}

.area.alert-modal-open .outside_alert_modal {
    top: 0;
    left: 0;
}

/* Alert Modal Body */
.alert-modal-body {
    width: 80%;
    background: #ffffff; /* 흰색 배경 */
    border-radius: 24px; /* 모서리 둥글게 */
    box-shadow: 0px -5px 20px rgba(0, 0, 0, 0.2);
    padding: 20px;
    text-align: center;
    animation: scaleUp 0.3s ease-in-out; /* 팝업 효과 */

    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

/* 팝업 스케일 애니메이션 */
@keyframes scaleUp {
    from {
        transform: scale(0.9);
        opacity: 0.8;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Modal Header */
.alert-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.alert-head #alert-modal-title {
    font-weight: 600;
    font-size: 18px;
    color: #222;
}

.alert-head .btn-close {
    cursor: pointer;
    position: relative;
    font-size: 1.3rem;
    transition: color 0.2s ease;
}

.alert-head .btn-close:hover {
    color: #000; /* 닫기 버튼 호버 색상 */
}

/* Modal Content */
.alert-content {
    min-height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #696969;
    width: 100%;
}

.alert-content p {
    text-align: left;
}

/* Modal Footer */
.alert-footer {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* Confirm Button */
.alert-footer {
    width: 100%;
}

.alert-footer .btn-confirm {
    width: 100%;
    padding: 12px;
    background: #1a242d;
    color: #fff;
    border-radius: 16px;
}

.alert-footer .btn-confirm:hover {
    color: #e0b433;
    font-weight: 600;
}

/*qr*/
.qr_div {
    position: absolute;
    left: calc(100% + 32px);
    bottom: 15%;
    background: #fff;
    width: 200px;
    padding: 25px;
    border-radius: 24px;
}

.qr_div img {
    width: 55%;
    aspect-ratio: 1/1;
}

.qr_div h3 {
    font-size: 16px;
}

.qr_div p {
    font-size: 12px;
    margin-top: 10px;
    color: #aaa;
}

@media (max-width: 800px) {
    .qr_div {
        display: none;
    }
}