/**
 * 픽콘 지도 (FindPickcon) CSS
 * 
 * 네이버 지도 관련 스타일
 * - 미니맵 (Home 페이지 내)
 * - 전체화면 지도 모달
 * - 점포 정보 패널
 * - 출력 바텀시트
 */

/* =====================================================
   1. 미니맵 영역 (Home 페이지 내)
   ===================================================== */
.find-pickcon {
    width: 100%;
    height: 30vh;
    min-height: 200px;
    border: 1px solid #d8dde8;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

/* =====================================================
   2. 네이버 지도 컨트롤 위치 조정
   ===================================================== */
/* 줌 컨트롤 - 좌측 상단 */
#map [class*="zoom"],
#mapFullscreen [class*="zoom"] {
    left: 10px !important;
    right: auto !important;
}

/* 축척 컨트롤 - 좌측 */
#map .map_scale,
#mapFullscreen .map_scale {
    left: 10px !important;
    right: auto !important;
}

/* =====================================================
   3. 현위치 버튼
   ===================================================== */
.current-pos-btn {
    position: relative;
    margin-left: 10px;
    margin-top: 5px;
    width: 28px;
    height: 28px;
    z-index: 100;
    border: 1px solid #444;
    border-radius: 2px;
    background: #fcfcfd;
    overflow: hidden;
    cursor: pointer;
}

.current-pos-btn::before {
    position: absolute;
    content: "";
    width: 20px;
    height: 20px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: url("https://ssl.pstatic.net/static/maps/m/spr_trff_v6.png");
    background-position: -153px -31px;
    background-size: 200px 200px;
}

/* =====================================================
   4. 크게보기 버튼
   ===================================================== */
.map-expand-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
    background-color: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 7px;
    padding: 10px 40px 10px 10px;
    font-size: 12px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.map-expand-btn::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background-repeat: no-repeat;
    background-size: contain;
}

.map-expand-btn svg {
    display: none;
}

/* =====================================================
   5. 미니맵 점포 정보 패널
   ===================================================== */
.pickcon-info {
    position: absolute;
    bottom: 30px;
    left: 20px;
    right: 20px;
    background: white;
    padding: 10px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 11;
}

.pickcon-info.active {
    display: block;
}

.pickcon-info .info-row {
    display: flex;
    align-items: center;
}

.pickcon-info .shop-details {
    flex: 1;
    min-width: 0;
}

.pickcon-info .shop-name {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pickcon-info .shop-address {
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pickcon-info .shop-distance {
    font-size: 11px;
    color: #5a86ff;
    margin-left: 6px;
    white-space: nowrap;
}

.pickcon-info .price-info {
    font-size: 11px;
    color: #555;
}

.pickcon-info .shop-icon {
    width: 32px;
    height: 32px;
    margin-left: 10px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.pickcon-info .status {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

.pickcon-info .status.online {
    background: #e8f5e9;
    color: #2e7d32;
}

.pickcon-info .status.offline {
    background: #ffebee;
    color: #c62828;
}

/* =====================================================
   6. 전체화면 지도 모달
   ===================================================== */
.map-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.map-fullscreen-overlay.active {
    display: flex;
}

.map-fullscreen {
    width: 90vw;
    max-width: 800px;
    height: 70vh;
    max-height: 600px;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    position: relative;
}

.map-fullscreen-close {
    position: absolute;
    top: -30px;
    right: 0;
    z-index: 10001;
    cursor: pointer;
    width: 24px;
    height: 24px;
}

/* =====================================================
   7. 전체화면 지도 - 상시 출력하기 버튼
   ===================================================== */
.fullscreen-print-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10002;
    background: #5a86ff;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
}

.fullscreen-print-btn:active {
    background: #4a76ef;
}

.fullscreen-print-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
}

/* =====================================================
   8. 전체화면 지도 - 점포 정보 패널
   ===================================================== */
.fullscreen-pickcon-info {
    position: absolute;
    bottom: 30px;
    left: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    z-index: 10002;
    display: none;
    padding: 10px 12px;
}

.fullscreen-pickcon-info.active {
    display: block;
}

.fullscreen-pickcon-info .info-row {
    display: flex;
    align-items: center;
}

.fullscreen-pickcon-info .shop-details {
    flex: 1;
    min-width: 0;
}

.fullscreen-pickcon-info .shop-name {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fullscreen-pickcon-info .shop-address {
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fullscreen-pickcon-info .shop-distance {
    font-size: 11px;
    color: #5a86ff;
    margin-left: 6px;
    white-space: nowrap;
}

.fullscreen-pickcon-info .price-text {
    font-size: 11px;
    color: #555;
}

.fullscreen-pickcon-info .shop-icon {
    width: 32px;
    height: 32px;
    margin-left: 10px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* 편의점 아이콘은 PHP에서 인라인 스타일로 background-image 설정 */

/* 점검중 상태 */
.fullscreen-pickcon-info .checking-msg {
    display: none;
    font-size: 11px;
    color: #c62828;
    margin-bottom: 2px;
}

.fullscreen-pickcon-info.disable .checking-msg {
    display: block;
}

.fullscreen-pickcon-info.disable .shop-name,
.fullscreen-pickcon-info.disable .shop-address,
.fullscreen-pickcon-info.disable .price-text {
    display: none;
}

/* 이용 상태 뱃지 */
.fullscreen-pickcon-info .status {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

.fullscreen-pickcon-info .status.online {
    background: #e8f5e9;
    color: #2e7d32;
}

.fullscreen-pickcon-info .status.offline {
    background: #ffebee;
    color: #c62828;
}

/* =====================================================
   9. 출력 바텀시트 (전체화면 지도용)
   ===================================================== */
.print-bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10003;
    display: none;
}

.print-bottom-sheet-overlay.active {
    display: block;
}

.print-bottom-sheet {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    background-color: white;
    border-radius: 30px 30px 0 0;
    width: 100%;
    height: 100px;
    position: fixed;
    left: 0;
    bottom: -100px;
    z-index: 10004;
    transition: bottom 0.3s ease;
}

.print-bottom-sheet.active {
    bottom: 0;
}

.print-bottom-sheet .fixed-grid {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
    cursor: pointer;
}

.print-bottom-sheet .fixed-grid img {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
}

.print-bottom-sheet .fixed-grid span {
    font-size: 12px;
    color: #333;
}

/* =====================================================
   PC 레이아웃 — 400px 고정
   ===================================================== */
@media (min-width: 450px) {
    .map-fullscreen-overlay {
        max-width: 400px;
        left: 50%;
        transform: translateX(-50%);
    }

    .print-bottom-sheet-overlay {
        max-width: 400px;
        left: 50%;
        transform: translateX(-50%);
    }

    .print-bottom-sheet {
        max-width: 400px;
        left: 50%;
        transform: translateX(-50%);
    }
}
