@charset "UTF-8";
/* ========================================
   Header 靜態封面圖（左右滿版）
   ======================================== */
.header-cover-img {
    display: block;
    /* sidebar-header 已無 padding，直接滿版 */
    width: 100%;
    height: 250px;
    object-fit: cover;
    margin-bottom: 0.5rem;
}

/* 無地貌照片時顯示 logo：與一般封面相同滿版 cover，不加內距與底色。
   logo 本身四周有白邊，cover 裁掉的上下部分落在白邊內，主體圖文不受影響；
   底部細線讓白底 logo 與下方白色標題區有所區隔。 */
.header-cover-img.is-fallback {
    border-bottom: 1px solid #e8edf2;
}

.header-panorama-area[hidden] {
    display: none;
}

.panorama-index {
    min-width: 3.2em;
    text-align: center;
    font-size: 0.9rem;
    color: #003470;
    font-variant-numeric: tabular-nums;
    align-self: center;
}

/* ========================================
   難度燈號
   ======================================== */
.difficulty-bar {
    padding: 0.5rem 1rem 0;
}

.difficulty-pills {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.difficulty-pill {
    font-size: 1rem;
    padding: 3px 13px;
    border-radius: 20px;
    background: #f0f0f0;
    color: #5a5a5a; /* #5a5a5a on #f0f0f0 ≈ 5.9:1，符合 AA */
    white-space: nowrap;
    line-height: 1.6;
}

/* active 的顏色由 JS inline style 控制，各自符合 AA */
.difficulty-pill.active {
    font-weight: 500;
}

/* ========================================
   照片頁籤 - 靜態地點圖
   ======================================== */
.place-img {
    display: block;
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
}

.header-panorama-area {
    padding: 0.5rem 1rem;
}

/* ========================================
   海岸環景 - 縮圖預覽
   ======================================== */
.panorama-preview {
    position: relative;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
}

.panorama-preview img {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.panorama-preview:hover img {
    transform: scale(1.03);
}

.panorama-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    gap: 0.4rem;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.panorama-overlay i {
    font-size: 2rem;
}

.panorama-overlay span {
    font-size: 0.9rem;
    letter-spacing: 0.03em;
}

.panorama-preview:hover .panorama-overlay {
    background: rgba(0, 0, 0, 0.52);
}

/* ========================================
   環景彈跳視窗 - 遮罩
   ======================================== */
.panorama-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
}

.panorama-backdrop.show {
    display: block;
}

/* ========================================
   環景彈跳視窗 - 主體
   ======================================== */
/* 盡量撐滿視窗：四周只留 16px，照片區佔掉標題列以外的全部高度 */
.panorama-modal {
    display: none;
    position: fixed;
    inset: 16px;
    background: white;
    border-radius: 14px;
    z-index: 2001;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    flex-direction: column;
}

.panorama-modal.show {
    display: flex;
}

.panorama-modal-header {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 0.5rem 0.75rem 0.5rem 1rem;
    border-bottom: 1px solid #eee;
}

.panorama-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.panorama-modal-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: bold;
    font-size: 1rem;
    color: #003470;
}

.panorama-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #6b7280; /* 原 #888 僅 3.54:1 */
    padding: 0 0.2rem;
}

.panorama-close-btn:hover {
    color: #333;
}

.panorama-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 8px;
    display: flex;
}

.photo-zoom-toolbar {
    display: flex;
    gap: 6px;
}

.photo-zoom-btn {
    min-width: 36px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 10px;
    border: 1px solid #c8dcf8;
    border-radius: 8px;
    background: #f0f6ff;
    color: #003470;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.photo-zoom-btn:hover {
    background: #dcecff;
    border-color: #9fc1ee;
}

/* ========================================
   拖曳容器（overflow hidden，用 transform 移動圖片）
   ======================================== */
.panorama-drag-container {
    position: relative;
    overflow: hidden;
    cursor: grab;
    border-radius: 8px;
    flex: 1 1 auto;
    min-height: 0;
    background: #0f172a;
}

.panorama-drag-container.grabbing {
    cursor: grabbing;
}

.panorama-drag-container.is-zoomed {
    cursor: move;
}

/* 環景全圖：絕對定位，高度撐滿容器，寬度自然延伸，transform 由 JS 控制 */
.panorama-full-img {
    position: absolute;
    top: 0;
    left: 0;
    height: 150%;
    width: auto;
    min-width: 100%;
    max-width: none;
    border-radius: 8px;
    user-select: none;
    -webkit-user-drag: none;
    transform-origin: top left;
    transition: transform 0.12s ease;
    will-change: transform;
}

.panorama-drag-container.grabbing .panorama-full-img {
    transition: none;
}

/* 提示疊在照片底部中央：深色半透明膠囊，白字對比足夠，不攔截拖曳 */
.panorama-hint {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    margin: 0;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.82rem;
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* 放大後使用者已在拖曳查看，提示淡出不擋畫面 */
.panorama-drag-container.is-zoomed .panorama-hint,
.panorama-drag-container.grabbing .panorama-hint {
    opacity: 0;
}
