/* Amy's Attic Size Guide. Everything is scoped under .asg; brand colours come from inline custom properties. */

.asg {
	--asg-ink: #1f2a37;
	--asg-muted: #5b6675;
	--asg-line: #dfe5ec;
	--asg-soft: #f4f7fa;
	--asg-grid: #e6ebf0;
	--asg-wall: #2b3644;
	--asg-radius: 14px;
	--asg-tone1: #f1cf9a; /* Furniture palette: shared by the 2D drawings and the 3D faces. */
	--asg-tone2: #a9d6ee;
	--asg-tone3: #e3e9f0;
	--asg-tone4: #e3bd8f;
	--asg-tone5: #7fb8d6;
	--asg-tone6: #cfd6dd;
	color: var(--asg-ink);
	max-width: 1080px;
	margin: 0 auto;
	box-sizing: border-box;
}

.asg *,
.asg *::before,
.asg *::after {
	box-sizing: inherit;
}

.asg [hidden] {
	display: none !important;
}

.asg h2,
.asg h3,
.asg h4,
.asg p,
.asg ul {
	margin: 0;
	padding: 0;
}

.asg ul {
	list-style: none;
}

/* ---- Header & helper ---------------------------------------------------- */

.asg-head {
	text-align: center;
	margin-bottom: 20px;
}

.asg-title {
	font-size: clamp(1.6rem, 3vw, 2.2rem);
	line-height: 1.2;
	margin-bottom: 8px !important;
}

/* The theme's own page title is emptied on guide pages; hide what is left of it. */
.asg-page .entry-title:empty {
	display: none;
}

.asg-intro {
	color: var(--asg-muted);
	max-width: 640px;
	margin: 0 auto !important;
}

.asg-helper {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-bottom: 18px;
}

.asg-helper-label {
	flex: 0 0 100%; /* The label gets its own line; the chips start on the next one. */
	text-align: center;
	font-weight: 700;
	margin-bottom: 2px;
}

.asg-chip {
	appearance: none;
	background: #fff;
	color: var(--asg-ink);
	border: 1px solid var(--asg-line);
	border-radius: 999px;
	padding: 7px 14px;
	font: inherit;
	font-size: 0.9rem;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}

.asg-chip:hover,
.asg-chip:focus-visible {
	border-color: var(--asg-accent);
	color: var(--asg-accent);
}

/* ---- Size tabs ---------------------------------------------------------- */

.asg-tabs {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 4px 2px 10px;
	scroll-snap-type: x proximity;
	scrollbar-width: thin;
}

.asg-tab {
	appearance: none;
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	min-width: 82px;
	background: #fff;
	color: var(--asg-ink);
	border: 2px solid var(--asg-line);
	border-radius: 12px;
	padding: 9px 14px;
	font: inherit;
	line-height: 1.2;
	cursor: pointer;
	scroll-snap-align: center;
	transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.asg-tab-label {
	font-weight: 800;
	font-size: 1.05rem;
}

.asg-tab-area {
	font-size: 0.75rem;
	color: var(--asg-muted);
}

.asg-tabselect {
	display: none;
}

.asg-tabselect label {
	display: block;
	font-weight: 800;
	font-size: 1.35rem;
	line-height: 1.2;
	color: var(--asg-ink);
	margin-bottom: 16px;
}

/* Site look: orange outline and caret like the Rent / Rates buttons, big tap target. */
.asg-select.asg-tabselect-field { /* Two classes: the generic .asg-select rule further down would otherwise win. */
	width: 100%;
	min-height: 64px;
	padding: 18px 52px 18px 20px;
	font: inherit;
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--asg-ink);
	border: 2px solid var(--asg-primary);
	border-radius: 12px;
	-webkit-appearance: none;
	appearance: none;
	background-color: #fff;
	background-image:
		linear-gradient(45deg, transparent 50%, var(--asg-primary) 50%),
		linear-gradient(135deg, var(--asg-primary) 50%, transparent 50%);
	background-position: calc(100% - 28px) 50%, calc(100% - 20px) 50%;
	background-size: 8px 8px, 8px 8px;
	background-repeat: no-repeat;
	box-shadow: 0 2px 8px rgba(31, 42, 55, 0.08);
	cursor: pointer;
}

.asg-select.asg-tabselect-field:focus-visible {
	outline: 3px solid var(--asg-accent);
	outline-offset: 2px;
}

