/* Pin Detail — standalone page redesign (was a Fancybox popup-over-feed before; see
   agent/modules/pending/pin-details/new.md item 1). Reuses home-v2.css's page shell
   (.home-v2-layout/.home-v2-rail) for the left sponsored rail — same tokens throughout:
   brand red #e74c3c, navy headings #1f2f3d/#2d3e4f, neutral border #e9e7e3, soft navy shadow. */

.pin-detail-main {
	flex: 1 1 auto;
	min-width: 0;
	padding: 24px 0 60px;
}

/* ── Hero image ── */
.pin-detail-hero {
	position: relative;
	min-height: 320px;
	border-radius: 14px;
	overflow: hidden;
	background: #f1f0ed;
	box-shadow: 0 4px 16px rgba(45,62,79,.12);
	display: flex;
	align-items: center;
	justify-content: center;
}
.pin-detail-hero-img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 620px;
	transition: opacity .15s;
}
.pin-detail-hero-img.pin-detail-swapping { opacity: .4; }
.pin-detail-hero-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255,255,255,.92);
	color: #2d3e4f;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 10px rgba(45,62,79,.2);
	cursor: pointer;
	z-index: 3;
	transition: background-color .15s, transform .15s;
}
.pin-detail-hero-nav:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.pin-detail-hero-nav.pin-detail-hero-prev { left: 14px; }
.pin-detail-hero-nav.pin-detail-hero-next { right: 14px; }
.pin-detail-hero-nav svg { width: 18px; height: 18px; }
.pin-detail-hero-counter {
	position: absolute;
	right: 14px;
	bottom: 14px;
	z-index: 3;
	padding: 4px 12px;
	background: rgba(17,17,17,.65);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	border-radius: 20px;
	backdrop-filter: blur(2px);
}

