.tabs {
  display: flex;
  background-color: #f1f1f1;
}

.tab {
  flex: 1;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s;
  font-weight: bold;
}

.tab.active {
  background-color: #abccd8;
  color: white;
}

.tab:hover:not(.active) {
  background-color: #ddd;
}

.content {
  flex: 1;
  display: flex;
  position: relative;
}

.map-container {
  flex: 1;
  height: 100%;
  /* height: calc(100vh - 242px); */
  z-index: 1;
}



.map-container.vets {
  height: calc(100vh - 126px);
}

#map {
  width: 100%;
  height: 100%;
}

.info-panel {
  width: 300px;
  height: 100%;
  background-color: white;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  position: absolute;
  z-index: 2;
  padding: 40px 20px;

  top: 0;
}

.info-panel.open {
  transform: translateX(0);
}

.map-container,
.list-container {
  height: calc(100vh - 186px);
}

.map-container{
  height: calc(100vh - 130px);
  padding-top: 56px;
}

@media screen and (max-width:768px) {

  /* .info-panel{
    top: 70px;
  } */
  footer {
    display: none;
  }

  .map-container,
  .list-container {
    height: calc(100vh - 126px);
  }

  /* #map{
    height: 100% !important;
   } */
}

/* .info-content {
  
} */

.info-content h2 {
  margin-bottom: 10px;
  color: #162d56;
  font-size: 20px;
}

.info-content p {
  margin-bottom: 10px;
  line-height: 1.5;
  font-size: 15px;
  display: flex;
  gap: 3px;
}

.close-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  background-color: #abccd8;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

/* .custom-icon {
  background: white;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
} */

.vet-icon {
  background-color: #162d56;
}

.park-icon {
  background-color: #abccd8;
}

.map-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  margin: 10px 0 !important;
  padding: 7px 0 !important;
}

.map-link-wrapper {
  display: flex;
  justify-content: space-around;
  margin-top: 10px;
}

.map-link-wrapper a {
  width: 35px;
  height: 35px;
  transition: all 0.3s ease-in-out;
}

.map-link-wrapper a:hover {
  transform: scale(1.1);
}

.map-link-wrapper a img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

#locationWebsite {
  text-decoration: underline;
  cursor: pointer;
}

#locationWebsite:hover {
  color: #162d56;
}

.bottoms-tabs {
  width: 100%;
  display: flex;
  justify-content: space-between;
  position: fixed;
  bottom: 0;
  z-index: 99;
  background-color: #f1f1f1;
}


#qodef-page-inner {
  padding: 0 !important;
}

@media screen and (max-width:768px) {
  #qodef-page-outer {
    margin-top: 70px !important;
  }

  .close-btn {
    width: 25px;
    height: 25px;
    font-size: 21px;
  }

  .info-panel {
    padding: 35px 15px 75px 15px;
    width: 260px;
    z-index: 100;
  }

  /* body{
    overflow-y: hidden;
  } */


  .leaflet-top .leaflet-control {
    margin-top: 63px !important;
  }

  .tabs {
    position: fixed;
    top: 70px;
    width: 100%;
    z-index: 99;
  }
}



/* Modal 彈窗與遮罩 */
.modal-overlay {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
}


.modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  max-width: 50vw;
  width: 90vw;

  /* overflow-y: auto; */
}