.asg-tab:hover {
	border-color: var(--asg-accent);
}

.asg-tab[aria-selected="true"] {
	background: var(--asg-primary);
	border-color: var(--asg-primary);
	color: #fff;
}

.asg-tab[aria-selected="true"] .asg-tab-area {
	color: rgba(255, 255, 255, 0.85);
}

.asg-tab:focus-visible,
.asg-chip:focus-visible,
.asg-btn:focus-visible,
.asg-select:focus-visible {
	outline: 3px solid var(--asg-accent);
	outline-offset: 2px;
}

/* ---- Panel: plan + details --------------------------------------------- */

.asg-panel {
	margin-top: 8px;
}

.asg-panel-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
	gap: 28px;
	align-items: start;
}

.asg-plan-wrap {
	margin: 0;
	background: var(--asg-soft);
	border-radius: var(--asg-radius);
	padding: 16px;
	overflow-x: auto; /* Long plans keep a readable minimum width and scroll instead of shrinking. */
}

.asg-plan {
	min-width: var(--asg-min, 0);
	display: block;
	width: 100%;
	height: auto;
	margin: 0 auto;
	background: #fff;
	border-radius: 10px;
	overflow: visible;
}

.asg-plan-caption {
	margin-top: 10px;
	font-size: 0.8rem;
	color: var(--asg-muted);
	text-align: center;
}

.asg-grid-line {
	fill: none;
	stroke: var(--asg-grid);
	stroke-width: 0.04;
}

.asg-wall {
	fill: none;
	stroke: var(--asg-wall);
	stroke-width: 0.22;
}

.asg-door {
	fill: none;
	stroke: var(--asg-primary);
	stroke-width: 0.4;
	stroke-dasharray: 0.6 0.35;
}

.asg-dim-line {
	fill: none;
	stroke: #b9c3cf;
	stroke-width: 0.05;
}

.asg-dim-text {
	fill: var(--asg-muted);
	font-weight: 600;
	paint-order: stroke;
	stroke: #fff;
	stroke-width: 0.35;
}

.asg-door-text {
	fill: var(--asg-primary);
	font-weight: 700;
	letter-spacing: 0.12em;
}

.asg-person-fill {
	fill: #9aa6b4; /* Plain class: selectors do not cross into the <use> shadow tree. */
}

.asg-person text {
	fill: var(--asg-muted);
	font-weight: 600;
}

/* Furniture lives in <symbol>s: plain class selectors only, ancestors do not match inside a <use> shadow tree. */
.asg-f {
	stroke: rgba(31, 42, 55, 0.55);
	stroke-width: 0.07;
}

.asg-t1 { fill: var(--asg-tone1); }
.asg-t2 { fill: var(--asg-tone2); }
.asg-t3 { fill: var(--asg-tone3); }
.asg-t4 { fill: var(--asg-tone4); }
.asg-t5 { fill: var(--asg-tone5); }
.asg-t6 { fill: var(--asg-tone6); }

.asg-s {
	fill: rgba(255, 255, 255, 0.6);
	stroke: rgba(31, 42, 55, 0.4);
	stroke-width: 0.05;
}

.asg-d {
	fill: none;
	stroke: rgba(31, 42, 55, 0.45);
	stroke-width: 0.05;
	stroke-linecap: round;
}

.asg-item {
	transform-box: fill-box;
	transform-origin: center;
	animation: asg-pop 0.45s cubic-bezier(0.2, 0.8, 0.3, 1.15) both;
	animation-delay: calc(var(--i, 0) * 45ms);
}

@keyframes asg-pop {
	from {
		opacity: 0;
		transform: scale(0.6);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.asg-detail-title {
	font-size: 1.7rem;
	line-height: 1.2;
	margin-bottom: 4px !important;
}

.asg-detail-title small {
	display: block;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--asg-primary);
	margin-top: 2px;
}

.asg-short {
	font-weight: 600;
	margin-bottom: 10px !important;
}

.asg-desc {
	color: var(--asg-muted);
	line-height: 1.6;
	margin-bottom: 14px !important;
}

.asg-sub {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--asg-muted);
	margin: 14px 0 6px !important;
}

.asg-fits-note {
	font-size: 0.75rem;
	font-style: italic;
	line-height: 1.4;
	color: var(--asg-muted);
	margin: 0 0 8px !important;
}

