/* Profile area — Figma 5.0-profile (4491:6063).
   Sidebar 356px (#f3f1ef, padding 48, gap 36) + content column starting at
   x=404 (48px gap), 948px wide at 1400, 48px from the header. */

.profile {
	display: grid;
	grid-template-columns: 356px minmax(0, 1fr);
	column-gap: 48px;
	align-items: start;
}

/* -- sidebar -- */

.profile-sidebar {
	position: relative;
	align-self: stretch;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 36px;
	padding: 48px;
	background: #f3f1ef;
}

/* bleed the sidebar colour to the viewport's left edge beyond the 1400px
   container, without moving the sidebar itself */
.profile-sidebar::before {
	content: "";
	position: absolute;
	top: 0;
	right: 100%;
	bottom: 0;
	width: 100vw;
	background: inherit;
}

.profile-sidebar__nav {
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: 260px;
}

.profile-sidebar__group {
	margin: 0;
	padding: 0;
	list-style: none;
}

.profile-sidebar__link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	border-radius: 8px;
	font-size: 16px;
	line-height: 22px;
	letter-spacing: 0.32px;
	color: var(--rds-dark-grey);
}

.profile-sidebar__link:hover {
	color: #777777;
}

.profile-sidebar__link.is-active {
	background: rgba(0, 0, 0, 0.04);
	color: var(--rds-black);
}

.profile-sidebar__link .rds-icon {
	flex-shrink: 0;
}

/* -- user block (sidebar 80px / Dashboard 120px avatar) -- */

.profile-user {
	display: flex;
	align-items: center;
	gap: 24px;
}

.profile-user--large {
	gap: 36px;
}

.profile-user__avatar {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 80px;
	height: 80px;
	border-radius: 50%;
	object-fit: cover;
}

.profile-user--large .profile-user__avatar {
	width: 120px;
	height: 120px;
}

.profile-user__avatar--empty {
	border: 2px solid var(--rds-mid-grey);
	background: var(--rds-light-grey);
}

.profile-user__text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	min-width: 0;
}

.profile-user__location {
	margin: 0;
	font-size: 14px;
	line-height: 20px;
	text-transform: uppercase;
}

