/* Loaded after /ds/_ds_bundle.css so these overrides win the cascade */

/* Hero text must stay visible when motion is reduced or disabled */
section[class*="min-h-"] .max-w-2xl > * {
  opacity: 1 !important;
  transform: none !important;
}

@media (min-width: 1024px) {
  .even-detail-grid {
    grid-template-columns: 1fr 400px !important;
    column-gap: 32px !important;
  }
}

.h-11:focus-within,
.qe-datecell:focus-within {
  border-color: var(--color-text-primary);
}

/* DS bundle forces flex-start on date cells — restore vertical centering */
.qe-datecell,
.tf-field .qe-datecell,
aside#enquiry .qe-datecell {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

.qe-datecell p,
.qe-datecell span {
  margin: 0 !important;
  line-height: 1.4 !important;
  text-align: left !important;
}

/* Catalog pagination — EVEN luxury style */
nav.even-catalog-pagination {
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-inline: 8px;
}

nav.even-catalog-pagination::-webkit-scrollbar {
  display: none;
}

nav.even-catalog-pagination button {
  flex-shrink: 0;
  font-weight: 500;
  letter-spacing: 0.16em;
}

nav.even-catalog-pagination button:disabled {
  opacity: 1 !important;
}

/* Property listing cards — subtle hover lift + shadow */
.bg-white.overflow-hidden.cursor-pointer.group.h-full {
  transition:
    box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bg-white.overflow-hidden.cursor-pointer.group.h-full:hover {
  box-shadow: 0 10px 28px rgba(15, 23, 32, 0.1);
  transform: translateY(-2px);
}

/* Refine modal — dual price range slider (EVEN navy, not browser blue) */
input.even-range {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  height: 24px;
  margin: 0;
  padding: 0;
  background: transparent !important;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  accent-color: var(--color-action-primary, #0d2440);
}

input.even-range::-webkit-slider-runnable-track {
  height: 2px;
  background: transparent;
  border: none;
}

input.even-range::-moz-range-track {
  height: 2px;
  background: transparent;
  border: none;
}

input.even-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  width: 16px;
  height: 16px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--color-action-primary, #0d2440);
  border: 2px solid var(--color-bg-surface, #fff);
  box-shadow: 0 0 0 1px var(--color-action-primary, #0d2440);
  cursor: pointer;
  transition: transform 0.2s ease;
}

input.even-range::-webkit-slider-thumb:hover {
  transform: scale(1.08);
}

input.even-range::-moz-range-thumb {
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-action-primary, #0d2440);
  border: 2px solid var(--color-bg-surface, #fff);
  box-shadow: 0 0 0 1px var(--color-action-primary, #0d2440);
  cursor: pointer;
}

input.even-range:focus {
  outline: none;
}

input.even-range:focus::-webkit-slider-thumb {
  box-shadow:
    0 0 0 1px var(--color-action-primary, #0d2440),
    0 0 0 4px rgba(13, 36, 64, 0.16);
}

input.even-range:focus::-moz-range-thumb {
  box-shadow:
    0 0 0 1px var(--color-action-primary, #0d2440),
    0 0 0 4px rgba(13, 36, 64, 0.16);
}

/* ------------------------------------------------------------------
   Interactive hover states — every clickable control gets feedback.
   Rules use :where() / :not([class*="hover:"]) so components that
   already define their own hover keep it; this only fills the gaps.
   ------------------------------------------------------------------ */

/* Solid & outline CTAs — gentle lift on top of their colour change */
:is(.luxury-btn-primary, .luxury-btn-dark, .luxury-btn-outline, .luxury-btn-light, .even-cta-frost) {
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

:is(.luxury-btn-primary, .luxury-btn-dark, .luxury-btn-outline):not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px rgba(13, 36, 64, 0.45);
}

:is(.luxury-btn-light, .even-cta-frost):not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, 0.5);
}

:is(.luxury-btn-primary, .luxury-btn-dark, .luxury-btn-outline, .luxury-btn-light, .even-cta-frost):not(:disabled):active {
  transform: translateY(0);
  box-shadow: none;
}

/* Every other button / role=button without a hover of its own — soft fade */
:where(button, [role="button"], summary, label[for]):not(:disabled):not([class*="hover:"]):not([class*="luxury-btn"]):not(.even-cta-frost) {
  cursor: pointer;
  transition: opacity 0.25s ease, color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

:where(button, [role="button"], summary):not(:disabled):not([class*="hover:"]):not([class*="luxury-btn"]):not(.even-cta-frost):hover {
  opacity: 0.72;
}

:where(button, [role="button"]):not(:disabled):not([class*="luxury-btn"]):active {
  transform: scale(0.97);
}

/* Text links (nav, footer, inline) — fade; image/card links are excluded */
:where(a[href]):not([class*="hover:"]):not([class*="luxury-btn"]):not(.even-cta-frost):not(.group):not(:has(img, picture, video)) {
  transition: opacity 0.25s ease, color 0.25s ease;
}

:where(a[href]):not([class*="hover:"]):not([class*="luxury-btn"]):not(.even-cta-frost):not(.group):not(:has(img, picture, video)):hover {
  opacity: 0.68;
}

/* Visible keyboard focus for the same controls */
:where(button, a[href], [role="button"]):focus-visible {
  outline: 2px solid var(--color-action-accent, #0d2440);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  :is(button, a, [role="button"], .luxury-btn-primary, .luxury-btn-dark, .luxury-btn-outline, .luxury-btn-light):hover,
  :is(button, a, [role="button"]):active {
    transform: none !important;
  }
}

/* Gallery lightbox — arrows (DS used md:inline-flex, missing from its CSS), drag cursor */
.even-lb-arrow {
  display: none;
}

@media (min-width: 768px) {
  .even-lb-arrow {
    display: inline-flex;
  }
}

.even-lb-arrow:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.12) !important;
  opacity: 1 !important;
}

.even-lb-track {
  cursor: grab;
  user-select: none;
}

.even-lb-track img {
  -webkit-user-drag: none;
}

/* Home testimonials carousel — arrows (DS md:inline-flex / top-[122px] / left-[-72px] missing from its CSS), drag */
.even-tm-arrow {
  display: none;
  top: 106px; /* (260px image − 48px button) / 2 */
}

.even-tm-arrow[class*="left-"] {
  left: -72px;
}

.even-tm-arrow[class*="right-"] {
  right: -72px;
}

@media (min-width: 768px) {
  .even-tm-arrow {
    display: inline-flex;
  }
}

@media (min-width: 1025px) {
  .even-tm-arrow {
    top: 126px; /* (300px image − 48px button) / 2 */
  }
}

.even-tm-carousel:focus {
  outline: none;
}

.even-tm-slide {
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}

.even-tm-slide:active {
  cursor: grabbing;
}

/* ------------------------------------------------------------------
   Hero heights — compact, responsive (replaces 100vh / 70vh heroes)
   ------------------------------------------------------------------ */
.even-hero { min-height: 340px; }
.even-hero--full { min-height: clamp(460px, 72svh, 640px); }
.even-hero--tall { min-height: clamp(400px, 60svh, 560px); }
.even-hero--medium { min-height: clamp(300px, 44svh, 440px); }

@media (min-width: 1024px) {
  .even-hero--full { min-height: clamp(560px, 78vh, 760px); }
  .even-hero--tall { min-height: clamp(480px, 62vh, 620px); }
  .even-hero--medium { min-height: clamp(380px, 50vh, 500px); }
}

/* Property spec row: wrap on narrow screens instead of clipping the price */
.qe-specs { flex-wrap: wrap !important; row-gap: 6px; }

/* Editorial headings use Tenez (Adobe Fonts kit lqm6jht), matching the EVEN design system */
:root { --font-editorial: tenez, Resita, Georgia, serif; }
.font-editorial { font-family: tenez, Resita, Georgia, serif !important; }

/* Pointer cursor on everything clickable (Tailwind preflight resets buttons to cursor: default) */
a[href],
button:not(:disabled),
[role="button"]:not([aria-disabled="true"]),
[role="tab"],
[role="option"],
summary,
label[for],
select:not(:disabled),
input[type="checkbox"]:not(:disabled),
input[type="radio"]:not(:disabled),
input[type="file"]:not(:disabled),
input[type="submit"]:not(:disabled),
input[type="range"]:not(:disabled),
[onclick] {
  cursor: pointer;
}
button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
}

/* Transfer gallery: arrows appear when the main photo is hovered or a control has keyboard focus */
.even-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  color: #fff;
  background: transparent;
  /* Keeps the white arrow readable over bright photos and white floor plans */
  filter: drop-shadow(0 1px 2px rgba(2, 16, 31, 0.6));
  opacity: 0;
  transition: opacity 250ms ease;
}
.even-gallery-arrow--prev { left: 12px; }
.even-gallery-arrow--next { right: 12px; }
.even-transfer-main:hover .even-gallery-arrow,
.even-transfer-main:focus-within .even-gallery-arrow { opacity: 1; }

/* Transfer "Frequently Requested" options */
.even-option-card { cursor: pointer; }
.even-option-card:not(.is-active):hover {
  background: var(--color-bg-accent);
  border-color: var(--color-action-primary);
}
.even-option-card.is-active:hover {
  background: #263a54;
  border-color: #263a54;
}
.even-gallery-arrow { cursor: pointer; }

/* Catalogue "Filter" button: one line, icon, and a round count badge when filters are active */
.even-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  white-space: nowrap;
  border: 1px solid var(--color-border-strong);
  border-radius: 2px;
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 250ms ease, color 250ms ease, background-color 250ms ease;
}
.even-filter-btn:hover { border-color: var(--color-action-primary); }
/* The rule above is unlayered, so it beats the bundle's `hidden sm:inline-flex`; restore the breakpoint. */
.even-filter-btn--desktop { display: none; }
@media (min-width: 640px) {
  .even-filter-btn--desktop { display: inline-flex; }
}
.even-filter-btn__icon { width: 14px; height: 14px; flex: 0 0 auto; }
.even-filter-btn__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--color-action-primary);
  color: var(--color-action-primary-text);
  font-size: 10px;
  letter-spacing: 0;
}

/* Exact location under a listing's name: small pin, then "Exact place, General location" */
.even-location { display: inline-flex; align-items: center; gap: 6px; }
.even-location-pin { width: 12px; height: 12px; flex: 0 0 auto; color: var(--color-action-primary); }
