/* ===================================================
   CB Reef Shop Directory — UI (clean, sharp, Divi-safe)
   Markup uses: .cb-reefdir + .cb-reefdir__*
   =================================================== */

.cb-reefdir{
  margin: 18px 0;
}

/* ---------------------------
   Controls / filter bar
   --------------------------- */
.cb-reefdir .cb-reefdir__controls{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:12px 12px;
  margin: 12px 0 10px;
}

/* Search field grows on desktop */
.cb-reefdir .cb-reefdir__search{
  flex: 1 1 360px;
  min-width: 280px;
}

/* Checkbox strip */
.cb-reefdir .cb-reefdir__modes{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 10px;

  padding: 8px 12px;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 12px;
  background: rgba(0,0,0,0.015);
}

.cb-reefdir .cb-reefdir__check{
  display:flex;
  align-items:center;
  gap:6px;
  user-select:none;
  font-size: 13px;
}

.cb-reefdir .cb-reefdir__check input{
  transform: translateY(1px);
}

/* Keep Region + County + Reset together on desktop */
.cb-reefdir .cb-reefdir__loc{
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  gap:10px;
  white-space:nowrap;
}

@media (max-width: 980px){
  .cb-reefdir .cb-reefdir__loc{
    flex-wrap:wrap;
    white-space:normal;
  }
}

/* Make controls bigger + override Divi defaults (minimal !important) */
.cb-reefdir .cb-reefdir__controls input[type="search"],
.cb-reefdir .cb-reefdir__controls select,
.cb-reefdir .cb-reefdir__controls button{
  height: 40px !important;
  line-height: 40px !important;
  padding: 0 12px !important;

  font-size: 14px !important;
  border: 1px solid rgba(0,0,0,0.18) !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 1px 0 rgba(0,0,0,0.03) !important;
}

.cb-reefdir .cb-reefdir__controls select{
  padding-right: 30px !important;
}

.cb-reefdir .cb-reefdir__controls button{
  cursor:pointer;
  padding: 0 16px !important;
}

.cb-reefdir .cb-reefdir__controls button:hover{
  border-color: rgba(0,0,0,0.30) !important;
}

/* ---------------------------
   Meta line
   --------------------------- */
.cb-reefdir .cb-reefdir__meta{
  margin: 10px 0 12px;
  font-size: 13px;
  opacity: .85;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.cb-reefdir .cb-reefdir__hint code{
  background: rgba(0,0,0,0.04);
  padding: 2px 6px;
  border-radius: 6px;
}

/* ---------------------------
   Table
   --------------------------- */
.cb-reefdir .cb-reefdir__tablewrap{
  overflow:auto;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  background:#fff;
}


.cb-reefdir .cb-reefdir__tablewrap.is-collapsed-scroll{
  overflow: auto;
  overscroll-behavior: contain;
}

.cb-reefdir .cb-reefdir__table{
  width: 100%;
  border-collapse: collapse;
  min-width: 980px; /* keeps columns readable on desktop */
}

.cb-reefdir .cb-reefdir__table th,
.cb-reefdir .cb-reefdir__table td{
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  vertical-align: top;
  font-size: 14px;
}

/* Sticky header */
.cb-reefdir .cb-reefdir__table th{
  position: sticky;
  top: 0;
  z-index: 1;

  background: rgba(0,0,0,0.045);
  font-size: 13px;
  font-weight: 600;

  text-align:left;
  cursor:pointer;
  white-space:nowrap;
}

/* Zebra + hover */
.cb-reefdir .cb-reefdir__table tbody tr:nth-child(even){
  background: rgba(0,0,0,0.022);
}

.cb-reefdir .cb-reefdir__table tbody tr:hover{
  background: rgba(0,0,0,0.04);
}

.cb-reefdir .cb-reefdir__table tbody tr{
  transition: background 0.15s ease;
}


.cb-reefdir .cb-reefdir__table tbody tr.is-map-active{
  background: rgba(42,127,255,0.14) !important;
}

.cb-reefdir .cb-reefdir__table tbody tr.is-map-active:hover{
  background: rgba(42,127,255,0.18) !important;
}

/* First column slightly bolder (shop name) */
.cb-reefdir .cb-reefdir__table tbody td:first-child{
  font-weight: 600;
}

/* Links */
.cb-reefdir .cb-reefdir__shop a{
  text-decoration:none;
}

.cb-reefdir .cb-reefdir__shop a:hover{
  text-decoration:underline;
}


.cb-reefdir .cb-reefdir__tabletogglewrap{
  margin-top: 10px;
  text-align: center;
}

/* ---------------------------
   "See more" button
   --------------------------- */
.cb-reefdir .cb-rsd-see-more{
  margin-top: 0;
  height: 40px;
  line-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 10px;
  background: rgba(0,0,0,0.03);
  cursor: pointer;
}

.cb-reefdir .cb-rsd-see-more:hover{
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.30);
}

