/*
 * DRH Plan Library — minimal, theme-neutral styles.
 * Colours are CSS-variable driven so themes can override:
 *   .drh-plans { --drh-accent: #your-brand-colour; }
 */

.drh-plans,
.drh-plan-detail {
  --drh-accent: #c41230;
  --drh-border: rgba(0, 0, 0, 0.12);
  --drh-muted: rgba(0, 0, 0, 0.6);
}

/* ── Filter bar ─────────────────────────────────────────────── */

.drh-plans-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.drh-plans-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.drh-plans-filters select {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--drh-border);
  border-radius: 4px;
}

/* ── Grid ───────────────────────────────────────────────────── */

.drh-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.drh-plan-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--drh-border);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  background: #fff;
}

.drh-plan-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.drh-plan-card__image {
  display: block;
  aspect-ratio: 4 / 3;
  background: #f2f2f2;
}

.drh-plan-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.drh-plan-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
}

.drh-plan-card__name {
  font-size: 1.125rem;
  font-weight: 600;
}

.drh-plan-card__description {
  font-size: 0.875rem;
  color: var(--drh-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.drh-plan-card__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--drh-muted);
}

.drh-plans-pagination {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 2rem;
}

.drh-plans-pagination a,
.drh-plans-pagination__current {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--drh-border);
  border-radius: 4px;
  text-decoration: none;
}

.drh-plans-pagination__current {
  background: var(--drh-accent);
  border-color: var(--drh-accent);
  color: #fff;
}

.drh-plans-empty,
.drh-plans-error {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--drh-muted);
}

/* ── Detail page ────────────────────────────────────────────── */

.drh-plan-detail {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem;
}

.drh-plan-detail__hero img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.drh-plan-detail__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.drh-plan-detail__header h1 {
  margin: 0;
}

.drh-brochure-button {
  padding: 0.65rem 1.25rem;
  background: var(--drh-accent);
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}

.drh-brochure-button:hover {
  filter: brightness(1.1);
}

.drh-plan-detail__lead {
  font-size: 1.125rem;
  color: var(--drh-muted);
}

.drh-plan-detail__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  padding: 1rem 0;
  margin: 1rem 0;
  border-top: 1px solid var(--drh-border);
  border-bottom: 1px solid var(--drh-border);
}

.drh-plan-detail__specs li {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 84px;
}

.drh-plan-detail__specs strong {
  font-size: 1.375rem;
  color: var(--drh-accent);
}

.drh-plan-detail__specs span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--drh-muted);
}

.drh-plan-detail__table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 2rem;
}

.drh-plan-detail__table th,
.drh-plan-detail__table td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--drh-border);
  font-size: 0.9375rem;
}

.drh-plan-detail__table th {
  color: var(--drh-muted);
  font-weight: 500;
  width: 40%;
}

.drh-plan-detail__floorplans figure {
  margin: 0 0 1.5rem;
}

.drh-plan-detail__floorplans img,
.drh-plan-detail__gallery img {
  max-width: 100%;
  border-radius: 6px;
  display: block;
}

.drh-plan-detail__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.drh-plan-detail__copyright {
  font-size: 0.8125rem;
  color: var(--drh-muted);
  margin-top: 2rem;
}

/* ── Brochure modal ─────────────────────────────────────────── */

.drh-brochure-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drh-brochure-modal[hidden] {
  display: none;
}

.drh-brochure-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.drh-brochure-modal__dialog {
  position: relative;
  background: #fff;
  color: #222;
  border-radius: 10px;
  padding: 2rem;
  width: min(420px, calc(100vw - 2rem));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.drh-brochure-modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  border: 0;
  background: none;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  color: var(--drh-muted, #666);
}

.drh-brochure-modal__plan-name {
  color: rgba(0, 0, 0, 0.6);
  margin-top: -0.5rem;
}

.drh-brochure-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.drh-brochure-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.drh-brochure-form input {
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  font-size: 1rem;
}

/* Honeypot — visually removed, still in the DOM for bots. */
.drh-brochure-form__website {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.drh-brochure-form button[type='submit'] {
  padding: 0.65rem 1.25rem;
  background: #c41230;
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}

.drh-brochure-form button[type='submit']:disabled {
  opacity: 0.6;
  cursor: default;
}

.drh-brochure-form__error {
  color: #b3261e;
  font-size: 0.875rem;
  margin: 0;
}

.drh-brochure-form__privacy {
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.55);
  margin: 0;
}

.drh-brochure-modal__downloading {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
}
