/* Toplist & Review Nhà Hàng — frontend
   Tất cả selector bắt đầu bằng .rt- để không ảnh hưởng theme. */

.rt-toplist {
	--rt-accent: #d9480f;
	--rt-accent-dark: #b63c0b;
	--rt-text: #1f2937;
	--rt-muted: #6b7280;
	--rt-border: #e5e7eb;
	--rt-surface: #fff;
	--rt-soft: #f9fafb;
	--rt-radius: 12px;
	box-sizing: border-box;
	margin: 2rem 0;
	color: var(--rt-text);
	font-size: 16px;
	line-height: 1.6;
}
.rt-toplist *,
.rt-toplist *::before,
.rt-toplist *::after { box-sizing: border-box; }

.rt-toplist__title { margin: 0 0 .75rem; line-height: 1.25; }
.rt-toplist__intro,
.rt-toplist__conclusion { margin: 0 0 1.5rem; color: var(--rt-text); }
.rt-toplist__conclusion { margin: 1.5rem 0 0; padding: 1.25rem; background: var(--rt-soft); border: 1px solid var(--rt-border); border-radius: var(--rt-radius); }
.rt-toplist__intro > :last-child,
.rt-toplist__conclusion > :last-child { margin-bottom: 0; }

.rt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.rt-item { margin: 0; padding: 0; list-style: none; }
.rt-item::marker { content: none; }

/* ---------- Card ---------- */
.rt-card {
	position: relative;
	display: grid;
	grid-template-columns: 230px minmax(0, 1fr) 200px;
	gap: 1.5rem;
	padding: 1.5rem;
	background: var(--rt-surface);
	border: 1px solid var(--rt-border);
	border-radius: var(--rt-radius);
	transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.rt-card:hover {
	border-color: #d1d5db;
	box-shadow: 0 8px 24px rgba(17, 24, 39, .08);
}
.rt-card--no-cta { grid-template-columns: 230px minmax(0, 1fr); }

/* ---------- Khu vực trái ---------- */
.rt-card__left { display: flex; flex-direction: column; gap: .75rem; min-width: 0; }

.rt-rank {
	align-self: flex-start;
	padding: .2rem .7rem;
	font-size: .8125rem;
	font-weight: 700;
	letter-spacing: .02em;
	color: #fff;
	background: var(--rt-accent);
	border-radius: 999px;
	line-height: 1.5;
}

.rt-media {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 120px;
	height: 120px;
	background: var(--rt-soft);
	border: 1px solid var(--rt-border);
	border-radius: 10px;
	overflow: hidden;
}
.rt-media .rt-img { display: block; width: 100%; height: 100%; max-width: 100%; object-fit: contain; padding: 8px; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.rt-media--photo .rt-img { padding: 0; object-fit: cover; }
.rt-initial { font-size: 2.5rem; font-weight: 700; color: var(--rt-accent); line-height: 1; }

.rt-name { margin: 0; font-size: 1.25rem; line-height: 1.3; color: var(--rt-text); word-break: break-word; }

.rt-rating { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; margin-top: .35rem; }
.rt-score { font-weight: 700; font-size: 1.05rem; }
.rt-stars { position: relative; display: inline-block; font-size: 1rem; line-height: 1; letter-spacing: 2px; color: #d1d5db; white-space: nowrap; }
.rt-stars::before { content: "\2605\2605\2605\2605\2605"; }
.rt-stars-fill { position: absolute; top: 0; left: 0; height: 100%; overflow: hidden; color: #f59e0b; white-space: nowrap; }
.rt-stars-fill::before { content: "\2605\2605\2605\2605\2605"; }
.rt-count { font-size: .8125rem; color: var(--rt-muted); }

.rt-meta { margin: 0; display: grid; gap: .4rem; font-size: .9rem; }
.rt-meta > div { display: grid; gap: 0; }
.rt-meta dt { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--rt-muted); }
.rt-meta dd { margin: 0; color: var(--rt-text); word-break: break-word; }
.rt-meta a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Khu vực giữa ---------- */
.rt-card__body { min-width: 0; }
.rt-headline { margin: 0 0 .5rem; font-size: 1.125rem; line-height: 1.4; color: var(--rt-text); }
.rt-review { color: var(--rt-text); }
.rt-review > :first-child { margin-top: 0; }
.rt-review > :last-child { margin-bottom: 0; }

.rt-procon { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 1rem; }
.rt-procon > div { padding: .85rem 1rem; border-radius: 8px; background: var(--rt-soft); border: 1px solid var(--rt-border); }
.rt-procon strong { display: block; margin-bottom: .35rem; font-size: .9rem; }
.rt-procon ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; font-size: .9375rem; }
.rt-procon li { position: relative; margin: 0; padding: 0 0 0 1.4rem; }
.rt-procon li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.rt-pros li::before { content: "\2713"; color: #15803d; }
.rt-cons li::before { content: "\2715"; color: #b91c1c; }
.rt-pros strong { color: #166534; }
.rt-cons strong { color: #991b1b; }

/* ---------- Khu vực phải: CTA ---------- */
.rt-card__cta { display: flex; flex-direction: column; justify-content: center; gap: .6rem; }

.rt-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: .6rem 1rem;
	font-size: .9375rem;
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	text-decoration: none !important;
	border: 2px solid var(--rt-accent);
	border-radius: 8px;
	cursor: pointer;
	transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.rt-btn--primary { color: #fff !important; background: var(--rt-accent); }
.rt-btn--primary:hover,
.rt-btn--primary:focus-visible { background: var(--rt-accent-dark); border-color: var(--rt-accent-dark); box-shadow: 0 4px 12px rgba(0, 0, 0, .15); }
.rt-btn--secondary { color: var(--rt-accent) !important; background: #fff; }
.rt-btn--secondary:hover,
.rt-btn--secondary:focus-visible { color: #fff !important; background: var(--rt-accent); }
.rt-btn:focus-visible { outline: 3px solid rgba(0, 0, 0, .25); outline-offset: 2px; }

.rt-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.rt-notice { padding: .75rem 1rem; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
	.rt-card,
	.rt-card--no-cta { grid-template-columns: 200px minmax(0, 1fr); gap: 1.25rem; padding: 1.25rem; }
	.rt-card__cta {
		grid-column: 1 / -1;
		flex-direction: row;
		flex-wrap: wrap;
		padding-top: 1rem;
		border-top: 1px dashed var(--rt-border);
	}
	.rt-card__cta .rt-btn { flex: 1 1 140px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
	.rt-card,
	.rt-card--no-cta { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding: 1rem; }

	.rt-card__left {
		display: grid;
		grid-template-columns: 88px minmax(0, 1fr);
		grid-template-areas: "rank rank" "media head" "meta meta";
		column-gap: .9rem;
		row-gap: .6rem;
		align-items: center;
	}
	.rt-rank { grid-area: rank; justify-self: start; }
	.rt-media { grid-area: media; width: 88px; height: 88px; }
	.rt-head { grid-area: head; min-width: 0; }
	.rt-meta { grid-area: meta; }
	.rt-name { font-size: 1.125rem; }

	.rt-card__cta { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
	.rt-card__cta .rt-btn { flex: none; }
	.rt-card__cta .rt-btn:only-child { grid-column: 1 / -1; }
	.rt-card__cta .rt-btn:nth-child(odd):last-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
	.rt-card,
	.rt-btn { transition: none; }
}