.profile-user__name-block {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.profile-user__name {
	margin: 0;
	font-family: var(--font-display);
	font-size: 24px;
	font-weight: 500;
	line-height: 30.72px;
	overflow-wrap: anywhere;
}

.profile-user__profession {
	margin: 0;
	font-size: 14px;
	line-height: 20px;
}

/* -- content column -- */

.profile__content {
	display: flex;
	flex-direction: column;
	gap: 36px;
	min-width: 0;
	padding: 48px 48px 78px 0;
}

.profile-intro {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.profile-intro__bio {
	padding-left: 156px; /* under the name: 120px avatar + 36px gap */
	font-size: 16px;
	line-height: 22px;
	letter-spacing: 0.32px;
}

.profile-intro__bio p {
	margin: 0 0 12px;
}

.profile-intro__bio p:last-child {
	margin-bottom: 0;
}

.profile-intro__bio--empty {
	margin: 0;
	color: var(--rds-beige);
}

.profile__divider {
	width: 100%;
	height: 0;
	margin: 0;
	border: 0;
	border-top: 1px solid rgba(153, 133, 121, 0.3);
}

.profile-section {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.profile-section__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 55px;
}

.profile-section__title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	font-family: var(--font-display);
	font-size: 24px;
	font-weight: 500;
	line-height: 30.72px;
}

.profile-section__intro,
.profile-section__text {
	max-width: 640px;
	margin: -12px 0 0;
	font-size: 16px;
	line-height: 22px;
	letter-spacing: 0.32px;
}

.profile-text-link {
	color: var(--rds-beige);
}

.profile-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-grid + .list-pagination,
.profile-list + .list-pagination {
	padding: 12px 0 0;
}

.profile-section__actions {
	display: flex;
	align-items: center;
	gap: 24px;
}

/* list view of a collection: the homepage row (2 × 529px) scaled down to
   the profile content column */
.profile-list {
	padding: 0;
}

.profile-list .latest-item__media {
	flex: 0 0 48%;
	width: auto;
}

.profile-list .latest-item__content {
	flex: 1;
	width: auto;
	min-height: 0;
}

.profile-list .latest-item__title h3 {
	font-size: 24px;
	line-height: 28px;
}

/* "Remove from collection" icon in place of the bookmark: right side of
   the card's date row; under the category in a list row */
.project-card__remove {
	flex-shrink: 0;
	margin-left: auto;
}

/* Saved projects cards: "Add to collection" + bookmark */
.project-card__actions {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: 12px;
	margin-left: auto;
}

/* collection icon buttons (remove / add, inc/profile.php + inc/collections.php) */
.collection-icon-button {
	appearance: none;
	padding: 0;
	border: 0;
	background: none;
	line-height: 0;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.collection-icon-button:hover,
.collection-icon-button:focus-visible {
	opacity: 0.5;
}

@media (max-width: 900px) {
	/* home.css stacks the row here */
	.profile-list .latest-item__media,
	.profile-list .latest-item__content {
		flex: none;
		width: 100%;
	}
}

.profile-badge {
	padding: 2px 10px;
	border: 1px solid var(--rds-beige);
	border-radius: 999px;
	font-family: var(--font-body);
	font-size: 12px;
	line-height: 18px;
	color: var(--rds-beige);
}

.profile-back {
	align-self: flex-start;
	font-size: 14px;
	line-height: 20px;
	color: var(--rds-beige);
}

.profile-empty {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 18px;
	max-width: 640px;
	padding: 36px;
	border-radius: 8px;
	background: #f3f1ef;
	font-size: 16px;
	line-height: 22px;
}

.profile-empty p {
	margin: 0;
}

.collection-card__media {
	display: flex;
	align-items: center;
	justify-content: center;
}

.profile-inline-form {
	margin: 0;
}

.profile-link-button {
	padding: 0;
	border: 0;
	background: none;
	font-family: var(--font-body);
	font-size: 14px;
	line-height: 20px;
	color: var(--rds-beige);
	cursor: pointer;
}

.profile-link-button:hover {
	color: var(--rds-black);
}

/* -- notices -- */

.profile-notice {
	max-width: 640px;
	padding: 14px 18px;
	border-left: 3px solid var(--rds-black);
	background: #f3f1ef;
	font-size: 14px;
	line-height: 20px;
}

.profile-notice--error {
	border-left-color: #c0392b;
	color: #c0392b;
}

/* -- settings forms (no design: follows the site's inputs + buttons) -- */

.profile-membership {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 36px;
	max-width: 640px;
	padding: 24px;
	border-radius: 8px;
	background: #f3f1ef;
	font-size: 14px;
	line-height: 20px;
}

.profile-membership p {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
}

.profile-membership span {
	color: var(--rds-dark-grey);
}

.profile-form {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 24px;
	max-width: 640px;
	margin: 0;
}

.profile-form__group {
	display: flex;
	flex-direction: column;
	gap: 18px;
	margin: 0;
	padding: 0;
	border: 0;
}

.profile-form__legend {
	margin-bottom: 18px;
	padding: 0;
	font-family: var(--font-display);
	font-size: 20px;
	font-weight: 500;
	line-height: 25.6px;
}

.profile-form__row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 18px 24px;
}

.profile-form__row--wrap {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-field {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 6px;
	min-width: 0;
}

.profile-field[hidden] {
	display: none;
}

.profile-field__label {
	font-size: 14px;
	line-height: 20px;
}

.profile-field__control {
	width: 100%;
	height: 50px;
	padding: 0 18px;
	border: 1px solid var(--rds-dark-grey);
	border-radius: 8px;
	background: var(--rds-white);
	font-family: var(--font-body);
	font-size: 14px;
	color: var(--rds-black);
}

textarea.profile-field__control {
	height: auto;
	padding: 14px 18px;
	line-height: 20px;
	resize: vertical;
}

select.profile-field__control {
	appearance: none;
	padding-right: 48px;
	background: var(--rds-white) url("../img/icon-chevron-down.svg") no-repeat right 18px center;
}

.profile-field__control--file {
	height: auto;
	padding: 12px 18px;
}

.profile-field__control:focus {
	outline: 2px solid var(--rds-black);
	outline-offset: 1px;
}

.has-error .profile-field__control {
	border-color: #c0392b;
}

.profile-field__help,
.profile-field__error {
	margin: 0;
	font-size: 12px;
	line-height: 16px;
	color: var(--rds-dark-grey);
}

.profile-field__error {
	color: #c0392b;
}

.profile-check {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	line-height: 20px;
	cursor: pointer;
}

.profile-check input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--rds-black);
}

.profile-radios {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
}

.profile-avatar-field {
	display: flex;
	align-items: center;
	gap: 24px;
}

.profile-avatar-field__preview {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 120px;
	height: 120px;
	overflow: hidden;
	border: 2px solid var(--rds-mid-grey);
	border-radius: 50%;
	background: var(--rds-light-grey);
}

.profile-avatar-field__preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.profile-avatar-field > div:last-child {
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1;
	min-width: 0;
}

.profile-form__actions {
	display: flex;
	align-items: center;
	gap: 18px;
}

.profile-form__actions .button {
	height: 50px;
	padding: 0 24px;
	font-family: var(--font-body);
	font-weight: 900;
	text-transform: uppercase;
}

.profile-requests {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
}

.profile-request {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 24px;
	border: 1px solid var(--rds-mid-grey);
	border-radius: 8px;
	font-size: 14px;
	line-height: 20px;
}

.profile-request p {
	margin: 0;
}

.profile-request__title {
	margin: 0;
	font-family: var(--font-display);
	font-size: 20px;
	font-weight: 500;
	line-height: 25.6px;
}

.profile-request .profile-form {
	margin-top: auto;
}

/* -- responsive (no mobile design yet) -- */

