@charset "utf-8";

/* 메인 화면 팝업 (frontend/homepage/components/Popup.module.css 이식) */

#main_popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    /* 노치·홈 인디케이터 영역 피하기 */
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
        max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

#main_popup[hidden] {
    display: none;
}

#main_popup .popup_dim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

#main_popup .popup_box {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* 닫기(X) 버튼: 팝업 왼쪽 상단 고정, 터치 영역 44px 이상 */
#main_popup .popup_close_btn {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 9999px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.2s ease;
}

#main_popup .popup_close_btn:hover,
#main_popup .popup_close_btn:focus-visible {
    background: rgba(0, 0, 0, 0.85);
}

#main_popup .popup_close_btn svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #ffffff;
    stroke-width: 2.5;
    stroke-linecap: round;
}

/* 이미지 영역 */
#main_popup .popup_img_area {
    position: relative;
    flex: 1;
    width: 100%;
    overflow: hidden;
    background: #f3f4f6;
}

#main_popup .popup_track {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease-out;
}

#main_popup .popup_item {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f3f4f6;
}

#main_popup .popup_img_box {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

#main_popup .popup_img_box img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#main_popup .popup_img_empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 14px;
}

/* 하단 영역 */
#main_popup .popup_bottom {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    background: #f9fafb;
}

/* 모바일: 점 인디케이터 */
#main_popup .popup_dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ffffff;
}

#main_popup .popup_dot {
    width: 8px;
    height: 8px;
    padding: 0;
    background: #d1d5db;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#main_popup .popup_dot.active {
    width: 24px;
    background: #1f2937;
}

/* PC: 팝업 탭 */
#main_popup .popup_tabs {
    display: flex;
    width: 100%;
}

#main_popup .popup_tab {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    overflow: hidden;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: #ffffff;
    border: none;
    border-right: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

#main_popup .popup_tab:last-child {
    border-right: none;
}

#main_popup .popup_tab:hover {
    background: #f3f4f6;
}

#main_popup .popup_tab.active,
#main_popup .popup_tab.active:hover {
    color: #ffffff;
    background: #000000;
}

/* 닫기 / 오늘 하루 보지 않기 */
#main_popup .popup_actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: #000000;
}

#main_popup .popup_action_btn {
    padding: 0;
    color: #d1d5db;
    font-size: 14px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

#main_popup .popup_action_btn:hover {
    color: #ffffff;
}

/* display 를 지정한 하위 요소(점 인디케이터/탭)도 hidden 속성이 우선하도록 */
#main_popup .popup_dots[hidden],
#main_popup .popup_tabs[hidden] {
    display: none;
}
