@charset "UTF-8";

/* 現在地ボタンのクラス（LeafletLocateプラグインの場合） */


/* 1. ボタン自体の土台を画像に合わせる */
.leaflet-control-locate a {
    background-image: url('/static/img/btn_gps_off.svg') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    
    /* 💡 ズレを直すための重要プロパティ */
    background-origin: border-box !important; 
    box-sizing: border-box !important;

    width: 46px !important;  /* 50pxから少しだけ小さくすると検索窓と馴染みます */
    height: 46px !important;
    border: none !important; /* 境界線を消してスッキリさせる */
    padding: 0 !important;
    background-color: white !important; /* 背景を白に設定して画像と一体化 */
    
    /* 💡 ボーダーと角丸の設定 */
    /* border: 2px solid white !important; /* 6pxだと少し太すぎる可能性があるので4〜6pxで調整 */
    border-radius: 50% !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2) !important;
    
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ONの状態 */
.leaflet-control-locate.active a {
    background-image: url('/static/img/btn_gps_on.svg') !important;
    /* ONの時は背景色もオレンジ系に合わせると、よりズレが目立たなくなります */
    background-color: #fff2e6 !important; 
}

/* 3. 標準の「ターゲット（照準）」アイコンを非表示にする */
.leaflet-control-locate a span {
    display: none !important;
}

/* 4. スマホで押しやすいように位置を完全に固定 */
.leaflet-control-locate {
    position: absolute !important;
    top: 18px !important;   /* 検索窓の top: 18px と合わせる */
    left: 12px !important;  /* 左端からの距離 */
    margin: 0 !important;   /* 余計なマージンをリセット */
}

.leaflet-touch .leaflet-bar {
	border: none!important;
}




/* 念のため、コントロール全体の配置を微調整したい場合 */
.leaflet-top.leaflet-left {
    top: 0;
}

/* 既存のスタイルに追記 */
#map-container {
    position: absolute;
    top: 0; bottom: 0; right: 0; left: 0;
    opacity: 0;
    transition: opacity 1.0s ease-in-out; 
    background-color: white; /* 背景を白にしておく */
}

/* 💡 このクラスがついたらフェードインする */
#map-container.fade-in {
    opacity: 1;
}
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* スクロールバーを出さない */
}

/* Foliumが作るiframeを全画面に強制する */
#map-container iframe {
    width: 100% !important;
    height: 100% !important;
    border: none;
}
/* ローディング画面の全体設定 */
#loader-wrapper {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* 地図より上に表示 */
    transition: opacity 0.5s ease;
}

/* クルクル回るアニメーション（CSSのみで作成） */
.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #E35000; /* ブランドカラーのオレンジ */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.search-container {
    position: absolute;
    top: 18px;
    /* right: 10px; 👈 これを消して left に変更 */
    left: 72px; /* GPSボタン(50px) + 左右の余白分を確保 */
    right: 12px; /* 右端の余白 */
    z-index: 1000;
    width: auto; /* width: 79% を解除して左右の指定に任せる */
    display: flex;
    background: white;
    padding: 2px 10px; /* 高さを少し抑えてボタンとバランスを取る */
    border-radius: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15); /* 影を少し柔らかく */
}

#search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 8px 15px;
    font-size: 16px; /* モバイルでズームされないサイズ */
    border-radius: 30px 0 0 30px;
}

#search-button {
    background: none;
    border: none;
    color: #E35000; /* ブランドカラー */
    padding: 0 15px;
    cursor: pointer;
    font-size: 18px;
}

.no-result-message {
    position: absolute;
    top: 45vh;
    left: 50%;
    /* 💡 transform は初期状態（表示時）に合わせる */
    transform: translate(-50%, 0); 
    z-index: 1001;
    background: rgba(0, 0, 0, 0.63);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    pointer-events: none;
    
    /* 💡 transition はここに書くのでOK */
    transition: opacity 1.5s ease, transform 1.5s ease;
    
    /* 💡 基本は表示状態を書いておく */
    opacity: 1;
    visibility: visible;
}

/* 💡 非表示状態（このクラスがついている間は消える） */
.no-result-message.message-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 0); 
}

/* クラスターマーカーのコンテナ（L.divIconのclassName） */
.custom-cluster-marker {
    background: none;
    border: none;
}

