/* Optional: hide drawer on compare page */
body.page-compare-hikes #lhCompareDrawer{ display:none !important; }

/* =========================================
   COMPARE TABLE — clean list style
   ========================================= */

.lh-compare-page{
  display: grid;
  gap: 12px;
}

.lh-compare-actions.card{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}

.lh-compare-tablewrap.card{
  background: rgba(0,0,0,.04) !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 18px !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.lh-compare-table{
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.lh-compare-table thead th{
  background: transparent !important;
  position: static !important;
  border: 0 !important;
  padding: 0 14px 10px !important;
  text-align: left;
  vertical-align: bottom;
}

.lh-compare-rowlabel{
  width: 170px;
  font-weight: 700;
  color: rgba(0,0,0,.55);
  padding: 10px 14px !important;
  white-space: nowrap;
}

.lh-compare-sticky{
  position: static !important;
  left: auto !important;
  z-index: auto !important;
  background: transparent !important;
  backdrop-filter: none !important;
}

.lh-compare-table td{
  padding: 10px 14px !important;
  border: 0 !important;
  font-weight: 500;
  color: rgba(0,0,0,.75);
}

.lh-compare-table tbody tr:nth-child(odd) td,
.lh-compare-table tbody tr:nth-child(odd) th{
  background: rgba(0,0,0,.045);
}

.lh-compare-table tbody tr:nth-child(even) td,
.lh-compare-table tbody tr:nth-child(even) th{
  background: transparent;
}

.lh-compare-headcell{
  display: block !important;
  min-width: 210px;
}

.lh-compare-thumb{
  display: block;
  width: 160px;
  height: 100px;
  border-radius: 2px;
  overflow: hidden;
  border: 0;
  background: rgba(0,0,0,.06);
}

.lh-compare-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lh-compare-thumbph{
  display:block;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,.07);
}

body.page-compare-hikes .lh-compare-title{
  display: block;
  font-weight: 700;
  color: rgba(0,0,0,.85);
  text-decoration: none;
  line-height: 1.2;
}

body.page-compare-hikes .lh-compare-title:hover{
  text-decoration: underline;
}

body.page-compare-hikes .lh-compare-headmeta .small{
  font-size: 12px;
  color: rgba(0,0,0,.55);
  font-weight: 600;
}

body.page-compare-hikes .lh-compare-remove-link{
  display: inline-block;
  margin-top: 8px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: rgba(0,0,0,.55);
  font-weight: 600;
  text-decoration: underline;
}

body.page-compare-hikes .lh-compare-remove-link:hover{
  color: rgba(0,0,0,.75);
}

@media (max-width: 640px){
  body.page-compare-hikes .lh-compare-table{ min-width: 640px; }
  body.page-compare-hikes .lh-compare-tablewrap.card{ padding: 14px !important; }
  body.page-compare-hikes .lh-compare-rowlabel{ width: 140px; }
  body.page-compare-hikes .lh-compare-thumb{ width: 150px; height: 92px; }
}

/* =========================================
   Compare drawer compact styling
   ========================================= */

#lhCompareDrawer .lh-compare-list{
  max-height: 340px;
}

#lhCompareDrawer .lh-compare-item{
  display: grid;
  grid-template-columns: 46px 1fr 30px;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

#lhCompareDrawer .lh-compare-thumb{
  width: 46px !important;
  height: 38px !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  border: 1px solid var(--border) !important;
  background: rgba(0,0,0,.06) !important;
}

#lhCompareDrawer .lh-compare-thumb img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

#lhCompareDrawer .lh-compare-title,
#lhCompareDrawer .lh-compare-item-title,
#lhCompareDrawer .lh-compare-name{
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#lhCompareDrawer.is-collapsed #lhCompareToggle .lh-compare-toggle-icon{
  display: inline-block !important;
}

#lhCompareDrawer.is-collapsed #lhCompareRatio{
  display: inline-block !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

@media (max-width: 820px){
  #lhCompareDrawer.lh-compare-drawer:not(.is-collapsed){
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 12px;
    transform: none;
    width: auto;
    max-height: 52vh;
  }

  #lhCompareDrawer.lh-compare-drawer:not(.is-collapsed) .lh-compare-list{
    max-height: 26vh;
  }

  #lhCompareDrawer.lh-compare-drawer.is-collapsed{
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    pointer-events: none !important;
  }

  #lhCompareDrawer.lh-compare-drawer.is-collapsed #lhCompareToggle{
    position: fixed !important;
    right: 14px !important;
    bottom: calc(14px + env(safe-area-inset-bottom)) !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    z-index: 1200 !important;
    pointer-events: auto !important;
  }
}