/* Path: Frontend/src/components/dashboard/settings/dashboard-settings-focus.module.scss */

.section {
	display: grid;
	gap: 1rem;

	@include respond(desktop-sm) {
		gap: 1.25rem;
	}
}

.heroCard {
	display: grid;
	gap: 1rem;
	padding: 1.15rem;
	border-radius: var(--radius-3xl);
	background: linear-gradient(135deg, var(--surface-panel), var(--surface-panel-strong));
	border: 1px solid var(--border-strong);
	box-shadow: var(--shadow-soft);

	@include respond(wide) {
		grid-template-columns: minmax(0, 1.2fr) minmax(14rem, 0.8fr);
		align-items: start;
		padding: 1.35rem;
	}
}

.heroCopy {
	display: grid;
	gap: 0.55rem;

	h1 {
		font-size: clamp(1.8rem, 1.45rem + 1.1vw, 2.8rem);
		line-height: 1;
		letter-spacing: -0.04em;
	}

	p:last-child {
		color: var(--text-muted);
		font-size: 0.96rem;
		max-width: 58ch;
	}
}

.eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.75rem;
	color: var(--text-muted);
}

.profileChip {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 1rem;
	border-radius: var(--radius-lg);
	background: var(--surface-soft);
	border: 1px solid var(--border-soft);

	strong {
		display: block;
		font-size: 1rem;
		overflow-wrap: anywhere;
	}

	span:last-child {
		color: var(--text-muted);
		font-size: 0.88rem;
		overflow-wrap: anywhere;
	}

	> div {
		min-width: 0;
	}
}

.avatar {
	display: inline-grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	overflow: hidden;
	border-radius: var(--radius-full);
	background: linear-gradient(135deg, var(--action-primary-start), var(--action-primary-end));
	color: var(--action-primary-text);
	font-weight: 600;
	flex-shrink: 0;
}

.avatarImage {
	object-fit: cover;
	display: block;
}

.statGrid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;

	@media (min-width: 520px) {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	@include respond(wide) {
		grid-column: 1 / -1;
	}
}

.statCard {
	display: grid;
	gap: 0.2rem;
	padding: 0.95rem;
	border-radius: var(--radius-lg);
	background: var(--surface-soft);
	border: 1px solid var(--border-soft);

	strong {
		font-size: 1.1rem;
		line-height: 1.1;
		overflow-wrap: anywhere;
	}

	span {
		font-size: 0.84rem;
		color: var(--text-muted);
	}
}

.panelGrid {
	display: grid;
	gap: 1rem;

	@media (min-width: 1040px) {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1.25rem;
	}
}

.panelCard {
	display: grid;
	gap: 1rem;
	padding: 1.15rem;
	border-radius: var(--radius-2xl);
	background: var(--surface-panel);
	border: 1px solid var(--border-soft);
	box-shadow: var(--shadow-soft);
}

.panelBody {
	display: grid;
	gap: 1rem;
}

.panelCopy {
	display: grid;
	gap: 0.35rem;

	h2 {
		font-size: 1.2rem;
		line-height: 1.1;
		letter-spacing: -0.03em;
	}

	p {
		font-size: 0.92rem;
		color: var(--text-muted);
	}
}

.rowList {
	display: grid;
	gap: 0.65rem;
}

.rowItem {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.8rem 0.9rem;
	border-radius: var(--radius-md);
	background: var(--surface-soft);
	border: 1px solid var(--border-soft);

	span {
		font-size: 0.86rem;
		color: var(--text-muted);
	}

	strong {
		font-size: 0.92rem;
		text-align: right;
		min-width: 0;
		overflow-wrap: anywhere;
	}
}

@media (max-width: 640px) {
	.rowItem {
		align-items: flex-start;
		flex-direction: column;
	}

	.rowItem strong {
		text-align: left;
	}
}

.fieldGrid {
	display: grid;
	gap: 0.85rem;

	@include respond(phablet) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.fieldLabel {
	display: grid;
	gap: 0.45rem;

	span {
		font-size: 0.84rem;
		font-weight: 600;
		color: var(--text-muted);
	}
}

.fieldLabelFull {
	@include respond(phablet) {
		grid-column: 1 / -1;
	}
}

.textInput,
.textArea {
	width: 100%;
	min-width: 0;
	padding: 0.85rem 0.95rem;
	border-radius: var(--radius-md);
	border: 1px solid var(--border-soft);
	background: var(--surface-soft);
	color: var(--text);
	font: inherit;
	transition:
		border-color 0.2s ease,
		background-color 0.2s ease,
		box-shadow 0.2s ease;

	&:focus {
		outline: none;
		border-color: var(--border-strong);
		background: var(--surface-panel-strong);
		box-shadow: var(--focus-ring-primary-soft-shadow);
	}

	&::placeholder {
		color: var(--text-muted);
	}
}

.textArea {
	resize: vertical;
	min-height: 6.5rem;
}

.formActions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

@media (max-width: 640px) {
	.formActions {
		flex-direction: column;
	}

	.formActions > * {
		width: 100%;
	}
}

.feedbackMessage {
	padding: 0.85rem 0.95rem;
	border-radius: var(--radius-md);
	font-size: 0.88rem;
	border: 1px solid var(--border-soft);
}

.feedbackError {
	background: var(--surface-warning-tint);
	color: var(--text);
}

.feedbackSuccess {
	background: var(--surface-success-tint);
	color: var(--text);
}

.primaryAction,
.secondaryAction {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.8rem 1rem;
	border-radius: var(--radius-full);
	font-weight: 500;
	text-decoration: none;
	transition:
		transform 0.2s ease,
		box-shadow 0.2s ease,
		background-color 0.2s ease,
		opacity 0.2s ease;
	border: none;
	cursor: pointer;
	font: inherit;
}

.primaryAction {
	background: linear-gradient(135deg, var(--action-primary-start), var(--action-primary-end));
	color: var(--action-primary-text);
	box-shadow: var(--action-primary-shadow);

	&:hover {
		transform: translateY(-1px);
		box-shadow: var(--action-primary-shadow-hover);
	}

	&:disabled {
		opacity: 0.7;
		cursor: wait;
		transform: none;
		box-shadow: var(--action-primary-shadow);
	}
}

.secondaryAction {
	background: var(--surface-soft);
	color: var(--text);
	border: 1px solid var(--border-soft);

	&:hover {
		transform: translateY(-1px);
		background: var(--surface-panel-strong);
	}
}
