/* RM Directory — minimal styling that inherits theme typography/colours. */

/* Stars */
.rmd-stars { position: relative; display: inline-block; font-size: 1.05em; line-height: 1; vertical-align: -2px; }
.rmd-stars-bg { color: #d7d7d7; }
.rmd-stars-fill { color: #f6a623; position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; }
.rmd-stars-num { font-weight: 700; margin-left: 6px; }
.rmd-stars-count { opacity: .75; font-size: .9em; }

/* Buttons */
.rmd-btn { display: inline-block; padding: 10px 18px; border-radius: 6px; background: #2271b1; color: #fff !important; text-decoration: none !important; font-weight: 600; border: 0; cursor: pointer; }
.rmd-btn:hover { filter: brightness(1.1); }
.rmd-btn-secondary { background: transparent; color: #2271b1 !important; box-shadow: inset 0 0 0 2px #2271b1; }
.rmd-btn-small { padding: 6px 12px; font-size: .9em; }

/* Badges */
.rmd-badge-claimed { background: #e7f7ee; color: #1a7f4b; border-radius: 4px; padding: 2px 8px; font-size: .8em; font-weight: 700; }

/* Single listing top panel */
.rmd-single-top { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; margin: 0 0 28px; align-items: start; }
.rmd-single-summary .rmd-address { font-style: normal; margin: 10px 0; opacity: .85; }
.rmd-contact-list { list-style: none; margin: 10px 0; padding: 0; }
.rmd-contact-list li { margin: 4px 0; }
.rmd-single-rating { margin-bottom: 8px; font-size: 1.1em; }
.rmd-no-reviews { opacity: .7; font-style: italic; }

/* Maps */
.rmd-map { width: 100%; height: 280px; border-radius: 8px; z-index: 1; }
.rmd-results-map { height: 340px; margin-bottom: 20px; }

/* Cards grid */
.rmd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin: 20px 0; }
.rmd-card { position: relative; border: 1px solid #e3e3e3; border-radius: 10px; overflow: hidden; background: #fff; display: flex; flex-direction: column; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.rmd-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.rmd-card-thumb { display: block; background: #fff; border-bottom: 1px solid #f1f1f1; }
.rmd-card-thumb img { width: 100%; height: 140px; object-fit: contain; display: block; padding: 14px; box-sizing: border-box; }
.rmd-card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.rmd-card-title { margin: 0 0 2px; font-size: 1.1em; line-height: 1.3; }
.rmd-card-title a { text-decoration: none; }
.rmd-card-loc, .rmd-card-cats { font-size: .85em; opacity: .8; }
.rmd-card-excerpt { font-size: .9em; margin: 4px 0 10px; flex: 1; }
.rmd-card .rmd-btn-small { align-self: flex-start; margin-top: auto; }
.rmd-card-rank { position: absolute; top: 10px; left: 10px; background: #2271b1; color: #fff; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; z-index: 2; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.rmd-distance { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,.95); border-radius: 4px; padding: 2px 8px; font-size: .8em; font-weight: 600; }

/* Search form */
.rmd-search-form { background: #f7f8f9; border: 1px solid #e3e3e3; border-radius: 10px; padding: 18px; margin-bottom: 24px; }
.rmd-search-fields { display: grid; grid-template-columns: 2fr 1.5fr 1.5fr auto; gap: 12px; align-items: end; }
.rmd-field span { display: block; font-weight: 600; font-size: .85em; margin-bottom: 4px; }
.rmd-field input, .rmd-field select { width: 100%; padding: 9px 12px; border: 1px solid #ccc; border-radius: 6px; }
.rmd-result-count { font-weight: 600; }

/* Pagination */
.rmd-pagination { margin: 24px 0; }
.rmd-page { display: inline-block; padding: 6px 12px; border: 1px solid #ddd; border-radius: 4px; margin-right: 4px; text-decoration: none; }
.rmd-page-current { background: #2271b1; color: #fff; border-color: #2271b1; }

/* Review form rating input (RTL star trick) */
.rmd-rating-input { display: inline-flex; flex-direction: row-reverse; font-size: 1.8em; line-height: 1; }
.rmd-rating-input input { position: absolute; opacity: 0; width: 0; }
.rmd-rating-input label { color: #d7d7d7; cursor: pointer; padding: 0 2px; }
.rmd-rating-input label:hover, .rmd-rating-input label:hover ~ label,
.rmd-rating-input input:checked ~ label { color: #f6a623; }
.rmd-review-stars { margin-bottom: 6px; }

/* Forms */
.rmd-claim-section { border-top: 1px solid #e3e3e3; margin-top: 32px; padding-top: 24px; }
.rmd-claim-form input, .rmd-submit-form input, .rmd-submit-form select, .rmd-submit-form textarea { width: 100%; max-width: 480px; padding: 9px 12px; border: 1px solid #ccc; border-radius: 6px; }
.rmd-hp { position: absolute !important; left: -9999px !important; }
.rmd-notice { border-left: 4px solid #2271b1; background: #f0f6fb; padding: 10px 16px; border-radius: 0 6px 6px 0; }
.rmd-notice-success { border-color: #1a7f4b; background: #e7f7ee; }
.rmd-claim-pending { font-weight: 600; color: #996800; }

/* Excerpt meta on archives */
.rmd-excerpt-meta { margin-bottom: 6px; }
.rmd-excerpt-loc { font-size: .9em; opacity: .8; margin-left: 8px; }

/* Reviews section */
.rmd-reviews-section { border-top: 1px solid #e3e3e3; margin-top: 32px; padding-top: 24px; }
.rmd-review-list { list-style: none; margin: 20px 0; padding: 0; }
.rmd-review-list .comment { border: 1px solid #ececec; border-radius: 8px; padding: 16px 18px; margin-bottom: 14px; background: #fff; list-style: none; }
.rmd-review-list .comment .avatar { border-radius: 50%; margin-right: 10px; }
.rmd-review-list .reply { font-size: .85em; }
.rmd-reviews-aggregate { font-size: 1.15em; margin-bottom: 10px; }
.rmd-reviews-section #respond input[type="text"], .rmd-reviews-section #respond input[type="email"], .rmd-reviews-section #respond input[type="url"], .rmd-reviews-section #respond textarea { width: 100%; max-width: 560px; padding: 9px 12px; border: 1px solid #ccc; border-radius: 6px; }
.rmd-reviews-section #respond .submit { background: #2271b1; color: #fff; border: 0; border-radius: 6px; padding: 10px 20px; font-weight: 600; cursor: pointer; }

/* Leaderboard */
.rmd-leaderboard-intro { font-size: 1.05em; }
.rmd-compare-stats { display: flex; flex-wrap: wrap; gap: 10px 26px; background: #f7f8f9; border: 1px solid #e3e3e3; border-radius: 10px; padding: 14px 18px; margin: 16px 0; }
.rmd-stat-vs { opacity: .75; font-size: .9em; }

/* Criteria ratings */
.rmd-criteria-fields { border: 1px solid #ececec; border-radius: 8px; padding: 12px 16px; margin: 12px 0; }
.rmd-criteria-title { font-weight: 700; margin: 0 0 8px; }
.rmd-criteria-field { display: flex; align-items: center; gap: 12px; margin: 4px 0; }
.rmd-criteria-field > label { min-width: 180px; font-size: .95em; }
.rmd-rating-input-small { font-size: 1.3em; }
.rmd-breakdown-chips { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.rmd-chip { background: #f1f5f9; border-radius: 999px; padding: 2px 10px; font-size: .8em; }
.rmd-criteria-aggregate { margin: 12px 0; max-width: 420px; }
.rmd-criteria-row { display: flex; align-items: center; gap: 10px; margin: 4px 0; font-size: .9em; }
.rmd-criteria-label { flex: 0 0 170px; }
.rmd-criteria-bar { flex: 1; background: #ececec; border-radius: 999px; height: 8px; overflow: hidden; }
.rmd-criteria-bar-fill { display: block; height: 100%; background: #f6a623; border-radius: 999px; }
.rmd-criteria-num { font-weight: 700; min-width: 28px; text-align: right; }

/* Business responses */
.rmd-review-list .rmd-business-response { background: #f5f9f6; border-color: #cde7d8; margin-left: 24px; }
.rmd-review-list .rmd-business-response > article::before,
.rmd-review-list .rmd-business-response .comment-body::before { content: "Response from the business"; display: block; font-size: .78em; font-weight: 700; color: #1a7f4b; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }

/* Badge embed */
.rmd-badge-embed { margin-top: 14px; }
.rmd-embed-code { display: block; background: #f1f5f9; border: 1px solid #dbe4ec; border-radius: 6px; padding: 10px 12px; font-size: .85em; overflow-x: auto; user-select: all; }

/* ----- Full-width profile & archive templates (v1.2) ----- */
main.rmd-page { display: block; width: 100%; max-width: none; margin: 0; float: none; background: #f7f8fa; }
.rmd-page { padding: 24px 0 60px; }
.rmd-container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.rmd-breadcrumbs { font-size: .85em; opacity: .8; margin-bottom: 18px; }
.rmd-breadcrumbs a { text-decoration: none; }
.rmd-crumb-sep { opacity: .5; padding: 0 2px; }

.rmd-profile-header { display: flex; gap: 28px; align-items: flex-start; background: #fff; border: 1px solid #e7e7e7; border-radius: 14px; padding: 28px; margin-bottom: 26px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.rmd-profile-logo { flex: 0 0 140px; }
.rmd-profile-logo img { width: 140px; height: 140px; object-fit: contain; border: 1px solid #eee; border-radius: 10px; background: #fff; padding: 10px; }
.rmd-profile-id { flex: 1; min-width: 0; }
.rmd-profile-title { margin: 0 0 8px; font-size: 1.9em; line-height: 1.2; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rmd-profile-rating { font-size: 1.15em; margin-bottom: 8px; }
.rmd-jump { font-size: .8em; margin-left: 10px; }
.rmd-profile-meta { font-size: .95em; opacity: .9; margin-bottom: 14px; }
.rmd-profile-loc { margin-left: 10px; }
.rmd-section-nav { display: flex; gap: 4px; border-top: 1px solid #eee; padding-top: 12px; }
.rmd-section-nav a { padding: 8px 16px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: .92em; }
.rmd-section-nav a:hover { background: #f1f5f9; }

.rmd-profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.rmd-section { background: #fff; border: 1px solid #e7e7e7; border-radius: 14px; padding: 26px 28px; margin-bottom: 24px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.rmd-section > h2 { margin-top: 0; }
.rmd-section .rmd-reviews-section, .rmd-section .rmd-claim-section { border-top: 0; margin-top: 0; padding-top: 0; }

.rmd-profile-side { position: sticky; top: 90px; }
.rmd-contact-card { background: #fff; border: 1px solid #e7e7e7; border-radius: 14px; padding: 22px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.rmd-card-heading { margin: 0 0 12px; font-size: 1.1em; }
.rmd-contact-row { display: block; padding: 9px 0; border-bottom: 1px solid #f1f1f1; text-decoration: none; font-style: normal; }
.rmd-contact-phone strong { font-size: 1.12em; }
.rmd-btn-block { display: block; text-align: center; margin-top: 12px; }
.rmd-card-map { height: 200px; margin-top: 16px; }

/* Archive */
.rmd-archive-header { margin-bottom: 10px; }
.rmd-archive-header h1 { margin-bottom: 10px; }
.rmd-archive-desc { max-width: 820px; opacity: .9; }
.rmd-pagination .page-numbers { display: inline-block; padding: 6px 12px; border: 1px solid #ddd; border-radius: 4px; margin-right: 4px; text-decoration: none; }
.rmd-pagination .page-numbers.current { background: #2271b1; color: #fff; border-color: #2271b1; }

@media (max-width: 980px) {
	.rmd-profile-grid { grid-template-columns: 1fr; }
	.rmd-profile-side { position: static; }
}

@media (max-width: 768px) {
	.rmd-single-top { grid-template-columns: 1fr; }
	.rmd-search-fields { grid-template-columns: 1fr; }
	.rmd-profile-header { flex-direction: column; gap: 16px; padding: 20px; }
	.rmd-profile-logo { flex-basis: auto; }
	.rmd-profile-logo img { width: 96px; height: 96px; }
	.rmd-profile-title { font-size: 1.45em; }
	.rmd-section { padding: 18px; }
	.rmd-section-nav { overflow-x: auto; }
}

/* Packages & monetisation */
.rmd-badge-featured { background: #fff7e0; color: #9a6b00; border: 1px solid #ecd9a0; border-radius: 4px; padding: 2px 8px; font-size: .8em; font-weight: 700; }
.rmd-badge-verified { background: #e7f0fb; color: #1d4f91; border: 1px solid #c3d7f0; border-radius: 4px; padding: 2px 8px; font-size: .8em; font-weight: 700; }
.rmd-card-featured { border: 2px solid #e8c873; box-shadow: 0 4px 16px rgba(184,134,11,.14); }
.rmd-card-flag { position: absolute; top: -1px; right: 14px; background: #b8860b; color: #fff; font-size: .72em; font-weight: 700; padding: 3px 10px; border-radius: 0 0 6px 6px; z-index: 2; letter-spacing: .03em; }

.rmd-pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; margin: 28px 0 10px; align-items: stretch; }
.rmd-tier { position: relative; background: #fff; border: 1px solid #e3e3e3; border-radius: 14px; padding: 26px 24px; display: flex; flex-direction: column; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.rmd-tier-hot { border: 2px solid #2271b1; box-shadow: 0 8px 28px rgba(34,113,177,.16); }
.rmd-tier-flag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: #2271b1; color: #fff; font-size: .75em; font-weight: 700; padding: 3px 14px; border-radius: 999px; white-space: nowrap; }
.rmd-tier-name { margin: 0 0 4px; font-size: 1.25em; }
.rmd-tier-price { font-size: 2.1em; font-weight: 800; margin-bottom: 6px; }
.rmd-tier-price span { font-size: .42em; font-weight: 500; opacity: .7; }
.rmd-tier-desc { font-size: .92em; opacity: .85; min-height: 44px; }
.rmd-tier-feats { list-style: none; margin: 8px 0 18px; padding: 0; flex: 1; }
.rmd-tier-feats li { padding: 6px 0 6px 24px; position: relative; font-size: .92em; border-bottom: 1px solid #f4f4f4; }
.rmd-tier-feats li::before { content: "\2713"; position: absolute; left: 2px; color: #1a7f4b; font-weight: 700; }
.rmd-pricing-note { font-size: .85em; opacity: .75; margin-top: 14px; }

/* Quote form */
.rmd-quote-form h3 { margin-top: 0; }
.rmd-quote-sub { opacity: .8; margin-top: -6px; }
.rmd-quote-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-bottom: 14px; }
.rmd-quote-grid label { font-weight: 600; font-size: .9em; }
.rmd-quote-grid input, .rmd-quote-grid textarea { width: 100%; padding: 9px 12px; border: 1px solid #ccc; border-radius: 6px; font-weight: 400; margin-top: 4px; }
.rmd-quote-full { grid-column: 1 / -1; }
.rmd-quote-privacy { font-size: .8em; opacity: .7; margin-top: 10px; }

/* Gallery + hours */
.rmd-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.rmd-gallery-grid img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; display: block; }
.rmd-hours p { background: #f7f8f9; border-radius: 8px; padding: 12px 16px; display: inline-block; }

/* Upsell box */
.rmd-upsell { background: #f0f6fb; border: 1px solid #c9dff2; border-radius: 10px; padding: 14px 18px; margin-top: 16px; }
.rmd-upsell p { margin: 0 0 10px; }

@media (max-width: 700px) {
	.rmd-quote-grid { grid-template-columns: 1fr; }
}

/* Author box */
.rmd-author-box { display: flex; gap: 18px; align-items: flex-start; background: #f7f8fa; border: 1px solid #e7e7e7; border-radius: 12px; padding: 20px 22px; margin: 36px 0 10px; }
.rmd-author-avatar { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 50%; background: #7a1f3d; color: #fff; font-weight: 800; font-size: 1.15em; display: flex; align-items: center; justify-content: center; letter-spacing: .02em; }
.rmd-author-label { display: block; font-size: .78em; text-transform: uppercase; letter-spacing: .06em; opacity: .65; }
.rmd-author-name { display: block; font-weight: 700; font-size: 1.05em; margin: 2px 0 6px; }
.rmd-author-bio { font-size: .92em; margin: 0 0 8px; opacity: .9; }
.rmd-author-links { font-size: .85em; margin: 0; }