/* ---------------------------
   Disclaimer / Suggest blocks
   --------------------------- */
.cb-reefdir .cb-reefdir__blocks{
  margin-top: 14px;
  display:grid;
  gap:12px;
}

.cb-reefdir .cb-reefdir__disclaimer,
.cb-reefdir .cb-reefdir__suggest{
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(0,0,0,0.02);
  font-size: 14px;
  line-height: 1.4;
}

.cb-reefdir .cb-reefdir__suggest ul{
  margin: 8px 0 0 18px;
}
/* ---------------------------
   Map
   --------------------------- */

.cb-reefdir .cb-reefdir__map{
  width:100%;
  height: clamp(360px, 42vw, 560px);
  background:#f6f6f6;
}

@media (max-width: 767px){
  .cb-reefdir .cb-reefdir__map{
    height: 340px;
  }
}

.cb-reefdir .cb-reefdir__mapblock{
  margin: 0 0 14px;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.cb-reefdir .cb-reefdir__maphead{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  background: rgba(0,0,0,0.02);
  font-size: 14px;
}

.cb-reefdir .cb-reefdir__maphint,
.cb-reefdir .cb-reefdir__mapstatus{
  color:#666;
  font-size:13px;
}


.cb-reefdir .cb-reefdir__mapstatus{
  padding: 10px 14px 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.cb-reefdir-map-popup__title{
  font-weight: 700;
  margin: 0 0 4px;
}

.cb-reefdir-map-popup__meta{
  font-size: 13px;
  color: #555;
  margin: 0 0 4px;
}

.cb-reefdir .cb-reefdir__mapheadcopy{
  display:grid;
  gap:4px;
}

.cb-reefdir .cb-reefdir__mapactions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.cb-reefdir .cb-reefdir__mapactions button{
  height: 38px !important;
  line-height: 38px !important;
  padding: 0 14px !important;
  border: 1px solid rgba(0,0,0,0.18) !important;
  border-radius: 10px !important;
  background: #fff !important;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0,0,0,0.03) !important;
}

.cb-reefdir .cb-reefdir__mapactions button:hover{
  border-color: rgba(0,0,0,0.30) !important;
}

.cb-reefdir .cb-reefdir__mapactions button:disabled{
  opacity:.7;
  cursor:wait;
}


.cb-reefdir .cb-reefdir__mapactions select{
  height: 38px !important;
  line-height: 38px !important;
  padding: 0 34px 0 12px !important;
  border: 1px solid rgba(0,0,0,0.18) !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 1px 0 rgba(0,0,0,0.03) !important;
  font-size: 14px !important;
}

.cb-reefdir .cb-distance{
  font-size: 0.85em;
  font-weight: 500;
  color: #666;
  margin-left: 6px;
  white-space: nowrap;
}


.cb-reefdir .cb-reefdir__reviews{
  text-align:center;
  white-space:nowrap;
}

.cb-reefdir .cb-reefdir__reviews a{
  display:inline-block;
  min-width: 24px;
  text-decoration:none;
  font-weight:600;
}

.cb-reefdir .cb-reefdir__reviews a:hover{
  text-decoration:underline;
}



.cb-reefdir .leaflet-popup-content-wrapper{
  border-radius: 12px;
}

.cb-reefdir .leaflet-popup-content{
  margin: 12px 14px;
}

.cb-reefdir-map-popup{
  min-width: 210px;
  line-height: 1.45;
}

.cb-reefdir-map-popup__title{
  display:block;
  margin: 0 0 4px;
  color:#16344a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.cb-reefdir-map-popup__meta{
  margin: 0 0 8px;
  color: #555;
}

.cb-reefdir-map-popup__row,
.cb-reefdir-map-popup__line{
  margin: 3px 0;
}

.cb-reefdir-map-popup__line a,
.cb-reefdir-map-popup__jump{
  text-decoration:none;
}

.cb-reefdir-map-popup__guide{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-weight:700;
  text-decoration:none;
}

.cb-reefdir-map-popup__stars{
  color:#d4a017;
  letter-spacing:.02em;
}

.cb-reefdir-map-popup__stars--empty{
  color:#8a99a8;
}

.cb-reefdir-map-popup__count{
  color:#516a7e;
  font-weight:600;
}

.cb-reefdir-map-popup__call--disabled,
.cb-reefdir-map-popup__no-website{
  color:#7b8794;
}

.cb-reefdir-map-popup__rating{
  display: inline-block;
  margin: 0;
  font-weight: 500;
  text-decoration: none;
  color: #666;
  letter-spacing: 0.01em;
}

.cb-reefdir-map-popup__rating-count{
  color: #2271b1;
  font-weight: 600;
}

.cb-reefdir-map-popup__rating:hover,
.cb-reefdir-map-popup__rating:hover .cb-reefdir-map-popup__rating-count,
.cb-reefdir-map-popup__line a:hover,
.cb-reefdir-map-popup__jump:hover,
.cb-reefdir-map-popup__guide:hover{
  text-decoration: underline;
}


/* ===================================================
   CoralBay framed shell + map polish
   =================================================== */

.cb-reefdir .cb-reefdir__shell{
  border: 2px solid #c7d6e2;
  border-radius: 18px;
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 18%, #ffffff 100%);
  box-shadow: 0 10px 28px rgba(16, 38, 58, 0.08);
  overflow: hidden;
}

.cb-reefdir .cb-reefdir__controls{
  margin: 0;
  padding: 14px 18px;
  background: linear-gradient(180deg, #eef5fb 0%, #e8f1f8 100%);
  border-bottom: 1px solid #c9d8e4;
}

.cb-reefdir .cb-reefdir__meta{
  margin: 0;
  padding: 10px 18px 0;
}

.cb-reefdir .cb-reefdir__mapblock{
  margin: 14px 18px 16px;
  border: 1px solid #c7d6e2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(18, 44, 67, 0.06);
  overflow: hidden;
}

.cb-reefdir .cb-reefdir__maphead{
  padding: 12px 16px;
  background: linear-gradient(180deg, #f7fafc 0%, #edf4f9 100%);
  border-bottom: 1px solid #cfdee8;
}

.cb-reefdir .cb-reefdir__mapheadcopy strong{
  display: block;
  margin: 0 0 3px;
  color: #183a53;
}

.cb-reefdir .cb-reefdir__maphint{
  color: #516575;
}

.cb-reefdir .cb-reefdir__mapstatus{
  padding: 0;
  border-top: 0;
  color: #124c7c;
  font-size: 13px;
  font-weight: 700;
  margin-top: 6px;
}

.cb-reefdir .cb-reefdir__tablewrap{
  margin: 0 18px;
}

.cb-reefdir .cb-reefdir__tabletogglewrap{
  margin: 10px 18px 18px;
}

.cb-reefdir .cb-reefdir__map,
.cb-reefdir .leaflet-container{
  border-radius: 12px;
}

.cb-reefdir .cb-reefdir__map{
  background: #d8e7f1;
}

@media (max-width: 767px){
  .cb-reefdir .cb-reefdir__controls{
    padding: 12px 14px;
  }

  .cb-reefdir .cb-reefdir__meta{
    padding: 10px 14px 0;
  }

  .cb-reefdir .cb-reefdir__mapblock{
    margin: 12px 14px 14px;
  }

  .cb-reefdir .cb-reefdir__tablewrap{
    margin: 0 14px;
  }

  .cb-reefdir .cb-reefdir__tabletogglewrap{
    margin: 10px 14px 14px;
  }
}


/* ===================================================
   CoralBay v3 tighter spacing + stronger contrast
   =================================================== */

.cb-reefdir .cb-reefdir__controls input[type="search"]::placeholder{
  color:#124c7c !important;
  opacity:1;
  font-weight:600;
}

.cb-reefdir .cb-reefdir__controls input[type="search"]{
  border-color:#9db5c7 !important;
  background:linear-gradient(180deg,#ffffff 0%,#f7fbff 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75), 0 1px 2px rgba(18,44,67,0.06) !important;
}

.cb-reefdir .cb-reefdir__shell{
  border:3px solid #afc4d5;
  border-radius:18px;
  background:linear-gradient(180deg,#edf5fb 0%,#ffffff 16%,#ffffff 100%);
  box-shadow:0 12px 32px rgba(16,38,58,0.10);
}

.cb-reefdir .cb-reefdir__controls{
  padding:12px 14px;
  background:linear-gradient(180deg,#e7f1f9 0%,#dfeaf4 100%);
  border-bottom:1px solid #bccdde;
}

.cb-reefdir .cb-reefdir__meta{
  padding:8px 14px 0;
}

.cb-reefdir .cb-reefdir__mapblock{
  margin:0;
  border-left:0;
  border-right:0;
  border-top:1px solid #c2d3e1;
  border-bottom:1px solid #c2d3e1;
  border-radius:0;
  box-shadow:none;
}

.cb-reefdir .cb-reefdir__maphead{
  padding:10px 14px;
  background:linear-gradient(180deg,#f2f7fb 0%,#e6eff7 100%);
  border-bottom:1px solid #c8d8e4;
}

.cb-reefdir .cb-reefdir__mapstatus{
  font-size:13px;
  font-weight:700;
  color:#0f4f81;
  margin-top:5px;
}

.cb-reefdir .cb-reefdir__tablewrap{
  margin:0;
  border-left:0;
  border-right:0;
  border-top:0;
  border-bottom:0;
  border-radius:0;
}

.cb-reefdir .cb-reefdir__tabletogglewrap{
  margin:10px 0 0;
  padding:0 0 14px;
}

.cb-reefdir .cb-reefdir__table th{
  background:#dfe9f2;
}

.cb-reefdir .cb-reefdir__table tbody tr:nth-child(even){
  background:rgba(19,76,124,0.045);
}

.cb-reefdir .cb-reefdir__table tbody tr:hover{
  background:rgba(19,76,124,0.08);
}

@media (max-width: 767px){
  .cb-reefdir .cb-reefdir__controls{
    padding:10px;
  }

  .cb-reefdir .cb-reefdir__meta{
    padding:8px 10px 0;
  }

  .cb-reefdir .cb-reefdir__maphead{
    padding:9px 10px;
  }

  .cb-reefdir .cb-reefdir__tabletogglewrap{
    padding:0 0 10px;
  }
}


/* ===================================================
   CoralBay v4 map/table spacing refinements
   =================================================== */

.cb-reefdir .cb-reefdir__meta:empty{
  display:none;
}

.cb-reefdir .cb-reefdir__mapblock{
  margin-top:0;
}

.cb-reefdir .cb-reefdir__map,
.cb-reefdir .leaflet-container{
  border-radius:0 !important;
}

.cb-reefdir .cb-reefdir__tablewrap{
  margin-top:8px;
}

@media (max-width: 767px){
  .cb-reefdir .cb-reefdir__tablewrap{
    margin-top:8px;
  }
}
