/* 打開地圖的按鈕 */
.map-button {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1rem;
    border: none;
    background-color: #d82a43;
    color: white;
    cursor: pointer;
    margin:0 0 10px 0;
}

/* 畫面縮成手機板時，會在左下角fixed出現的地圖搜尋按鈕 */
#map-search-floating-button {
    position: fixed;
    bottom: 64px;
    left: 6px;
    z-index: 99;
    text-decoration: none;
    display: block;
    color: #fff;
    font-size: 26px;
    padding: 5px;
    height: 50px;
    width: 50px;
    background: #d82a43;
    border-radius: 50%;
    cursor: pointer;
}
#map-search-floating-button:hover{opacity:.8}
#map-search-floating-button i{position:relative;left:6px;bottom:5px}

/* 按下地圖搜尋按鈕時，會出現的滿版地圖 */
#mapOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  flex-direction: column;
  background-color: white;
  z-index: 1000;
}
.map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background-color: #f0f0f0;
  border-bottom: 1px solid #ccc;
}
.map-header span {
  font-size: 1rem;
  font-weight: bold;
}
.map-header button {
  padding: 0.3rem 0.7rem;
  background-color: #d33;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
#mapContainer {
  flex: 1;
  width: 100%;
  height: 100%;
  background-color: #eee;
}

/* 搜尋時蓋住地圖的遮罩 */
#lockOverlay{
    position: relative;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(255,255,255,0.4);
    z-index: 999;
    display: none;
    cursor: wait;
}

/* "搜尋此地區"按鈕*/
#searchThisBoundaryBtn {
    position: relative;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 6px 13px;
    background-color: white;
    color: #FF5A5F;
    font-size: 1rem;
    border: 0.5px solid grey;
    border-radius: 30px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    display: none;
    cursor: pointer;
}
#searchThisBoundaryBtn:hover {
    background-color: #f2e1e1;
}

/* 地圖搜尋時的轉圈動畫 */
#map-loader {
  position: absolute;
  top: 45%;
  left: 50%;
  width: 80px;
  height: 80px;
  margin: -40px 0 0 -40px;
  border-radius: 50%;
  background-color: white;
  z-index: 9999;
  display: none;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
#map-loader::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 6px solid rgba(255, 0, 0, 0.2); /* 淡紅圓環 */
  box-sizing: border-box;
}
#map-loader::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 6px solid transparent;
  border-top-color: #FF5A5F; /* 深紅色 arc */
  box-sizing: border-box;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 地圖上標記飯店價格的小元件 */
.price-marker .price-bubble {
    position: relative;
    display: inline-block;
    background-color: #FF5A5F;
    color: white;
    font-weight: bold;
    padding: 5px 10px;
    border: 1px solid white;
    border-radius: 15px;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.price-marker .price-bubble::after {  /* 尖角 */
    content: "";
    position: absolute;
    left: 50%;
    bottom: -5px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 7px solid #FF5A5F;
    z-index: 1;
}
.price-marker .price-bubble::before {  /* 「白色外框」，用偽元素包住尖角 */
    content: "";
    position: absolute;
    left: 50%;
    bottom: -8px;
    transform: translateX(-50%);
    width: 0;
    height: 0;

    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 8px solid white;
    z-index: 0;
}
.price-marker .price-bubble:hover {
    background-color: #D93B3F;
}
.price-marker .price-bubble:hover::after {
    border-top-color: #D93B3F;
}
/* 顯示panel的期間，將價格泡泡變色 */
.price-marker .price-bubble.active {
    background-color: #007AFF;
}
.price-marker .price-bubble.active::after {
    border-top-color: #007AFF;
}

/* 點價格標籤後，會顯示在畫面下方的飯店資訊面板圖卡 */
#mapHotelInfoPanel {
    position: fixed;
    bottom: 15px;
    left: 50%;
    display: none;
    cursor: pointer;
    transform: translateX(-50%);
    width: 95%;
    max-width: 600px;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#mapHotelInfoPanel .card-content {
  display: flex;
  align-items: center;
}

#mapHotelInfoPanel .hotel-image{
  flex: 0 0 40%;
  max-width: 40%;
  height: 180px;
}

#mapHotelInfoPanel .hotel-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#mapHotelInfoPanel .hotel-details {
  flex: 0 0 60%;
  max-width: 60%;
  padding: 15px;
}

#mapHotelInfoPanel .close-btn {
  position: absolute;
  right: 5px;
  border: none;
  background: transparent;
  font-size: 2rem;
  color: #999;
  cursor: pointer;
  transition: color 0.2s ease;
  z-index: 1001;
}
#mapHotelInfoPanel .close-btn:hover {
  color: #333;
}