/* ── Thumbnail strip ── */
.pin-detail-thumbs {
	display: flex;
	gap: 10px;
	margin-top: 12px;
	overflow-x: auto;
	padding-bottom: 2px;
}
.pin-detail-thumb {
	flex-shrink: 0;
	width: 84px;
	height: 84px;
	border-radius: 10px;
	overflow: hidden;
	border: 2px solid transparent;
	cursor: pointer;
	opacity: .75;
	transition: opacity .15s, border-color .15s;
}
.pin-detail-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pin-detail-thumb:hover { opacity: 1; }
.pin-detail-thumb.is-active { opacity: 1; border-color: #e74c3c; }

/* ── Title / category badge ── */
.pin-detail-title-row {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin: 22px 0 0;
}
.pin-detail-title {
	font-size: 24px;
	font-weight: 800;
	color: #1f2f3d;
	letter-spacing: -.2px;
	margin: 0;
}
.pin-detail-category-badge {
	padding: 4px 12px;
	background: #f4f3f1;
	color: #6b7680;
	font-size: 12.5px;
	font-weight: 700;
	border-radius: 20px;
}

/* ── Rating row ── */
.pin-detail-rating-row {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
}
.pin-detail-rating-star { width: 15px; height: 15px; color: #e74c3c; }
.pin-detail-rating-value { font-size: 14px; font-weight: 800; color: #1f2f3d; }
.pin-detail-rating-count { font-size: 13px; color: #97a3ad; }

/* ── Action row (Save / Like / Share / More) ── */
.pin-detail-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 16px;
}
.pin-detail-action-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 16px;
	border: 1px solid #e9e7e3;
	border-radius: 20px;
	background: #fff;
	color: #6b7680;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(45,62,79,.04);
	transition: border-color .15s, box-shadow .15s, color .15s, background-color .15s, transform .15s;
}
.pin-detail-action-btn:hover { border-color: #ddd9d3; box-shadow: 0 3px 8px rgba(45,62,79,.08); transform: translateY(-1px); color: #2d3e4f; }
.pin-detail-action-btn svg { width: 15px; height: 15px; }
.pin-detail-action-btn.is-active { background: #fdeceb; border-color: #f6c9c4; color: #e74c3c; }
.pin-detail-action-btn.is-active svg { fill: #e74c3c; }
.pin-detail-action-more {
	width: 36px; height: 36px; padding: 0;
	justify-content: center;
	border-radius: 50%;
	position: relative;
}
.pin-detail-more-menu {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	min-width: 160px;
	background: #fff;
	border: 1px solid #e9e7e3;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(45,62,79,.16);
	padding: 6px;
	z-index: 5;
}
.pin-detail-more-menu a {
	display: block;
	padding: 8px 10px;
	font-size: 13px;
	font-weight: 600;
	color: #2d3e4f;
	text-decoration: none;
	border-radius: 6px;
}
.pin-detail-more-menu a:hover { background: #f4f3f1; }
.pin-detail-share-menu {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	min-width: 170px;
	background: #fff;
	border: 1px solid #e9e7e3;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(45,62,79,.16);
	padding: 6px;
	z-index: 5;
}
.pin-detail-share-menu a {
	display: block;
	padding: 8px 10px;
	font-size: 13px;
	font-weight: 600;
	color: #2d3e4f;
	text-decoration: none;
	border-radius: 6px;
}
.pin-detail-share-menu a:hover { background: #f4f3f1; }

/* ── Address / Get Directions ── */
.pin-detail-address-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 18px;
	padding: 12px 14px;
	background: #f9f9f8;
	border: 1px solid #f1f0ed;
	border-radius: 12px;
}
.pin-detail-address-text {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13.5px;
	color: #4a5560;
	font-weight: 600;
}
.pin-detail-address-text svg { width: 16px; height: 16px; color: #e74c3c; flex-shrink: 0; }
.pin-detail-directions-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 18px;
	border: 1.5px solid #e74c3c;
	color: #e74c3c;
	background: #fff;
	font-size: 12.5px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color .15s, color .15s;
}
.pin-detail-directions-btn:hover { background: #e74c3c; color: #fff; }
.pin-detail-directions-btn svg { width: 13px; height: 13px; }

/* ── Description ── */
.pin-detail-description {
	margin-top: 18px;
	font-size: 14.5px;
	line-height: 22px;
	color: #4a5560;
}

/* ── Map section ── */
.pin-detail-map-section { margin-top: 26px; }
.pin-detail-map-header {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	font-weight: 800;
	color: #1f2f3d;
	margin: 0 0 10px;
}
.pin-detail-map-header svg { width: 17px; height: 17px; color: #e74c3c; }
.pin-detail-map-toggle {
	display: inline-flex;
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 4;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(45,62,79,.16);
	overflow: hidden;
}
.pin-detail-map-toggle button {
	border: 0;
	background: #fff;
	color: #4a5560;
	font-size: 12.5px;
	font-weight: 700;
	padding: 8px 14px;
	cursor: pointer;
}
.pin-detail-map-toggle button.is-active { background: #e74c3c; color: #fff; }
.pin-detail-map-wrap {
	position: relative;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid #e9e7e3;
}
.pin-detail-map {
	width: 100%;
	height: 320px;
}
.pin-detail-map-expand {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 4;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 2px 10px rgba(45,62,79,.16);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #4a5560;
	cursor: pointer;
}
.pin-detail-map-expand svg { width: 15px; height: 15px; }

/* ── Sidebar ── */
.pin-detail-sidebar {
	width: 320px;
	flex-shrink: 0;
	padding: 24px 0 60px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.pin-detail-card {
	background: #fff;
	border: 1px solid #eeece8;
	border-radius: 14px;
	padding: 18px;
	box-shadow: 0 1px 3px rgba(45,62,79,.06);
}

/* Uploader card */
.pin-detail-uploader {
	display: flex;
	align-items: center;
	gap: 12px;
}
.pin-detail-uploader-avatar {
	width: 52px; height: 52px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	background: #f4f3f1;
}
.pin-detail-uploader-name {
	font-size: 15px;
	font-weight: 800;
	color: #1f2f3d;
	text-decoration: none;
	display: block;
}
.pin-detail-uploader-name:hover { color: #e74c3c; }
.pin-detail-uploader-handle {
	font-size: 12.5px;
	color: #97a3ad;
	margin: 1px 0 0;
}
.pin-detail-uploader-stats {
	display: flex;
	gap: 12px;
	margin-top: 10px;
	font-size: 12.5px;
	color: #6b7680;
	font-weight: 600;
}
.pin-detail-uploader-stats strong { color: #1f2f3d; font-weight: 800; }
.pin-detail-follow-btn {
	display: block;
	width: 100%;
	margin-top: 14px;
	padding: 9px 0;
	text-align: center;
	background: #e74c3c;
	color: #fff;
	border: 0;
	border-radius: 18px;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s;
}
.pin-detail-follow-btn:hover { background: #ec7063; color: #fff; }
.pin-detail-follow-btn.active { background: #f4f3f1; color: #6b7680; }
.pin-detail-follow-btn.active:hover { background: #ecebe8; }

/* Card header row (title + "See all") */
.pin-detail-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}
.pin-detail-card-title { font-size: 14.5px; font-weight: 800; color: #1f2f3d; margin: 0; }
.pin-detail-card-link {
	font-size: 12.5px;
	font-weight: 700;
	color: #e74c3c;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 3px;
}
.pin-detail-card-link:hover { color: #ec7063; }
.pin-detail-card-link svg { width: 12px; height: 12px; }

/* Other pins grid */
.pin-detail-other-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}
.pin-detail-other-thumb {
	display: block;
	aspect-ratio: 1 / 1;
	border-radius: 8px;
	overflow: hidden;
	background: #f4f3f1;
}
.pin-detail-other-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.pin-detail-other-thumb:hover img { transform: scale(1.05); }

/* Similar places list */
.pin-detail-place-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	border-top: 1px solid #f1f0ed;
	text-decoration: none;
}
.pin-detail-place-row:first-of-type { border-top: 0; padding-top: 0; }
.pin-detail-place-thumb {
	width: 48px; height: 48px;
	border-radius: 8px;
	object-fit: cover;
	flex-shrink: 0;
	background: #f4f3f1;
}
.pin-detail-place-info { min-width: 0; flex: 1; }
.pin-detail-place-name {
	font-size: 13px;
	font-weight: 700;
	color: #1f2f3d;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.pin-detail-place-meta {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 11.5px;
	color: #97a3ad;
	margin-top: 2px;
}
.pin-detail-place-meta svg { width: 11px; height: 11px; color: #e74c3c; }
.pin-detail-place-bookmark {
	width: 28px; height: 28px;
	border-radius: 8px;
	border: 1px solid #e9e7e3;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #97a3ad;
	flex-shrink: 0;
}
.pin-detail-place-bookmark svg { width: 13px; height: 13px; }
.pin-detail-view-more {
	display: block;
	width: 100%;
	margin-top: 12px;
	padding: 10px 0;
	text-align: center;
	background: #fdeceb;
	color: #e74c3c;
	border-radius: 12px;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
}
.pin-detail-view-more:hover { background: #fbdbd7; color: #e74c3c; }

/* ── Comments — reuses the existing pin.widget.comment markup/logic as-is (avatars, remove/
   report links, the add-comment form all still work exactly as before), just restyled to sit
   inside a .pin-detail-card instead of its old bare/dark styling. */
.pin-detail-comments .comments { list-style: none; margin: 0; padding: 0; }
.pin-detail-comments .comments > li {
	display: flex;
	flex-wrap: wrap;
	gap: 0 12px;
	padding: 14px 0;
	border-top: 1px solid #f1f0ed;
}
.pin-detail-comments .comments > li:first-child { border-top: 0; padding-top: 0; }
.pin-detail-comments .avatar { flex-shrink: 0; }
.pin-detail-comments .avatar img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: block; }
.pin-detail-comments .title-5 {
	font-size: 13.5px;
	font-weight: 800;
	color: #1f2f3d;
	margin: 0 0 2px;
	order: 1;
}
.pin-detail-comments .comment {
	font-size: 13.5px;
	color: #4a5560;
	line-height: 20px;
	order: 3;
	width: 100%;
	margin-top: 2px;
}
.pin-detail-comments .meta-text-2 {
	order: 2;
	font-size: 11.5px;
	color: #97a3ad;
	margin: 0;
}
.pin-detail-comments .button-remove,
.pin-detail-comments .button-report {
	color: #e74c3c;
	font-weight: 700;
	text-decoration: none;
	margin-left: 8px;
}
/* The add-comment form gets its own layout instead of the display-comment-row flex/order
   scheme above — avatar+name as a compact header row, a proper rounded textarea, and the
   submit button right-aligned beneath it, matching the rounded/pill language used everywhere
   else on this page (action buttons, follow button, map toggle).
   Note: the real DOM is <li class="...comment-formholder"><form>avatar, title-5, .comment,
   .submit</form></li> — the form wraps everything, so `display:contents` on it is needed to
   let those four elements become direct flex children of the li (otherwise flex `order`/gap
   rules below have no effect, which is what caused the padding to look collapsed before — an
   earlier version tried to fix the layout with a negative top margin instead, which visually
   ate into the container's own padding). */
.pin-detail-comments [class*="comment-formholder"] {
	display: flex;
	flex-flow: row wrap;
	align-items: center;
	gap: 10px;
	background: #f9f9f8;
	border: 1px solid #f1f0ed;
	border-radius: 14px;
	/* !important: the generic ".comments > li" / ":first-child" rules above have a higher
	   specificity (extra `li`/`:first-child`) than this attribute-selector rule and were
	   stripping padding on 3 sides whenever this form is the only/first item in the list
	   (i.e. whenever a pin has zero real comments yet) — that was the actual "no padding" bug. */
	padding: 16px !important;
}
.pin-detail-comments [class*="comment-formholder"] > form {
	display: contents;
}
.pin-detail-comments [class*="comment-formholder"] .avatar {
	display: inline-flex;
	order: 0;
}
.pin-detail-comments [class*="comment-formholder"] .avatar img { width: 34px; height: 34px; }
.pin-detail-comments [class*="comment-formholder"] .title-5 {
	order: 1;
	margin: 0;
	font-size: 13px;
}
.pin-detail-comments [class*="comment-formholder"] .comment {
	order: 2;
	flex-basis: 100%;
	width: 100%;
	margin-top: 8px;
}
.pin-detail-comments [class*="comment-formholder"] textarea {
	width: 100%;
	min-height: 64px;
	padding: 12px 14px;
	background: #fff;
	border: 1.5px solid #e9e7e3;
	border-radius: 14px;
	box-shadow: 0 1px 2px rgba(45,62,79,.04);
	font-size: 13.5px;
	font-family: Lato, sans-serif;
	line-height: 20px;
	resize: vertical;
	outline: none;
	box-sizing: border-box;
	transition: border-color .15s, box-shadow .15s;
}
.pin-detail-comments [class*="comment-formholder"] textarea:focus {
	border-color: #e74c3c;
	box-shadow: 0 0 0 3px rgba(231,76,60,.12);
}
.pin-detail-comments [class*="comment-formholder"] textarea::placeholder { color: #97a3ad; }
.pin-detail-comments .submit {
	order: 3;
	flex-basis: 100%;
	margin-top: 12px;
	display: flex;
	justify-content: flex-end;
}
.pin-detail-comments .submit .button {
	display: inline-flex;
	align-items: center;
	padding: 9px 22px;
	background: #e74c3c;
	color: #fff;
	border: 0;
	border-radius: 20px;
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(231,76,60,.28);
	transition: background-color .15s, transform .15s, box-shadow .15s;
}
.pin-detail-comments .submit .button:hover {
	background: #ec7063;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(231,76,60,.32);
}

@media (max-width: 900px) {
	.pin-detail-sidebar { display: none; }
}