/* 内部のHTML構造（.htmlオプションで定義した部分） */
.custom-cluster-icon {
    width: 40px;
    height: 40px;
    background-color: #e35000;
    border:solid 3px white;
    border-radius: 50%; /* 丸くする */
    display: flex;
    flex-direction: column; /* 縦に並べる（上:アイコン, 下:数字） */
    align-items: center;
    justify-content: center;
    color: white; /* 文字とアイコンの色 */
    font-family: Arial, sans-serif;
    box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
    transition: all 0.3s cubic-bezier(.25,.8,.25,1);
}

.custom-cluster-icon:hover {
    box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}

/* 上部の虫眼鏡アイコン */
.custom-cluster-icon i {
    font-size: 14px;
    margin-bottom: 2px;
}

/* 下部の数字 */
.custom-cluster-icon span {
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}



/* ローディングを消すためのクラス */
.loader-fade-out {
    opacity: 0;
    pointer-events: none;
}

/* 強調されたピンをポワンと光らせるアニメーション */
.marker-highlight {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 1)) 
            drop-shadow(0 0 6px #e35000); /* オレンジの光芒 */
    transform-origin: bottom center;
    animation: marker-pulse 0.6s infinite alternate;
}

@keyframes marker-pulse {
    from { transform: scale(1.0); }
    to { transform: scale(2.0); } /* 少し大きくする */
}
.open-detail-btn,
.open-google-maps-btn {
    /* 1. 高さを固定せず、Flexboxで制御する */
    display: inline-flex;    /* 横並び & Flexbox有効化 */
    align-items: center;     /* 垂直方向の中央寄せ */
    justify-content: center; /* 水平方向の中央寄せ */
    
    height: 3.2em;           /* 少し高さを確保 */
    /* line-height: 2em; 👈 不要なので削除（ズレの原因） */
    
    /* 2. パディングは左右だけ指定する */
    padding: 0 1.5em;        
    
    /* 3. その他は既存のデザインを維持 */
    background-color: #E35000 !important;
    color: white !important;
    font-size: 0.9em;        /* ボタンが2つ並ぶので少しだけ小さくすると収まりが良い */
    font-weight: bold;
    text-decoration: none;
    border-radius: 50px;     /* 完全にカプセル型にする */
    
    /* 配置用の既存設定 */
    z-index: 9;
    margin: 0.5em 0 0 0;
    pointer-events: auto;
    box-sizing: border-box;  /* 枠線を含めた計算にする */
}

/* アイコン（外部サイト）がある場合の微調整 */
.open-detail-btn img {
    height: 1.2em;
    margin-left: 6px;
    /* vertical-align を気にしなくて良いのが Flexbox の強み */
}

/* ホバー時の挙動（お好みで） */
.open-detail-btn:active,
.open-google-maps-btn:active {
    transform: scale(0.96); /* 押した時に少し凹む演出 */
    opacity: 0.9;
}

.bottom-sheet {
    position: fixed;
    bottom: -100%; /* 初期は隠しておく */
    left: 0;
    width: 100%;
    height: calc(100vw); /* 画面の90%まで広がる */
    background: white;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.2);
    transition: bottom 0.3s ease-out;
    z-index: 1000;
}

/* 📍を選択した時に表示される高さ */
.bottom-sheet.show {
    bottom: -78px; /* 下部に少し（画面の30-40%分）表示させる */
}

/* 全開状態 */
.bottom-sheet.full {
    bottom: 0;
    /* height:90vh; */
    height: 100dvh; /* 💡 動的にツールバーを避けてくれます */
}

/* ドラッグハンドル（棒の部分） */
.drag-handle {
    width: 100%;
    height: 30px; /* 少し高さを取って掴みやすく */
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    cursor: grab;
    touch-action: none; /* ブラウザ標準のスクロールと競合させない */
}

.handle-bar {
    width: 40px;
    height: 5px;
    background-color: #dbdbdb; /* 目立ちすぎず、存在がわかる色 */
    border-radius: 10px;
}

.drag-handle span {
    width: 40px;
    height: 5px;
    background: #ccc;
    border-radius: 10px;
}


.spot-content-container {
    padding: 0 10px;
    height: 80dvh;
    /* 💡 初期状態はスクロール不可（ドラッグ操作を優先するため） */
    overflow-y: hidden; 
    -webkit-overflow-scrolling: touch; /* iOSでのスクロールを滑らかに */
}

/* 💡 全開時用のクラスを追加 */
.spot-content-container.scrollable {
    overflow-y: auto;
}

