/**
 * The following styles get applied both on the front of your site
 * and in the editor.
 *
 * Replace them with your own styles or remove the file completely.
 */

:root {
  --hh-primary:  #2563eb;
  --hh-bg:       #ffffff;
  --hh-radius:   .75rem;
  --hh-shadow:   0 2px 5px rgba(0,0,0,0.05);
}

/* Theme presets (applied via `.esv-hh-theme-*` wrapper classes) */
.esv-hh-theme-hive {
  --hh-accent: #d7a429;
  --hh-on-accent: #ffffff;
  --hh-text: #242424;
  --hh-border: rgba(215, 164, 41, 0.25);
  --hh-bg-soft: #ffffff;
  --hh-row-hover: rgba(215, 164, 41, 0.08);
  --hh-radius: 999px;
}

.esv-hh-theme-default,
.esv-hh-theme-rounded,
.esv-hh-theme-super-rounded {
  --hh-accent: var(--hh-primary);
  --hh-on-accent: #ffffff;
  --hh-text: #242424;
  --hh-border: #e2e8f0;
  --hh-bg-soft: #ffffff;
  --hh-row-hover: rgba(37,99,235,0.08);
}

/* Grid wrapper */
.esv-hh-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
  margin-top: 2rem;
}

/* Card shell */
.esv-hh-card {
  background: var(--hh-bg);
  border: 1px solid #e2e8f0;
  border-radius: var(--hh-radius);
  overflow: hidden;
  box-shadow: var(--hh-shadow);
  display: flex;
  flex-direction: column;
}

/* Image */
.esv-hh-hero img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* Body */
.esv-hh-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Text */
.esv-hh-title { 
  margin: 0 0 .25rem; 
  font-size: 2.27rem; 
  line-height: 1.25; 
}
.esv-hh-meta  { 
  margin: 0 0 .5rem;  
  color: #475569; 
  font-size: 1.68rem; 
}
.esv-hh-price { 
  margin: 0 0 .75rem;  
  font-weight: 600;
  color: #222;
}
.esv-hh-desc  { 
  flex:1;
  margin: 0 0 1rem;  
  color: #333;
}

/* Buttons */
.esv-hh-buttons {
  display: flex; 
  flex-wrap: wrap; 
  gap: .5rem;
}
.esv-hh-btn {
  padding: .5rem 1rem;
  background: var(--hh-primary);
  color: #fff;
  text-decoration: none;
  border-radius: var(--hh-button-radius, 4px);
  font-size: 1.68rem;
  transition: filter .2s;
}
.esv-hh-btn:hover {
  filter: brightness(90%);
}

