/* DisneyDogs 2027: resort comparison table. */

.dd-resorts {
	margin: 1.5rem 0 2rem;
}

.dd-resorts .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

/* ---------- Controls ---------- */
.dd-resorts__controls {
	align-items: flex-end;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 1.75rem;
	margin-bottom: 0.75rem;
}

.dd-resorts__group {
	border: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	min-width: 0;
	padding: 0;
}

.dd-resorts__group legend {
	color: var(--dd-muted);
	flex: 0 0 100%;
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	margin: 0 0 0.35rem;
	padding: 0;
	text-transform: uppercase;
}

.dd-chip-btn {
	background: var(--dd-white);
	border: 2px solid var(--dd-line);
	border-radius: 999px;
	color: var(--dd-blue-deep);
	cursor: pointer;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 800;
	min-height: 2.5rem;
	padding: 0.25rem 1rem;
	transition: background-color 120ms ease, border-color 120ms ease;
}

.dd-chip-btn:hover {
	border-color: var(--dd-blue);
}

.dd-chip-btn[aria-pressed="true"] {
	background: var(--dd-blue-deep);
	border-color: var(--dd-blue-deep);
	color: #fff;
}

.dd-resorts__sort {
	align-items: flex-start;
	flex-direction: column;
	gap: 0.35rem;
}