.modal-content {
  overflow-y: auto;
  height: 100%;
  position: relative;
  max-height: 80vh;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.modal-content::-webkit-scrollbar {
  display: none;
}

.modal-close {
  z-index: 9999;
  position: absolute;
  top: -12px;
  right: -12px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  background-color: #abccd8;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding: 3px;
}

.modal-carousel {
  margin-bottom: 10px;
}

.swiper {
  width: 100%;
}

.swiper-slide img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.modal-swiper,
.modal-swiper .swiper-wrapper,
.modal-swiper .swiper-slide {
  max-height: 300px;
  height: 300px;
}

.swiper-button-next,
.swiper-button-prev {
  border: none !important;
  color: #162d56 !important;
  background-color: #abccd8 !important;
  border-radius: 50%;
  opacity: 0 !important;
}

.swiper-button-next::after,
.swiper-button-prev::after {
  display: block !important;
  font-size: 15px !important;
  font-weight: bold !important;
}

.swiper:hover .swiper-button-next,
.swiper:hover .swiper-button-prev {
  opacity: 1 !important;
}

.swiper-container-horizontal>.swiper-pagination-bullets,
.swiper-horizontal>.swiper-pagination-bullets {
  bottom: 0px !important;
  position: absolute !important;
}

.swiper-pagination-bullets .swiper-pagination-bullet:after {
  border-color: #162d56 !important;
}

.swiper-pagination-bullets .swiper-pagination-bullet {
  background-color: #162d56 !important;
}

.modal h2 {
  font-size: 30px;
  color: #162d56;
  margin: 0;
  line-height: 1.3;
  font-weight: 800;
}

.modal-tags {
  /* margin-bottom: 10px; */
}

.modal-tags .tag {
  display: inline-block;
  background: #abccd8;
  color: #fff;
  border-radius: 20px;
  padding: 2px 20px;
  margin-right: 5px;
  font-size: 13px;
}

.modal-stars {
  color: #FFD700;
  font-size: 18px;
  margin-top: 3px;
}

.modal-title-wrapper {
  display: flex;
  gap: 15px;
  align-items: center;
  margin: 20px 0 5px 0;
  flex-wrap: wrap;
}

.modal-row {
  margin-bottom: 8px;
  font-size: 15px;
}

.modal-row .info-label {
  color: #162d56;
  font-weight: bold;
  margin-right: 3px;
}

.modal-social a {
  margin-right: 8px;
}

.modal-nav-btn {
  display: inline-block;
  margin-right: 10px;
  background: #abccd8;
  color: #fff;
  border-radius: 20px;
  padding: 5px 18px;
  text-decoration: none;
}

.modal-reviews {
  margin-top: 18px;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

.modal-social {
  display: flex;
  gap: 8px;
  margin-right: 16px;
}

.modal-social a {
  width: 30px;
  height: 30px;
}

.modal-social a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-action-row {
  display: flex;
  align-items: center;
  margin: 18px 0 10px 0;
  justify-content: flex-end;
}

.modal-nav-btns {
  display: flex;
  gap: 10px;
}



@media screen and (max-width: 600px) {
  .modal {
    max-width: 98vw;
    padding: 15px 5px 10px 5px;
  }

  .modal-close {
    right: -5px;
    top: 0px;
    font-size: 24px;
  }
}

/* 評分星星active高亮 */
.comment-form-rating .stars a {
  display: inline-block;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.2s;
}

.comment-form-rating .stars a.active svg,
.comment-form-rating .stars a:hover svg {
  fill: #ffb400 !important;
  filter: drop-shadow(0 0 2px #ffb40033);
}

.comment-form-rating .stars a.active,
.comment-form-rating .stars a:hover {
  opacity: 1;
  transform: scale(1.08);
}







/* 列表視圖 */
.list-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: #fff;
  min-height: 260px;
  width: 100%;
  max-height: calc(100vh - 242px);
  /* overflow-y: auto; */

  padding-top: 55px;
  overflow-y: auto; 
  height: 100vh;
  -webkit-overflow-scrolling: touch; 
}

.clinic-cards-container {
  padding: 24px;
  display: grid;
  /* grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); */
  grid-template-columns: repeat(4, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1500px;
  margin: 0 auto;
}

.clinic-card {
  background: #fff;
  border: 2px solid #abccd8;
  border-radius: 16px;
  color: #fff;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 400px;
  max-height: 500px;
  box-shadow: 0 2px 8px #abccd8;
  /* overflow: hidden; */
  margin-bottom: 0;
  padding: 15px;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.clinic-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(171, 204, 216, 0.3);
}

.clinic-card .card-img {
  width: 100%;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  padding: 0;
  border-radius: 10px;
  margin-bottom: 15px;
}

.clinic-card .swiper {
  width: 100%;
  height: 100%;
}

.clinic-card .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clinic-card .swiper-pagination {
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 100%;
  text-align: center;
}

.clinic-card .card-content {
  flex: 1;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  position: relative;
}

.clinic-card .card-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 5px;
  color: #162d56;
  line-height: 1.3;
}

.clinic-card .card-stars {
  color: #FFD700;
  font-size: 14px;
  /* margin-bottom: 8px; */
  display: flex;
  align-items: center;
}

.clinic-card .card-stars span {
  color: #333;
  font-size: 14px;
  margin-left: 8px;
  margin-top: 2px;
}

.clinic-card .card-tags {
  margin: 8px 0 10px 0;
}

.clinic-card .card-tag {
  display: inline-block;
  background: #444;
  color: #fff;
  border-radius: 6px;
  padding: 2px 8px;
  margin-right: 6px;
  font-size: 12px;
}

.clinic-card .card-address {
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 5px;
}

.clinic-card .card-address span {
  font-size: 14px;
  color: #333;
  padding-top: 2px;
  line-height: 1.4;
}

.clinic-card .card-actions {
  /* margin-top: 10px; */
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.card-stars-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.go-actions {
  position: absolute;
  top: 15px;
  right: 15px;
}

.clinic-card .card-btn {
  background: #abccd8;
  color: #fff;
  border-radius: 50%;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.2s;
  width: 32px;
  height: 32px;
}

.clinic-card .card-btn:hover {
  background: #162d56;
  color: #fff;
}

.card-hours {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-bottom: 8px;
}

.card-hours-value {
  font-size: 14px;
  color: #333;
  padding-top: 2px;
  line-height: 1.4;
}

.card-info {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.card-description-value {
  font-size: 14px;
  color: #333;
  padding-bottom: 2px;
  padding-right: 10px;
  /* 強制單行顯示並添加省略號 */
  white-space: nowrap;
  /* 禁止文字換行 */
  overflow: hidden;
  /* 隱藏超出內容 */
  text-overflow: ellipsis;
  /* 超出部分顯示省略號 */

  width: 100%;
  display: block;
}

/* 列表篩選欄 */
.list-filter-bar {
  display: flex;
  justify-content: center;
  gap: 30px;
  align-items: center;
  background: #f8fafb;
  box-shadow: 0 2px 8px #0001;
  padding: 18px 28px 12px 28px;
  margin: 0 0 18px 0;
  /* position: sticky; */
  top: 0px !important;
  z-index: 10;
  position: relative !important;
  width: 100%;
  
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;

}

.filter-label {
  font-weight: bold;
  color: #162d56;
  margin-right: 4px;
  width: 100%;
  margin-bottom: 0;
}

.filter-select {
  border: 1px solid #abccd8;
  border-radius: 8px;
  padding: 5px 16px;
  font-size: 1rem;
  background: #fff;
  color: #162d56;
  outline: none;
  transition: border 0.2s;
  width: 300px;
}

.filter-select:focus {
  border-color: #162d56;
}

.filter-select option.status-open {
  color: #1bbf4c;
  font-weight: bold;
}

.filter-select option.status-closed {
  color: #aaa;
  font-weight: bold;
}

.filter-select option.status-24h {
  color: #ff9800;
  font-weight: bold;
}

/* 卡片狀態標籤顏色 */
.clinic-card .card-tag[style*="background:#1bbf4c"] {
  background: #1bbf4c !important;
}

.clinic-card .card-tag[style*="background:#ff9800"] {
  background: #ff9800 !important;
}

.clinic-card .card-tag[style*="background:#aaa"] {
  background: #aaa !important;
}


.region-cascade-select {
  position: relative;
  min-width: 160px;
  user-select: none;

}

.region-cascade-selected {
  border: 1px solid #abccd8;
  border-radius: 8px;
  padding: 5px 16px;
  font-size: 1rem;
  background: #fff;
  color: #162d56;
  cursor: pointer;
  min-width: 120px;
  transition: border 0.2s;
}

.region-cascade-selected.active,
.region-cascade-selected:focus {
  border-color: #162d56;
}

.region-cascade-dropdown {
  position: absolute;
  left: 0;
  top: 110%;
  display: flex;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px #0002;
  z-index: 100;
  min-width: 360px;
  padding: 0;
  border: 1px solid #abccd8;
  justify-content: space-between;
}

.region-main-list,
.region-sub-list,
.region-detail-list {
  list-style: none;
  margin: 0 !important;
  padding: 0;
  min-width: 33.33%;
  background: #fff;
  max-height: 200px;
  overflow-y: auto;
  flex: 1;
}

.region-main-list {
  border-radius: 8px 0 0 8px;
}

.region-sub-list {
  border-radius: 0px;
}

.region-detail-list {
  border-left: 1px solid #eee;
  border-radius: 0 8px 8px 0;
}

.region-main-list li,
.region-sub-list li,
.region-detail-list li {
  padding: 12px 18px;
  cursor: pointer;
  color: #333;
  transition: background 0.2s, color 0.2s;
  font-size: 16px;
  white-space: nowrap;
}

.region-main-list li.active,
.region-main-list li:hover {
  background: #abccd8;
  color: #fff;
}

.region-sub-list li.active,
.region-sub-list li:hover {
  background: #abccd8;
  color: #fff;
}

.region-detail-list li.active,
.region-detail-list li:hover {
  background: #abccd8;
  color: #fff;
}

.region-sub-list {
  display: none;
  border-left: 1px solid #eee;
}

.region-sub-list::-webkit-scrollbar {
  display: none;
}

.region-detail-list::-webkit-scrollbar {
  display: none;
}


.region-cascade-dropdown.show-sub .region-sub-list {
  display: block;
}

.region-cascade-dropdown.show-detail .region-detail-list {
  display: block;
}

.status-cascade-select {
  position: relative;
  min-width: 160px;
  user-select: none;
}

.status-cascade-selected {
  border: 1px solid #abccd8;
  border-radius: 8px;
  padding: 5px 16px;
  font-size: 1rem;
  background: #fff;
  color: #162d56;
  cursor: pointer;
  min-width: 120px;
  transition: border 0.2s;
}

.status-cascade-selected.active,
.status-cascade-selected:focus {
  border-color: #162d56;
}

.status-cascade-dropdown {
  position: absolute;
  left: 0;
  top: 110%;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px #0002;
  z-index: 100;
  min-width: 180px;
  padding: 0;
  border: 1px solid #abccd8;
  display: none;
}

.status-list {
  list-style: none;
  margin: 0 !important;
  padding: 0;
  background: #fff;
  max-height: 260px;
  overflow-y: auto;
  border-radius: 10px;
}

.status-list li {
  padding: 12px 18px;
  cursor: pointer;
  color: #333;
  transition: background 0.2s, color 0.2s;
  font-size: 16px;
  white-space: nowrap;
}

.status-list li.active,
.status-list li:hover {
  background: #abccd8;
  color: #fff;
}


/* 中等屏幕响应式 */
@media screen and (max-width: 1024px) {
  .clinic-cards-container {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    padding: 20px;
  }
}

@media screen and (max-width: 768px) {
  .modal-action-row {
    flex-direction: column;
    align-items: flex-start;
    row-gap: 10px;
  }

  .list-filter-bar {
    flex-direction: column;
    gap: 10px;
    top: 126px;
    align-items: flex-start;
    /* position: relative; */
  }

  .list-filter-bar .filter-label {
    width: 90px;
  }

  .clinic-cards-container {
    /* grid-template-columns: 1fr; */
    width: 100%;
    gap: 15px;
    padding: 15px;
  }

  .clinic-card {
    width: 100%;
    flex-direction: column;
    max-height: unset;
  }

  .clinic-card .card-img {
    width: 100%;
    /* height: 180px; */
    margin-bottom: 0;
    overflow: hidden;
  }

  .clinic-card .card-content {
    width: 100%;
    margin-top: 15px;
    padding: 0;
  }

  .clinic-card .card-tags {
    margin: 8px 0 10px 0;
  }

  .clinic-card .card-tag {
    font-size: 13px;
  }

  .map-container {
    /* height: calc(100vh - 166px); */
    height: calc(100vh - 70px);
    padding-top: 56px;
  }

  .list-container {
    max-height: calc(100vh - 126px);
    height: 100%;
    padding-top: 170px;
  }

  .swiper:hover .swiper-button-next,
  .swiper:hover .swiper-button-prev {
    display: none;
  }

  .modal h2 {
    font-size: 24px;
  }

  .region-cascade-dropdown {
    min-width: 200px !important;
    left: -50%;
  }

  .region-main-list li,
  .region-sub-list li {
    font-size: 15px;
  }

  .status-cascade-dropdown {
    min-width: 160px;
  }

  .status-list li {
    font-size: 15px;
  }

  
  .list-filter-bar{
    position: fixed;
    width: 100%;
    transition: transform 0.3s ease;
    z-index: 100;
    transform: translateY(0);
  }
}





.tabs{
  position: relative !important;
  /* top: 100px;
  left: 0; */
  width: 100%;
  transition: transform 0.3s ease;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(0);
}

.tabs.hide {
  transform:none !important;
}


.list-filter-bar.hide {
  transform: translateY(-160%);
}