.asg-fits li {
	position: relative;
	padding-left: 22px;
	margin-bottom: 5px;
	line-height: 1.45;
}

.asg-fits li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 0.35em;
	width: 6px;
	height: 11px;
	border: solid var(--asg-accent);
	border-width: 0 2px 2px 0;
	transform: rotate(40deg);
}

.asg-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.asg-legend li {
	font-size: 0.8rem;
	background: var(--asg-soft);
	border-radius: 999px;
	padding: 3px 10px;
}

.asg-more {
	display: inline-block;
	margin-top: 14px;
	font-weight: 700;
	color: var(--asg-accent);
}

/* ---- Availability ------------------------------------------------------- */

.asg-avail {
	margin-top: 34px;
	border: 1px solid var(--asg-line);
	border-radius: var(--asg-radius);
	padding: 18px 20px 14px;
}

.asg-avail-title {
	font-size: 1.25rem;
	margin-bottom: 8px !important;
}

.asg-avail-title span {
	color: var(--asg-primary);
}

.asg-loc {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto;
	align-items: center;
	gap: 8px 16px;
	padding: 12px 0;
	border-top: 1px solid var(--asg-line);
}

.asg-loc:first-child {
	border-top: 0;
}

.asg-loc-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.asg-loc-name {
	font-weight: 700;
	color: var(--asg-ink);
}

.asg-loc-phone {
	font-size: 0.85rem;
	color: var(--asg-muted);
}

.asg-loc-status {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 8px;
}

.asg-status {
	display: inline-block;
	font-size: 0.8rem;
	font-weight: 700;
	border-radius: 999px;
	padding: 4px 11px;
	background: #eef1f5;
	color: var(--asg-muted);
}

.asg-status.is-available {
	background: #def5e5;
	color: #16703a;
}

.asg-status.is-limited {
	background: #fff0d6;
	color: #9a5a00;
}

/* One chip per unit type: its name, then the lowest monthly price for that type. */
.asg-type {
	display: inline-flex;
	align-items: baseline;
	gap: 5px;
	font-size: 0.82rem;
	border: 1px solid var(--asg-line);
	border-radius: 8px;
	padding: 3px 9px;
	color: var(--asg-muted);
}

.asg-type-climate {
	border-color: var(--asg-accent);
	color: var(--asg-accent);
}

.asg-price {
	font-weight: 700;
	color: var(--asg-ink);
}

.asg-btn {
	display: inline-block;
	background: var(--asg-primary);
	color: #fff;
	font-weight: 700;
	font-size: 0.9rem;
	text-decoration: none;
	text-align: center;
	border-radius: 999px;
	padding: 9px 18px;
	transition: filter 0.15s, transform 0.15s;
}

.asg-btn:hover {
	filter: brightness(1.08);
	color: #fff;
	transform: translateY(-1px);
}

.asg-empty,
.asg-note {
	font-size: 0.85rem;
	color: var(--asg-muted);
	margin-top: 10px !important;
}

/* ---- Compare ------------------------------------------------------------ */

.asg-compare {
	margin-top: 34px;
	background: var(--asg-soft);
	border-radius: var(--asg-radius);
	padding: 18px 20px;
}

.asg-compare-title {
	font-size: 1.25rem;
	margin-bottom: 10px !important;
}

.asg-cmp-controls {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 12px;
}

.asg-select {
	font: inherit;
	padding: 8px 12px;
	border: 1px solid var(--asg-line);
	border-radius: 8px;
	background: #fff;
	color: var(--asg-ink);
}

.asg-cmp-svg {
	display: block;
	width: 100%;
	max-width: 720px;
	height: auto;
	background: #fff;
	border-radius: 10px;
}

.asg-cmp-rect {
	transition: width 0.3s ease, height 0.3s ease;
}