#spot-detail-iframe {
    width: 100%;
    height: calc(100% + 44px); 
    margin-top: -44px; 
    overflow-x: hidden;
}

/* スポットカード内の画像スタイル */
.spot-image-wrapper {
    width: 100%;
    height: auto;
    overflow: hidden;
    border-radius: 15px;
    margin-top: 10px;
    align-items: center;
}

.spot-detail-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 💡 これで画像が歪まずに収まります */
}

.spot-text-info {
    padding:0.6em 0;
}

#spot-detail-name {
    font-size: 1.6em;
    font-weight: bold;
    height: 2em;
    white-space: nowrap;     /* 改行させない */
    overflow: hidden;        /* はみ出した分を隠す */
    text-overflow: ellipsis; /* はみ出した分を「...」にする */
    position: sticky;    
    top: -1px;           /* シートの一番上で止まるように指定 */  
    z-index: 10;      /* 他のテキストより上に表示されるように */    
    background-color: #fff; /* 重要：後ろの文字が透けないように背景を白にする */   
    padding-top: 10px; /* ハンドルバーとの隙間調整 */
}

#spot-detail-point {
    font-size: 14px;
    color: #666;
}

div.evaBox {
    display:flex;
    gap:0.35em;
    height: 1em;
    margin-bottom: 0.3em;
}

div.evaluation {
    display: block;
    width:calc(1em * 5 + 0.33em);
    height: 1em;
    line-height: 1em;
    text-indent: -9999em;
    background-image: url(https://wanchanto.info/img/hyouka_stars.svg);
    background-size: cover;
    background-repeat: no-repeat;
    text-align:right;
}

div.evaluation.oneStar {
    background-position: calc(-1em * 4.4);
}

div.evaluation.twoStars {
    background-position: calc(-1em * 3.3);
}

div.evaluation.threeStars {
    background-position: calc(-1em * 2.2);
}

div.evaluation.fourStars {
    background-position: calc(-1em * 1.1);
}

div.evaluation.fiveStars {
    background-position: 0;
}
p.number span{
    font-size:1.35em;
    position:relative;
    top:0.1em;
    font-weight:bold;
}

/* map.css */

/* 以前お伝えしたベース設定（横並び用） */
/* カルーセルコンテナ */
#spot-detail-image {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 10px;
    width: 100vw;
    height: 66vw;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
}

/* 💡 新しいクラス名に合わせて定義 */
.dest-imgs {
    width: 66%;
    height: 100%;
    object-fit: cover;
    scroll-snap-align: center;
    /* border-radius は親のコンテナ側で丸めても良いですが、念のため画像にも */
    border-radius: 12px;
}

/* スクロールバーを消す */
#spot-detail-image::-webkit-scrollbar {
    display: none;
}

#detail-link {
    display:block;
    text-align:center;
    padding:1em 0 0;
    font-weight:bold;
}
.info-row {
    display: flex;
    align-items: center;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

.info-row.hidden {
    display: none; /* 💡 これで完全に消えます */
}

.icon {
    width: 16px;
    margin-right: 8px;
}

.website-link {
    color: #f36000; /* Wanchantoカラーのオレンジ */
    text-decoration: underline;
    font-weight: bold;
}

#spot-location-wrapper,
#spot-website-wrapper {
    display:block;
    padding: 1em 0;
    margin:0;
}
.review-title {
    display: flex;       /* 💡 画像と文字を横並びにする */
    align-items: center; /* 上下中央揃え */
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 8px;
}

/* 💡 新しいサムネイル画像のスタイル */
.owner-thumb {
    width: 2em;           /* 💡 指定の大きさ */
    height: 2em;          /* 💡 正方形にする */
    object-fit: cover;    /* 💡 縦横比を維持して切り抜く */
    border-radius: 50%;   /* 💡 完全に円形にする */
    margin-right: 8px;    /* 名前との隙間 */
    background-color: #eee; /* 読み込み前の背景色 */
    border: 1px solid #eee;
}
/* 日付のスタイル */
.review-date {
    font-size: 0.66em;
    color: #999;
}

.button-row {
    display: flex;
    gap: 10px;       /* ボタン同士の隙間 */
    margin: 10px 0;
}



/* 埋め込みモードの時はコントロール類を隠す */
.embed-mode .leaflet-control-zoom,
.embed-mode .leaflet-control-locate,
.embed-mode .search-container {
    display: none !important;
}