/**
 * Edit Profile page styles.
 * Extracted from the inline <style> block in woocommerce/myaccount/edit-profile.php.
 * Loaded only on the edit-profile endpoint via wp_enqueue_style in inc/theme-setup.php.
 *
 * @package NexaLand
 */

/* ── Typography resets ───────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
	margin: 0;
}

h1 {
	font-size: 1.875rem !important;
	line-height: 2.813rem !important;
	margin-bottom: 3rem;
}

form > div {
	margin-bottom: 0.25rem;
}

/* ── Profile field container ─────────────────────────────────────────────── */
.profile-field {
	display: flex;
	flex-direction: column;
	text-align: right;
	direction: rtl;
	border-bottom: 1px solid #ccc;
	padding: 1rem 0;
}

.profile-field label {
	font-size: 1rem;
	font-weight: 400;
	margin-bottom: 0.25rem;
}

/* ── Disabled email field ────────────────────────────────────────────────── */
.profile-field.disabled-email {
	border-bottom: none;
}

.profile-field.disabled-email .user-email {
	border-radius: 0.5rem;
	border: 1.5px solid var(--Gray-60, #808080) !important;
	background: var(--Gray-95, #E5E5E5);
	color: #808080;
	width: 100%;
	cursor: default;
	padding: 0.75rem;
}

.disabled-email label {
	color: #808080;
	font-size: 1rem;
}

.disabled-email p {
	color: #808080;
	font-size: 0.875rem;
	line-height: 1.25rem;
	margin-bottom: 0.5rem !important;
}

/* ── View / edit mode ────────────────────────────────────────────────────── */
.view-mode {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	padding: 6px 0;
	font-size: 16px;
	color: #333;
}

.view-mode span:first-child {
	flex: 1;
	text-align: right;
	font-size: 1rem;
	color: #4C4C4C;
}

.edit-mode {
	display: none;
}

/* ── Edit icon ───────────────────────────────────────────────────────────── */
.edit-icon {
	margin-right: 12px;
	display: flex;
	align-items: center;
	cursor: pointer;
}

.label-with-icon {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.label-with-icon .edit-icon {
	margin-right: 0;
}

/* ── Name fields ─────────────────────────────────────────────────────────── */
.name-fields {
	display: flex;
	gap: 1rem;
	justify-content: space-between;
}

.name-fields div {
	width: 50%;
}

.name-fields input {
	flex: 1;
}

/* ── Inputs inside edit form ─────────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="password"] {
	padding: 8px;
	font-size: 14px;
	width: 100%;
	box-sizing: border-box;
	border-radius: 5px;
	border: 1px solid #ccc;
}

.edit-field-form input:focus {
	border: 1.5px solid #6A00F4 !important;
	outline: none !important;
}

.edit-field-form label {
	margin-bottom: 6px;
}

/* ── Save / cancel buttons ───────────────────────────────────────────────── */
button {
	background: #000;
	color: #fff;
	border: none;
	font-size: 14px;
	border-radius: 6px;
	cursor: pointer;
	margin: 5px;
	padding: 6px 12px;
}

button:hover {
	background: #333;
}

.field-buttons {
	display: flex;
	justify-content: flex-start;
	flex-direction: row-reverse;
	gap: 0.75rem;
	margin-top: 0.75rem;
}

.field-buttons-double-line {
	margin-top: 2.25rem;
}

.save-btn,
.cancel-btn {
	padding: 0.75rem 1.5rem !important;
	font-size: 1rem !important;
	font-weight: 400 !important;
	line-height: 1.5rem !important;
	border: none;
	border-radius: 0.625rem !important;
	cursor: pointer;
	margin: 0;
}

.save-btn,
.save-btn:hover {
	background-color: black !important;
	color: white !important;
}

.cancel-btn {
	background-color: white !important;
	color: black !important;
	border: 1px solid black;
}

p.description {
	font-size: 0.875rem;
	line-height: 1.25rem;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
	h1 {
		font-size: 1.5rem !important;
		line-height: 2rem !important;
		margin-bottom: 2.25rem;
	}

	.disabled-email label {
		font-size: 0.875rem;
		line-height: 1.25rem !important;
	}

	.disabled-email p {
		font-size: 0.75rem;
		line-height: 1.125rem;
	}

	.profile-field.disabled-email .user-email {
		font-size: 0.875rem;
		line-height: 1.3125rem;
		padding: 0.625rem 0.5rem;
	}

	.profile-field {
		padding: 0.75rem 0 0.5rem 0;
	}

	.profile-field label {
		font-size: 0.875rem;
		line-height: 1.25rem !important;
	}

	.field-buttons {
		gap: 1rem;
	}

	.name-fields {
		flex-direction: column !important;
		gap: 1.25rem;
	}

	.name-fields div {
		width: 100% !important;
	}

	p.description {
		font-size: 0.75rem;
		line-height: 1.125rem;
	}

	.field-buttons-double-line,
	.field-buttons-double-line-name {
		margin-top: 1.75rem;
	}

	.view-mode span:first-child {
		font-size: 0.875rem;
	}
}