/* Search form */
.esv-hh-search-form {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.5rem;
}
.esv-hh-search-form input[type="search"] {
  flex: 1;
  padding: .5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.esv-hh-search-form button {
  padding: .5rem 1rem;
  background: var(--hh-primary);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Pagination */
.esv-hh-next-page {
  display: inline-block;
  margin-top: 1.5rem;
  text-decoration: none;
  color: var(--hh-primary);
}

/* Plot table */
.esv-hh-plot-table {
  color: var(--hh-text, #242424);
  font-size: 1.68rem;
}

.esv-hh-plot-table__title {
  text-align: center;
  font-size: 2.27rem;
  font-weight: 600;
  margin: 1.25rem 0 1rem;
  color: inherit;
}

.esv-hh-plot-table__notice {
  margin: 0 auto 1rem;
  max-width: 1100px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--hh-border, #e2e8f0);
  border-radius: 14px;
  background: rgba(0,0,0,0.03);
  color: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

.esv-hh-plot-table.esv-hh-theme-hive .esv-hh-plot-table__notice {
  border-color: rgba(249, 178, 51, 0.35);
  background: rgba(249, 178, 51, 0.08);
}

.esv-hh-plot-table__toolbar {
  margin: 0 auto 0.75rem;
  max-width: 1100px;
  padding: 0.5rem 0.75rem;
  background: var(--hh-bg-soft, #fff);
  border: 1px solid var(--hh-border, #e2e8f0);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.esv-hh-plot-table__toolbar-left {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 170px;
}

.esv-hh-plot-table__toolbar-title {
  font-size: 1.44rem;
  font-weight: 700;
}

.esv-hh-plot-table__count {
  font-size: 1.34rem;
  opacity: 0.75;
}

.esv-hh-plot-table__toolbar-controls {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(180px, 1fr) minmax(160px, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
}

.esv-hh-plot-table .plot-filter {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--hh-border, #e2e8f0);
  border-radius: 999px;
  background: #fff;
  color: inherit;
  outline: none;
  font-size: 1.44rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.esv-hh-plot-table__toolbar .plot-filter {
  height: 3.2rem;
}

/* Make plot search text larger than dropdowns */
.esv-hh-plot-table__toolbar .filter-plot {
  font-size: 1.8rem;
  line-height: 1.2;
}

/* Ensure search input placeholder matches control font size */
.esv-hh-plot-table__toolbar .filter-plot::placeholder {
  font-size: inherit;
  opacity: 0.7;
}

.esv-hh-plot-table__toolbar .esv-hh-select {
  height: 3.2rem;
}

.esv-hh-plot-table__toolbar .esv-hh-plot-table__clear {
  height: 3.2rem;
  padding: 0 1.35rem;
  font-size: 1.44rem;
}

/* Dropdown styling (accent right segment + chevron) - reliable wrapper approach */
.esv-hh-plot-table .esv-hh-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--hh-border, #e2e8f0);
  border-radius: var(--hh-button-radius, 999px);
  background: #fff;
  overflow: hidden;
  cursor: pointer;
}

.esv-hh-plot-table .esv-hh-select::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 3.6rem;
  background: var(--hh-accent, var(--hh-primary));
  pointer-events: none;
}

.esv-hh-plot-table.esv-hh-theme-hive .esv-hh-select::before {
  background: #F9B233;
}

.esv-hh-plot-table .esv-hh-select::after {
  content: '';
  position: absolute;
  right: 1.1rem;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translate(-25%, -66%) rotate(45deg);
  pointer-events: none;
}

/* Hive: dropdown chevron matches standard text colour */
.esv-hh-plot-table.esv-hh-theme-hive .esv-hh-select::after {
  border-right-color: var(--hh-text, #242424);
  border-bottom-color: var(--hh-text, #242424);
}

/* Make filters a bit more compact overall */
.esv-hh-plot-table .plot-filter {
  font-size: 0.75rem;
  line-height: 1.1;
}

@media (max-width: 900px) {
  .esv-hh-plot-table__toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .esv-hh-plot-table__toolbar-left {
    min-width: 0;
  }
  .esv-hh-plot-table__toolbar-controls {
    grid-template-columns: 1fr;
  }
}

.esv-hh-plot-table .esv-hh-select select.plot-filter {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 0;
  background: transparent;
  outline: none;
  padding: 0 3.2rem 0 0.85rem;
  width: 100%;
  font-size: 1.28rem;
  font-weight: inherit;
  line-height: 1.1;
  height: 3.2rem;
  color: inherit;
  cursor: pointer;
}

.esv-hh-plot-table .esv-hh-select select.plot-filter::-ms-expand { display: none; }

.esv-hh-plot-table .btn-small {
  padding: 0.45rem 0.9rem;
  border-radius: var(--hh-button-radius, 999px);
  background: var(--hh-accent, var(--hh-primary));
  color: var(--hh-on-accent, #fff);
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, opacity 0.35s ease, transform 0.35s ease;
}

.esv-hh-plot-table .esv-hh-plot-table__cta.btn-small:hover {
  background: #F9B233;
}

.esv-hh-plot-table .btn-small.btn-outline {
  background: transparent;
  border-color: var(--hh-accent, var(--hh-primary));
  color: var(--hh-accent, var(--hh-primary));
}

.esv-hh-plot-table .table-container {
  margin: 0 auto;
  max-width: 1100px;
  overflow: hidden;
}

.esv-hh-plot-table .plot-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 1.6rem; /* House type names land at 16px (site uses 10px base rem) */
}

.esv-hh-plot-table .plot-table thead th {
  text-align: left;
  padding: 0.85rem 1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--hh-border, #e2e8f0);
  color: var(--hh-text, #242424);
  background: transparent;
}

/* Hive: hardcode table header colour */
.esv-hh-plot-table.esv-hh-theme-hive .plot-table thead th {
  color: #F9B233;
}

/* Hive: match the header row border to header colour */
.esv-hh-plot-table.esv-hh-theme-hive .plot-table thead th {
  border-bottom-color: #F9B233;
}

.esv-hh-plot-table th.esv-hh-sort {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 1.75rem;
}
.esv-hh-plot-table th.esv-hh-sort::after {
  content: '';
  position: absolute;
  right: 0.75rem;
  opacity: 0.9;
}
.esv-hh-plot-table th.esv-hh-sort.is-sorted::after {
  content: '';
  width: 10px;
  height: 10px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: 50% 50%;
  background: currentColor;
  /* Filled triangle, same style as hive pagination arrows */
  clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
}
.esv-hh-plot-table th.esv-hh-sort.is-sorted.is-desc::after {
  transform: translateY(-50%) rotate(90deg);
}

.esv-hh-plot-table .plot-table tbody td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: background-color 0.35s ease, color 0.35s ease;
}

.esv-hh-plot-table .plot-table tbody tr:hover td {
  background: var(--hh-row-hover, rgba(37,99,235,0.08));
}

.esv-hh-plot-table .plot-table td:last-child {
  text-align: right;
  white-space: nowrap;
}

/* Notes column: allow it to be the flexible/widest column */
.esv-hh-plot-table .esv-hh-plot-table__notes,
.esv-hh-plot-table .esv-hh-plot-table__notes-head {
  width: auto;
  max-width: 100%;
  white-space: normal;
}

.esv-hh-plot-table .esv-hh-plot-table__notes {
  word-break: break-word;
}

.esv-hh-plot-table .plots-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 0 0.5rem;
}

.esv-hh-plot-table .plots-pagination .gallery-swiper-button-next,
.esv-hh-plot-table .plots-pagination .gallery-swiper-button-prev {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: 999px;
  user-select: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.esv-hh-plot-table .plots-pagination .gallery-swiper-button-next:focus,
.esv-hh-plot-table .plots-pagination .gallery-swiper-button-prev:focus,
.esv-hh-plot-table .plots-pagination .gallery-swiper-button-next:focus-visible,
.esv-hh-plot-table .plots-pagination .gallery-swiper-button-prev:focus-visible {
  outline: none;
  box-shadow: none;
}

.esv-hh-plot-table .plots-pagination .gallery-swiper-button-next.is-disabled,
.esv-hh-plot-table .plots-pagination .gallery-swiper-button-prev.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.esv-hh-plot-table .plots-pagination .gallery-swiper-button-next svg,
.esv-hh-plot-table .plots-pagination .gallery-swiper-button-prev svg {
  display: block;
}

/* Hive pagination hover behavior */
.esv-hh-plot-table .gallery-swiper-button-next:hover #hex-icon-next {
  fill: #5F5E5E;
}
.esv-hh-plot-table .gallery-swiper-button-prev:hover #hex-icon-prev {
  fill: #5F5E5E;
}

/* Hive icons: ensure consistent sizing/alignment */
.esv-hh-plot-table .esv-hh-hive-icon {
  display: block;
}

.esv-hh-plot-table .esv-hh-hive-arrow {
  transform-box: fill-box;
  transform-origin: center;
}

/* Nudge arrows slightly for visual centering */
.esv-hh-plot-table .esv-hh-hive-arrow--prev {
  transform: translateX(-2px);
}
.esv-hh-plot-table .esv-hh-hive-arrow--next {
  transform: translateX(2px);
}

.esv-hh-plot-table .pagination-info {
  padding: 0 0.25rem;
  font-size: 1.44rem;
}

.esv-hh-plot-table .pagination-prev,
.esv-hh-plot-table .pagination-next {
  padding: 0.45rem 0.9rem;
  font-size: 1.44rem;
}

/* Availability CTA (Enquire) should match table typography */
.esv-hh-plot-table .esv-hh-plot-table__cta.btn-small {
  font-weight: 400;
  padding-left: 1.2rem;
  padding-right: 1.2rem;
}

@media (max-width: 768px) {
  .esv-hh-plot-table .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .esv-hh-plot-table .plot-table { min-width: 720px; }
}