.dd-resorts__sort label {
	color: var(--dd-muted);
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.dd-resorts__sort select {
	background: var(--dd-white);
	border: 2px solid var(--dd-line);
	border-radius: var(--dd-radius-sm);
	color: var(--dd-blue-deep);
	font: inherit;
	font-weight: 700;
	min-height: 2.5rem;
	padding: 0.25rem 0.75rem;
}

.dd-resorts__reset {
	background: none;
	border: 0;
	color: var(--dd-blue);
	cursor: pointer;
	font: inherit;
	font-weight: 800;
	min-height: 2.5rem;
	text-decoration: underline;
}

.dd-resorts__count {
	color: var(--dd-muted);
	font-size: 0.95rem;
	font-weight: 700;
	margin: 0 0 0.6rem;
}

/* ---------- Table ---------- */
.dd-resorts__scroll {
	background: var(--dd-white);
	border: 2px solid var(--dd-line);
	border-radius: var(--dd-radius);
	box-shadow: var(--dd-shadow-sm);
	overflow-x: auto;
}

.dd-resorts__table {
	border-collapse: separate;
	border-spacing: 0;
	min-width: 62rem;
	width: 100%;
}

.dd-resorts__table th,
.dd-resorts__table td {
	border-bottom: 1px solid var(--dd-line);
	padding: 0.8rem 0.9rem;
	text-align: left;
	vertical-align: top;
}

.dd-resorts__table thead th {
	background: var(--dd-blue-soft);
	color: var(--dd-blue-deep);
	font-size: 0.85rem;
	font-weight: 800;
	position: sticky;
	top: 0;
	white-space: nowrap;
	z-index: 2;
}

.dd-resorts__table tbody tr:last-child th,
.dd-resorts__table tbody tr:last-child td {
	border-bottom: 0;
}

.dd-resorts__table tbody tr:hover > * {
	background: #f8faff;
}

.dd-resorts__table tbody th[scope="row"] {
	background: var(--dd-white);
	font-family: var(--dd-font-head);
	font-size: 1.02rem;
	font-weight: 600;
	left: 0;
	line-height: 1.3;
	min-width: 13rem;
	position: sticky;
	z-index: 1;
}

.dd-resorts__table tbody th[scope="row"] a {
	color: var(--dd-blue-deep);
}

.dd-resorts__table [hidden] {
	display: none;
}

.dd-sort {
	align-items: center;
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: 800;
	gap: 0.35rem;
	padding: 0;
	text-align: left;
}

.dd-sort::after {
	color: var(--dd-muted);
	content: "\2195";
	font-size: 0.8rem;
}

th[aria-sort="ascending"] .dd-sort::after {
	color: var(--dd-blue-deep);
	content: "\2191";
}

th[aria-sort="descending"] .dd-sort::after {
	color: var(--dd-blue-deep);
	content: "\2193";
}

.dd-sort:focus-visible,
.dd-chip-btn:focus-visible,
.dd-resorts__scroll:focus-visible,
.dd-resorts__reset:focus-visible,
.dd-resorts__sort select:focus-visible {
	outline: 3px solid var(--dd-gold);
	outline-offset: 2px;
}

/* ---------- Badges and tags ---------- */
.dd-tier {
	border-radius: 999px;
	display: inline-block;
	font-size: 0.8rem;
	font-weight: 800;
	line-height: 1;
	padding: 0.4rem 0.8rem;
}

.dd-tier--value {
	background: var(--dd-gold-soft);
	color: #5c4300;
}

.dd-tier--moderate {
	background: var(--dd-blue-soft);
	color: var(--dd-blue-deep);
}

.dd-tier--deluxe {
	background: var(--dd-blue-deep);
	color: #fff;
}

.dd-resorts__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.dd-resorts__tags li {
	background: #f1f4fb;
	border: 1px solid var(--dd-line);
	border-radius: 999px;
	color: var(--dd-blue-deep);
	font-size: 0.8rem;
	font-weight: 700;
	padding: 0.1rem 0.6rem;
}

.dd-resorts__tags li.is-special {
	background: var(--dd-gold-soft);
	border-color: var(--dd-gold);
}

.dd-resorts__links {
	font-size: 0.92rem;
	min-width: 9.5rem;
}

.dd-resorts__links a {
	display: block;
	margin-bottom: 0.25rem;
}

.dd-resorts__links a:last-child {
	margin-bottom: 0;
}

@media (min-width: 56.01rem) {
	.dd-resorts__table td:nth-child(3) {
		min-width: 8.5rem;
	}

	.dd-resorts__table td:nth-child(6) {
		min-width: 13rem;
	}
}

.dd-resorts__empty {
	background: var(--dd-gold-soft);
	border-left: 6px solid var(--dd-gold);
	border-radius: 0 var(--dd-radius-sm) var(--dd-radius-sm) 0;
	font-weight: 700;
	margin: 1rem 0 0;
	padding: 0.9rem 1.1rem;
}

.dd-resorts__note {
	color: var(--dd-muted);
	font-size: 0.9rem;
	margin: 0.9rem 0 0;
}

/* ---------- Phones and small tablets: one card per resort ---------- */
@media (max-width: 56rem) {
	.dd-resorts__scroll {
		background: none;
		border: 0;
		box-shadow: none;
		overflow: visible;
	}

	.dd-resorts__table,
	.dd-resorts__table tbody {
		display: block;
		min-width: 0;
	}

	.dd-resorts__table thead {
		clip: rect(1px, 1px, 1px, 1px);
		height: 1px;
		overflow: hidden;
		position: absolute;
		width: 1px;
	}

	.dd-resorts__table tbody tr {
		background: var(--dd-white);
		border: 2px solid var(--dd-line);
		border-radius: var(--dd-radius);
		box-shadow: var(--dd-shadow-sm);
		display: grid;
		gap: 0.1rem 1rem;
		margin-bottom: 1rem;
		padding: 0.5rem 0;
	}

	.dd-resorts__table tbody tr[hidden] {
		display: none;
	}

	.dd-resorts__table tbody th[scope="row"] {
		border: 0;
		font-size: 1.15rem;
		min-width: 0;
		padding: 0.6rem 1rem 0.3rem;
		position: static;
	}

	.dd-resorts__table tbody td {
		border: 0;
		display: grid;
		gap: 0.75rem;
		grid-template-columns: 8.5rem 1fr;
		padding: 0.35rem 1rem;
	}

	.dd-resorts__table tbody td::before {
		color: var(--dd-muted);
		content: attr(data-label);
		font-size: 0.78rem;
		font-weight: 800;
		letter-spacing: 0.03em;
		text-transform: uppercase;
	}

	.dd-resorts__table tbody tr:hover > * {
		background: none;
	}
}

/* Fit the table inside the page width on laptops and desktops. */
@media (min-width: 56.01rem) {
	.dd-resorts__table {
		min-width: 56rem;
	}

	.dd-resorts__table th,
	.dd-resorts__table td {
		padding: 0.75rem 0.7rem;
	}

	.dd-resorts__table thead th {
		vertical-align: bottom;
		white-space: normal;
	}

	.dd-resorts__table td:nth-child(3) {
		min-width: 7.5rem;
	}

	.dd-resorts__table td:nth-child(6) {
		min-width: 11rem;
	}

	.dd-resorts__links {
		min-width: 8.5rem;
	}
}