@media (max-width: 1100px) {
	.profile {
		grid-template-columns: 280px minmax(0, 1fr);
		column-gap: 32px;
	}

	.profile-sidebar {
		padding: 32px 24px;
	}

	.profile-sidebar__nav {
		width: 100%;
	}

	.profile__content {
		padding-right: 24px;
	}

	.profile-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 800px) {
	.profile {
		grid-template-columns: 1fr;
	}

	.profile-sidebar {
		gap: 24px;
		padding: 24px 16px;
	}

	.profile-sidebar::before {
		display: none;
	}

	.profile-sidebar__nav {
		gap: 12px;
	}

	.profile__content {
		padding: 32px 16px 48px;
	}

	.profile-intro__bio {
		padding-left: 0;
	}

	.profile-user--large {
		gap: 24px;
	}

	.profile-user--large .profile-user__avatar {
		width: 88px;
		height: 88px;
	}

	.profile-requests,
	.profile-form__row--wrap {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 560px) {
	.profile-grid {
		grid-template-columns: 1fr;
	}

	.profile-avatar-field {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* -- plan switch (registration form + premium checkout) -- */

.signup-plan-switch {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	border: 0;
}

.signup-plan-switch__option {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 24px;
	border: 1px solid var(--rds-mid-grey);
	border-radius: 8px;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.signup-plan-switch__option input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.signup-plan-switch__option:hover {
	border-color: var(--rds-dark-grey);
}

.signup-plan-switch__option:has(input:checked) {
	border-color: var(--rds-black);
	background: var(--rds-light-grey);
	box-shadow: inset 0 0 0 1px var(--rds-black);
}

.signup-plan-switch__option:has(input:focus-visible) {
	outline: 2px solid var(--rds-black);
	outline-offset: 2px;
}

.signup-plan-switch__label {
	font-family: var(--font-display);
	font-size: 20px;
	font-weight: 500;
	line-height: 25.6px;
}

.signup-plan-switch__price {
	font-size: 14px;
	line-height: 20px;
	color: var(--rds-dark-grey);
}

@media (max-width: 700px) {
	.signup-plan-switch {
		grid-template-columns: 1fr;
	}
}

/* -- premium checkout (template-parts/profile/billing.php) -- */

.profile-checkout .profile-form {
	gap: 18px;
}

.profile-checkout__plans {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	max-width: 640px;
}

.profile-checkout__methods {
	max-width: 320px;
	height: auto;
}

/* -- subscribe flow + subscription page -- */

.subscribe-plan__benefits {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 16px;
	line-height: 22px;
	letter-spacing: 0.32px;
}

.subscribe-plan__benefits li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.subscribe-plan__benefits .rds-icon {
	flex-shrink: 0;
	margin-top: -1px;
}

.subscribe-summary {
	align-items: flex-end;
}

.subscribe-success {
	max-width: 640px;
}

.profile-table {
	width: 100%;
	max-width: 760px;
	border-collapse: collapse;
	font-size: 14px;
	line-height: 20px;
}

.profile-table th,
.profile-table td {
	padding: 10px 12px 10px 0;
	border-bottom: 1px solid var(--rds-mid-grey);
	text-align: left;
	vertical-align: top;
}

.profile-table th {
	font-weight: 400;
	color: var(--rds-dark-grey);
}

@media (max-width: 700px) {
	.profile-table th:nth-child(2),
	.profile-table td:nth-child(2) {
		display: none;
	}
}

/* -- Submitted projects: status badge on stories still in review -- */

.profile-status-wrap {
	position: relative;
}

.profile-badge--status {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 1;
	border-color: var(--rds-black);
	background: var(--rds-white);
	color: var(--rds-black);
}

/* -- phone (no profile mobile design): the sidebar shrinks to the user
      block + one sideways-scrolling row of section links (fade cue from
      scroll-rows.js, the active one scrolled into view); "Submit a
      project" stays reachable from the burger menu. 24px gutter. -- */

@media (max-width: 600px) {
	/* minmax(0, …): a plain 1fr track can't shrink below its content, and
	   the one-line link row below is far wider than the screen */
	.profile {
		grid-template-columns: minmax(0, 1fr);
	}

	.profile-sidebar {
		min-width: 0;
		gap: 18px;
		padding: 24px 0 12px 24px;
	}

	.profile-sidebar .profile-user {
		padding-right: 24px;
	}

	.profile-sidebar__nav {
		flex-direction: row;
		gap: 4px;
		width: 100%;
		padding-right: 24px;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.profile-sidebar__nav::-webkit-scrollbar {
		display: none;
	}

	.profile-sidebar__group {
		display: flex;
		gap: 4px;
	}

	.profile-sidebar__link {
		gap: 8px;
		padding: 8px 12px;
		white-space: nowrap;
	}

	.profile-sidebar__submit {
		display: none;
	}

	.profile__content {
		gap: 24px;
		padding: 24px 24px 72px;
	}

	/* Dashboard: the sidebar right above already shows the avatar and name */
	.profile-intro,
	.profile-intro + .profile__divider {
		display: none;
	}

	/* cards as on the list pages (372×420 portrait, 24px title, 36 apart) */
	.profile-grid {
		gap: 36px;
	}

	.profile-grid .project-card__media {
		aspect-ratio: 372 / 420;
	}

	.profile-grid .project-card__title {
		font-size: 24px;
		line-height: 30.72px;
	}
}
