/* matching.css */

/* 히트맵 셀 애니메이션 및 효과 */
.heatmap-cell {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
}

.heatmap-cell:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* 가로 스크롤 영역 스크롤바 숨기기 (깔끔한 UI용) */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Matchmaker cards - smaller on mobile */
    #matchmakers-container > div {
        min-width: 150px !important;
        padding: 10px !important;
    }

    #matchmakers-container .text-lg {
        font-size: 14px;
    }

    #matchmakers-container .text-sm {
        font-size: 12px;
    }

    /* Participant cards */
    #participants-container .h-40 {
        height: 120px;
    }

    #participants-container .p-4 {
        padding: 8px;
    }

    #participants-container .text-lg {
        font-size: 14px;
    }

    #participants-container .text-sm {
        font-size: 12px;
    }

    /* Heatmap table */
    #heatmap-head th,
    #heatmap-body td {
        padding: 4px;
        font-size: 11px;
    }

    .heatmap-cell {
        padding: 4px !important;
        height: 48px !important;
    }

    .heatmap-cell .text-xl {
        font-size: 14px;
    }

    .heatmap-cell .text-\[9px\] {
        font-size: 8px;
    }

    /* Final choice diagram */
    #final-males img,
    #final-females img {
        width: 48px !important;
        height: 48px !important;
    }

    #final-males .text-sm,
    #final-females .text-sm {
        font-size: 11px;
    }

    /* Modal - comments scroll area */
    #modal-comments {
        max-height: 25vh !important;
    }
}

/* 라운드 미디어 전체화면 오버레이(matching.html #fullscreen-overlay) — 표시는 fullscreen-viewer.js 가 붙이는
   .fullscreen-mode 가 결정한다(네이티브·의사 전체화면 공통). 100dvh 는 iOS 의사 전체화면의 주소창 오차 대응 */
#fullscreen-overlay {
    display: none;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: #000;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#fullscreen-overlay.fullscreen-mode {
    display: flex;
}

#fullscreen-overlay img,
#fullscreen-overlay video {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
}

/* 줌·팬(fullscreen-viewer.js 의 --fs-scale/--fs-tx/--fs-ty) — 이미지에만. touch-action:none 으로 브라우저 고유 핀치 차단 */
#fullscreen-overlay img {
    transform: translate(var(--fs-tx, 0px), var(--fs-ty, 0px)) scale(var(--fs-scale, 1));
    transform-origin: center center;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    cursor: var(--fs-cursor, zoom-in);
    will-change: transform;
}

/* 방향 불일치 회전(.fs-rotated) — 치수를 서로 바꾸고 오버레이 중앙에 절대 배치 후 90° */
#fullscreen-overlay img.fs-rotated,
#fullscreen-overlay video.fs-rotated {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100vh;
    width: 100dvh;
    height: 100vw;
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center center;
}

#fullscreen-overlay img.fs-rotated {
    transform: translate(-50%, -50%) translate(var(--fs-tx, 0px), var(--fs-ty, 0px)) scale(var(--fs-scale, 1)) rotate(90deg);
}
