/* Huntley Directory companion presentation. Loaded only on directory-related surfaces. */
.hdt-directory-surface .hdt-site-main { background: #fbfcfe; }
.hdx-directory-shell { padding-bottom: 72px; }

/* Search */
.hd-search { grid-template-columns: repeat(12,minmax(0,1fr)); gap: 10px; margin: 0 0 22px; padding: 18px; background: #fff; border: 1px solid var(--hdt-border); border-radius: var(--hdt-radius); box-shadow: 0 5px 22px rgba(21,32,51,.05); }
.hd-search > * { grid-column: span 3; }
.hd-search > input[name="q"] { grid-column: span 6; }
.hd-search input, .hd-search select, .hd-search button, .hd-form input:not([type="checkbox"]):not([type="radio"]), .hd-form select, .hd-form textarea { min-height: 44px; padding: 10px 12px; border: 1px solid #cbd4df; border-radius: 8px; background: #fff; color: var(--hdt-text); }
.hd-search button[type="submit"], .hd-form button, .hd-button { border-color: var(--hdt-accent); background: var(--hdt-accent); color: #fff; font-weight: 750; border-radius: 8px; }
.hd-search button[type="submit"]:hover, .hd-form button:hover, .hd-button:hover { background: var(--hdt-accent-dark); color: #fff; }
.hd-search label { display: flex; align-items: center; gap: 7px; font-size: .9rem; }
.hd-search input[type="checkbox"] { width: 1rem; height: 1rem; margin: 0; }
.hd-use-location { background: #fff !important; color: var(--hdt-accent) !important; }

/* A-Z + pagination */
.hd-pagination, .hd-alphabet { gap: 7px; margin: 22px 0; }
.hd-pagination a, .hd-alphabet a { min-width: 36px; padding: 7px 10px; text-align: center; border: 1px solid var(--hdt-border); border-radius: 7px; background: #fff; color: var(--hdt-text); }
.hd-pagination [aria-current="page"], .hd-alphabet [aria-current="page"] { border-color: var(--hdt-accent); background: var(--hdt-accent); color: #fff; }

/* Listing cards */
.hd-results { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.hd-card.hdx-listing-card { border: 1px solid var(--hdt-border); border-radius: var(--hdt-radius); box-shadow: 0 5px 22px rgba(21,32,51,.05); transition: transform .15s ease, box-shadow .15s ease; }
.hd-card.hdx-listing-card:hover { transform: translateY(-2px); box-shadow: var(--hdt-shadow); }
.hd-card-image { aspect-ratio: 16/10; background: var(--hdt-surface-2); }
.hd-card-image img { display: block; }
.hdx-card-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--hdt-accent); font-size: 3.3rem; font-weight: 800; background: linear-gradient(135deg,#f2f7fb,#e7f1f9); }
.hd-card-body { padding: 20px; }
.hd-card-title { font-size: 1.3rem; margin: 9px 0 5px; }
.hd-card-title a { color: var(--hdt-text); text-decoration: none; }
.hdx-card-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.hd-badge { padding: 4px 8px; border-radius: 999px; background: var(--hdt-surface-2); color: var(--hdt-text); font-size: .75rem; font-weight: 800; }
.hdx-badge-featured { background: #fff4d6; color: #7a5200; }
.hdx-badge-verified { background: #e7f6ef; color: #12613e; }
.hd-location { margin: 0 0 10px; color: var(--hdt-muted); font-size: .9rem; }
.hdx-card-excerpt { color: var(--hdt-muted); font-size: .94rem; }
.hd-card-actions { gap: 7px; }
.hd-card-actions a, .hd-card-actions button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 7px 10px; border: 1px solid var(--hdt-border); border-radius: 7px; background: #fff; color: var(--hdt-text); font-size: .84rem; font-weight: 700; text-decoration: none; }
.hd-card-actions .hd-button { border-color: var(--hdt-accent); background: var(--hdt-accent); color: #fff; }
.hd-layout-list .hd-card.hdx-listing-card, .hd-layout-compact .hd-card.hdx-listing-card { box-shadow: none; }

/* Category/location blocks */
.hd-term-grid { gap: 14px; }
.hd-term-grid a { overflow: hidden; padding: 0; border: 1px solid var(--hdt-border); border-radius: 11px; background: #fff; color: var(--hdt-text); font-weight: 750; }
.hd-term-grid a > span { padding: 13px; }

/* Single listing */
.hdx-listing-hero { padding: 34px 0 42px; background: linear-gradient(135deg,#f6f9fc,#edf4fa); border-block: 1px solid var(--hdt-border); }
.hdx-listing-hero-grid { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: clamp(28px,5vw,60px); align-items: center; }
.hdx-listing-photo { overflow: hidden; border: 1px solid var(--hdt-border); border-radius: 18px; background: #fff; box-shadow: var(--hdt-shadow); }
.hdx-listing-photo img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.hdx-listing-photo-placeholder { aspect-ratio: 16/10; display: grid; place-items: center; font-size: 6rem; font-weight: 850; color: var(--hdt-accent); background: #fff; }
.hdx-listing-intro h1 { margin: 10px 0 12px; font-size: clamp(2.15rem,5vw,4rem); }
.hdx-listing-lead { max-width: 720px; color: var(--hdt-muted); font-size: 1.08rem; }
.hdx-rating { color: var(--hdt-muted); }
.hdx-term-links { display: flex; flex-wrap: wrap; gap: 7px; }
.hdx-term-links a { padding: 5px 9px; border: 1px solid var(--hdt-border); border-radius: 999px; background: #fff; color: var(--hdt-text); text-decoration: none; font-size: .82rem; font-weight: 700; }
.hdx-single-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(280px, .85fr); gap: 30px; padding-top: 34px; padding-bottom: 72px; }
.hdx-listing-main { display: grid; gap: 20px; min-width: 0; }
.hdx-panel { padding: clamp(20px,3vw,30px); border: 1px solid var(--hdt-border); border-radius: var(--hdt-radius); background: #fff; }
.hdx-panel > :last-child { margin-bottom: 0; }
.hdx-listing-sidebar { min-width: 0; }
.hd-contact-card.hdx-contact-card { position: sticky; top: 20px; display: grid; gap: 12px; padding: 22px; border: 1px solid var(--hdt-border); border-radius: var(--hdt-radius); background: #fff; box-shadow: 0 6px 24px rgba(21,32,51,.06); }
.hdx-contact-card h2, .hdx-contact-card h3, .hdx-contact-card p { margin: 0; }
.hdx-contact-card hr { width: 100%; border: 0; border-top: 1px solid var(--hdt-border); margin: 8px 0; }
.hdx-full-button { width: 100%; }
.hdx-hours-status { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #f3f4f6; color: var(--hdt-muted); font-size: .85rem; font-weight: 750; }
.hdx-hours-status.is-open { background: #e7f6ef; color: #12613e; }
.hd-details { grid-template-columns: minmax(120px, 170px) 1fr; gap: 10px 18px; }
.hd-details dt { color: var(--hdt-muted); }
.hd-gallery { gap: 10px; }
.hd-gallery img { border-radius: 9px; }
.hd-map-embed, .hd-google-map { overflow: hidden; border-radius: 10px; }
.hd-review { padding: 18px 0; border-top: 1px solid var(--hdt-border); }
.hd-owner-response { margin-top: 12px; padding: 13px 15px; background: var(--hdt-surface); border-radius: 8px; }
.hdx-review-form { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--hdt-border); }

/* Submission */
.hdx-submission-form { gap: 22px; }
.hdx-form-section { padding: clamp(20px,4vw,34px); border: 1px solid var(--hdt-border); border-radius: var(--hdt-radius); background: #fff; box-shadow: 0 4px 18px rgba(21,32,51,.04); }
.hdx-section-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.hdx-section-heading h2 { margin: 0 0 5px; font-size: 1.45rem; }
.hdx-section-heading p { margin: 0; color: var(--hdt-muted); }
.hdx-step { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--hdt-accent); color: #fff; font-size: .85rem; font-weight: 800; }
.hdx-plan-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.hdx-plan-card { position: relative; display: block; cursor: pointer; }
.hdx-plan-card > input { position: absolute; opacity: 0; pointer-events: none; }
.hdx-plan-card__inner { position: relative; min-height: 100%; display: flex; flex-direction: column; padding: 22px; border: 2px solid var(--hdt-border); border-radius: 13px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.hdx-plan-card:hover .hdx-plan-card__inner { transform: translateY(-2px); box-shadow: var(--hdt-shadow); }
.hdx-plan-card > input:checked + .hdx-plan-card__inner { border-color: var(--hdt-accent); box-shadow: 0 0 0 3px color-mix(in srgb,var(--hdt-accent) 12%,transparent); }
.hdx-plan-card > input:focus-visible + .hdx-plan-card__inner { outline: 3px solid color-mix(in srgb,var(--hdt-accent) 45%,white); outline-offset: 3px; }
.hdx-plan-ribbon { align-self: flex-start; margin: -7px 0 8px; padding: 4px 8px; border-radius: 999px; background: #fff4d6; color: #7a5200; font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.hdx-plan-name { font-size: 1.2rem; }
.hdx-plan-price { margin: 5px 0 12px; color: var(--hdt-accent-dark); font-size: 1.7rem; font-weight: 850; }
.hdx-plan-card ul { flex: 1; padding-left: 1.2rem; color: var(--hdt-muted); font-size: .9rem; }
.hdx-plan-select { display: block; padding: 8px 10px; border-radius: 7px; background: var(--hdt-surface); text-align: center; font-weight: 800; color: var(--hdt-text); }
.hdx-plan-card > input:checked + .hdx-plan-card__inner .hdx-plan-select { background: var(--hdt-accent); color: #fff; }
.hdx-coupon { margin-top: 18px; max-width: 360px; }
.hdx-coupon label { font-weight: 750; }
.hdx-coupon input { width: 100%; margin-top: 5px; }
.hdx-submission-form .hd-form-grid { gap: 16px; }
.hdx-submission-form .hd-form-grid label { font-weight: 700; }
.hdx-submission-form .hd-form-grid select[multiple] { min-height: 130px; }
.hdx-submission-form input[type="file"] { padding: 9px; background: var(--hdt-surface); }
.hdx-hours-details { padding: 14px; border: 1px solid var(--hdt-border); border-radius: 9px; background: var(--hdt-surface); }
.hdx-hours-details summary { cursor: pointer; font-weight: 800; }
.hdx-hours-details textarea { width: 100%; margin-top: 10px; }
.hdx-submit-actions { position: sticky; bottom: 14px; z-index: 10; display: flex; gap: 10px; justify-content: flex-end; padding: 12px; border: 1px solid var(--hdt-border); border-radius: 12px; background: rgba(255,255,255,.94); box-shadow: var(--hdt-shadow); backdrop-filter: blur(8px); }

/* Dashboard */
.hd-dashboard { display: grid; gap: 18px; }
.hd-dashboard > h2 { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--hdt-border); font-size: 1.4rem; }
.hd-dashboard-head { padding: 18px; border: 1px solid var(--hdt-border); border-radius: var(--hdt-radius); background: #fff; }
.hd-dashboard-head h2 { margin: 0; }
.hd-notice { padding: 12px 15px; border-left: 4px solid var(--hdt-accent); border-radius: 5px; background: #eef6fc; }
.hd-table-wrap { overflow-x: auto; border: 1px solid var(--hdt-border); border-radius: 10px; background: #fff; }
.hd-table, .hd-directory-table { margin: 0; }
.hd-table th, .hd-table td, .hd-directory-table th, .hd-directory-table td { border-bottom-color: var(--hdt-border); }
.hd-table th, .hd-directory-table th { background: var(--hdt-surface); font-size: .86rem; text-transform: uppercase; letter-spacing: .025em; }
.hd-dashboard .hd-results { grid-template-columns: repeat(3,minmax(0,1fr)); }

/* Comparison */
.hd-compare-table { background: #fff; }
.hd-compare-table th, .hd-compare-table td { border-color: var(--hdt-border); padding: 11px; }

@media (max-width: 980px) {
	.hd-search > *, .hd-search > input[name="q"] { grid-column: span 6; }
	.hd-results, .hd-dashboard .hd-results { grid-template-columns: repeat(2,minmax(0,1fr)); }
	.hdx-single-grid, .hdx-listing-hero-grid { grid-template-columns: 1fr; }
	.hdx-listing-photo { max-width: 560px; }
	.hd-contact-card.hdx-contact-card { position: static; }
	.hdx-plan-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	.hd-search > *, .hd-search > input[name="q"] { grid-column: 1 / -1; }
	.hd-results, .hd-dashboard .hd-results { grid-template-columns: 1fr; }
	.hd-card-actions > * { flex: 1 1 42%; }
	.hd-details { grid-template-columns: 1fr; }
	.hdx-submit-actions { position: static; flex-direction: column; }
	.hdx-submit-actions .hdt-button { width: 100%; }
}