.asg-cmp-a {
	fill: color-mix(in srgb, var(--asg-primary) 22%, #fff);
	stroke: var(--asg-primary);
	stroke-width: 0.15;
}

.asg-cmp-b {
	fill: none;
	stroke: var(--asg-accent);
	stroke-width: 0.15;
	stroke-dasharray: 0.5 0.3;
}

.asg-cmp-text {
	font-weight: 700;
}

.asg-cmp-text-a {
	fill: var(--asg-primary);
}

.asg-cmp-text-b {
	fill: var(--asg-accent);
}

.asg-cmp-note {
	margin-top: 10px !important;
	font-weight: 600;
}

/* ---- Call to action ----------------------------------------------------- */

.asg-cta {
	margin-top: 30px !important;
	text-align: center;
	font-size: 1.1rem;
}

.asg-cta-phone {
	display: block;
	margin-top: 6px;
	font-weight: 800;
	font-size: 2rem;
	line-height: 1.2;
	color: var(--asg-primary);
}

/* ---- Small screens ------------------------------------------------------ */

@media (max-width: 960px) {
	.asg-panel-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 18px;
	}

	.asg-plan-wrap {
		padding: 10px;
	}

	.asg-loc {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.asg-loc-status {
		grid-column: 1 / -1;
		grid-row: 2;
	}

	.asg-avail,
	.asg-compare {
		padding: 14px;
	}
}

/* Phones: dropdown instead of a scrolling tab strip, plans fit the screen, roomier sections. */
@media (max-width: 600px) {
	.asg.has-select .asg-tabs {
		display: none;
	}

	.asg.has-select .asg-tabselect {
		display: block;
	}

	.asg-plan {
		min-width: 0;
	}

	.asg-helper {
		margin-bottom: 44px;
	}

	.asg .asg-viewtoggle { /* Extra specificity: the base rule further down would otherwise win. */
		margin-top: 28px;
	}

	.asg-panel {
		margin-top: 24px;
	}

	.asg-avail,
	.asg-compare {
		margin-top: 56px;
	}

	.asg-cta {
		margin-top: 48px !important;
	}

	/* One column per location: name and phone, then availability, then a full-width button. */
	.asg-loc {
		grid-template-columns: minmax(0, 1fr);
		padding: 16px 0;
	}

	.asg-loc-status {
		grid-column: auto;
		grid-row: auto;
	}

	.asg-loc .asg-btn {
		justify-self: stretch;
		text-align: center;
	}

	/* Each unit type is a full-width, easy-to-tap row: name left, price and "Rent" right. */
	.asg-type {
		display: flex;
		align-items: center;
		width: 100%;
		gap: 4px 8px;
		padding: 9px 10px;
		font-size: 0.85rem;
	}

	.asg-type-name {
		flex: 1 1 auto;
	}

	.asg-type .asg-price {
		white-space: nowrap;
	}
}

@media (prefers-reduced-motion: reduce) {
	.asg-item {
		animation: none;
	}

	.asg-cmp-rect,
	.asg-btn {
		transition: none;
	}
}

/* ---- Theme resets ------------------------------------------------------- */
/* Divi styles lists with ID-level selectors; keep the guide's lists plain. */

.asg ul.asg-fits,
.asg ul.asg-legend,
.asg ul.asg-locs {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.asg ul.asg-fits li,
.asg ul.asg-legend li,
.asg ul.asg-locs li {
	list-style: none !important;
}

.asg ul.asg-legend li::before,
.asg ul.asg-legend li::after,
.asg ul.asg-locs li::before,
.asg ul.asg-locs li::after {
	content: none !important;
}

/* ---- Side view ---------------------------------------------------------- */

.asg-viewtoggle {
	display: inline-flex;
	margin: 6px 0 4px;
	border: 2px solid var(--asg-primary);
	border-radius: 999px;
	overflow: hidden;
	background: #fff;
}

.asg-viewbtn {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--asg-ink);
	font: inherit;
	font-size: 0.85rem;
	font-weight: 700;
	padding: 7px 18px;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}

.asg-viewbtn:hover {
	color: var(--asg-primary);
}

.asg-viewbtn[aria-pressed="true"] {
	background: var(--asg-primary);
	color: #fff;
}

.asg-viewbtn:focus-visible {
	outline: 3px solid var(--asg-accent);
	outline-offset: -3px;
}

.asg[data-view="top"] .asg-view-side,
.asg[data-view="side"] .asg-view-top {
	display: none;
}

.asg-ground {
	fill: none;
	stroke: var(--asg-wall);
	stroke-width: 0.3;
}

/* Wheels, and furniture standing up from the floor (pop from the bottom edge). */
.asg-w {
	fill: #4a5563;
	stroke: none;
}

.asg-item-up {
	transform-origin: 50% 100%;
}

.asg-person-head {
	fill: #7d8a99;
}

/* Side view is a projection: pieces at different widths overlap in it, so keep them slightly see-through. */
.asg-plan-sideview .asg-f {
	fill-opacity: 0.84;
}

.asg-plan-sideview .asg-t3 {
	fill: #c9d5e3; /* Mattresses are white-ish from above but need contrast against the grid from the side. */
}

/* ---- 3D view ------------------------------------------------------------ */

.asg[data-view="3d"] .asg-view-top,
.asg[data-view="3d"] .asg-view-side,
.asg:not([data-view="3d"]) .asg-view-3d {
	display: none;
}

.asg-scene {
	display: block;
	width: 100%;
	height: auto;
	margin: 0 auto;
	background: #fff;
	border-radius: 10px;
	cursor: grab;
	touch-action: pan-y pinch-zoom; /* Horizontal drags rotate; vertical swipes still scroll the page. */
	user-select: none;
	-webkit-user-select: none;
}

.asg-scene.is-drag {
	cursor: grabbing;
}

.asg-scene:focus-visible {
	outline: 3px solid var(--asg-accent);
	outline-offset: 2px;
}

.asg-3d-apron {
	fill: #eef2f6;
}

.asg-3d-floor {
	fill: #fbfcfd;
	stroke: var(--asg-wall);
	stroke-width: 0.12;
	stroke-linejoin: round;
}

.asg-3d-grid {
	fill: none;
	stroke: var(--asg-grid);
	stroke-width: 0.04;
}

.asg-3d-wall {
	fill: #f1f4f8;
	stroke: var(--asg-wall);
	stroke-width: 0.12;
	stroke-linejoin: round;
}

.asg-3d-door {
	fill: color-mix(in srgb, var(--asg-primary) 10%, transparent);
	stroke: var(--asg-primary);
	stroke-width: 0.14;
	stroke-dasharray: 0.5 0.3;
	stroke-linejoin: round;
}

.asg-3d-part polygon {
	stroke: rgba(31, 42, 55, 0.5);
	stroke-width: 0.04;
	stroke-linejoin: round;
}

/* Each piece sets --c; faces are that colour shaded by which way they face (light is fixed in the room). */
.asg-3d-c1 { --c: var(--asg-tone1); }
.asg-3d-c2 { --c: var(--asg-tone2); }
.asg-3d-c3 { --c: #c9d5e3; }
.asg-3d-c4 { --c: var(--asg-tone4); }
.asg-3d-c5 { --c: var(--asg-tone5); }
.asg-3d-c6 { --c: var(--asg-tone6); }
.asg-3d-c7 { --c: #4a5563; }
.asg-3d-c8 { --c: #9aa6b4; }

.asg-3d-top { fill: var(--c); }
.asg-3d-yp { fill: color-mix(in srgb, var(--c) 90%, #1f2a37); }
.asg-3d-xp { fill: color-mix(in srgb, var(--c) 80%, #1f2a37); }
.asg-3d-yn { fill: color-mix(in srgb, var(--c) 74%, #1f2a37); }
.asg-3d-xn { fill: color-mix(in srgb, var(--c) 66%, #1f2a37); }

.asg-scene-tools {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 10px;
}

.asg-toolbtn {
	appearance: none;
	background: #fff;
	color: var(--asg-ink);
	border: 1px solid var(--asg-line);
	border-radius: 999px;
	padding: 6px 14px;
	font: inherit;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	transition: border-color 0.15s, color 0.15s;
}

.asg-toolbtn:hover,
.asg-toolbtn:focus-visible {
	border-color: var(--asg-accent);
	color: var(--asg-accent);
	outline: none;
}

/* Hidden lines of the cut-away walls: faint and dashed, so the unit still reads as a complete box. */
.asg-3d-ghost {
	fill: none;
	stroke: var(--asg-wall);
	stroke-width: 0.07;
	stroke-dasharray: 0.35 0.25;
	stroke-linecap: round;
	stroke-opacity: 0.55;
	pointer-events: none;
}

/* Unit-type chips are links straight into the rental flow for that unit. */
a.asg-type {
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}

a.asg-type:hover,
a.asg-type:focus-visible {
	background: var(--asg-soft);
	outline: none;
}

.asg-type-go {
	font-weight: 700;
	color: var(--asg-primary);
	white-space: nowrap;
}
