/* --- Profile Editor Premium Styles --- */

.momp-profile-editor {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--momp-text);
	line-height: 1.6;
}

/* Tabs Navigation Polished */
.momp-tabs-nav {
	display: flex;
	gap: 10px;
	margin-bottom: 35px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	padding-bottom: 2px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.momp-tab-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 24px;
	text-decoration: none !important;
	color: var(--momp-text-muted);
	font-weight: 700;
	font-size: 15px;
	border-radius: 12px 12px 0 0;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	white-space: nowrap;
}

.momp-tab-link .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	transition: transform 0.3s ease;
}

.momp-tab-link:hover {
	color: var(--momp-primary);
	background: rgba(var(--momp-primary-rgb), 0.05);
}

.momp-tab-link:hover .dashicons {
	transform: scale(1.1);
}

.momp-tab-link.active {
	color: var(--momp-primary);
	background: #fff;
}

.momp-tab-link.active::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--momp-primary), var(--momp-secondary));
	border-radius: 3px;
	box-shadow: 0 2px 6px rgba(var(--momp-primary-rgb), 0.3);
}

/* Tab Content Transitions */
.momp-tab-content {
	display: none;
	opacity: 0;
	transform: translateY(10px);
	transition: all 0.4s ease;
	padding: 20px 0;
}

.momp-tab-content.active {
	display: block;
	opacity: 1;
	transform: translateY(0);
}

/* Form Layout Refinements */
.momp-form-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 25px 30px;
}

.momp-field-group {
	margin-bottom: 0;
	/* Handled by grid gap */
}

.momp-field-group label {
	display: inline-block;
	margin-bottom: 10px;
	font-weight: 700;
	font-size: 14px;
	color: var(--momp-text);
}

.momp-portrait-group {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.momp-portrait-preview {
	width: 150px;
	height: 200px;
	background: #f1f5f9;
	border-radius: 12px;
	overflow: hidden;
	position: relative;
	border: 3px solid #fff;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	margin: 0 auto 15px;
}

.momp-portrait-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Main Photo Delete Logic */
.momp-main-photo-delete-wrap {
	position: absolute;
	top: 5px;
	right: 5px;
	z-index: 10;
}

.momp-btn-delete-main {
	background: #ef4444;
	color: #fff;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 2px solid #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	padding: 0;
}

.momp-portrait-preview-container {
	margin-bottom: 20px;
	/* Default is left aligned since we removed margin: 0 auto */
}

.momp-placeholder-sq {
	width: 200px;
	height: 250px;
	background-color: #f1f5f9;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	border: 2px dashed #e2e8f0;
	overflow: hidden;
}

.momp-placeholder-sq img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: inherit;
}

.momp-btn-delete-main:hover {
	background: #dc2626;
	transform: scale(1.1);
}

#momp-main-photo-delete-input:checked~.momp-portrait-preview,
.momp-portrait-preview.momp-is-deleting {
	opacity: 0.5;
	filter: grayscale(1);
	position: relative;
}

#momp-main-photo-delete-input:checked~.momp-portrait-preview::after,
.momp-portrait-preview.momp-is-deleting::after {
	content: 'DELETING';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: #ef4444;
	color: #fff;
	padding: 4px 12px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1px;
	z-index: 5;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* DOB Dropdown Layout */
.momp-dob-dropdowns {
	display: flex;
	gap: 10px;
	align-items: center;
}

.momp-dob-dropdowns select {
	flex: 1;
	min-width: 0;
}

/* Save & Next Footer Bar */
.momp-form-buttons {
	display: flex;
	justify-content: center;
	gap: 15px;
	margin-top: 30px;
	padding-top: 25px;
	border-top: 1px solid #eee;
}

.momp-btn {
	border-radius: 10px;
	font-size: 15px;
	padding: 14px 28px;
	transition: all 0.3s ease;
}

.momp-btn:active {
	transform: scale(0.98);
}


@media (max-width: 768px) {

	.momp-form-grid,
	.momp-grid-2 {
		grid-template-columns: 1fr;
	}

	.momp-tab-link {
		padding: 12px 18px;
		font-size: 14px;
	}
}

/* --- Gallery Editor Grid & Items --- */
.momp-gallery-editor-grid {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
	gap: 20px;
	padding: 20px;
	background: #fbfbfb;
	border: 1px solid #eee;
	border-radius: 12px;
	margin-bottom: 25px;
	min-height: 120px;
}

.momp-gallery-edit-item,
.momp-gallery-item-new {
	position: relative;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	border: 1px solid #eee;
	overflow: hidden;
	aspect-ratio: 1;
}

.momp-gallery-edit-item img,
.momp-gallery-item-new img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

/* Delete Overlay - Positioned at bottom right */
.momp-gallery-delete-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: transparent;
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	padding: 10px;
	opacity: 1;
	transition: all 0.2s ease;
	cursor: pointer;
	color: #fff;
}

.momp-delete-icon {
	font-size: 20px;
	line-height: 1;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
	background: #ef4444;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: 2px solid #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.momp-delete-text {
	position: absolute;
	bottom: 45px;
	right: 0;
	font-size: 9px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	background: rgba(0, 0, 0, 0.7);
	padding: 2px 6px;
	border-radius: 4px;
	opacity: 0;
	transition: opacity 0.2s ease;
	white-space: nowrap;
}

.momp-gallery-edit-item:hover .momp-delete-text,
.momp-gallery-delete-overlay:has(input:checked) .momp-delete-text {
	opacity: 1;
}

.momp-gallery-delete-overlay input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

/* When checked, show red overlay */
.momp-gallery-delete-overlay:has(input:checked) {
	background: rgba(239, 68, 68, 0.7);
}

.momp-gallery-delete-overlay:has(input:checked) .momp-delete-icon {
	transform: scale(1.1);
	background: #fff;
	color: #ef4444;
}

/* Staged Item Remove Button */
.momp-remove-staged {
	position: absolute;
	top: 5px;
	right: 5px;
	width: 24px;
	height: 24px;
	background: #ef4444;
	color: #fff;
	border: none;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 16px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.momp-delete-label {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	color: #ef4444;
	cursor: pointer;
	background: #fef2f2;
	padding: 4px 10px;
	border-radius: 6px;
	border: 1px solid #fee2e2;
}

.momp-gallery-upload-zone {
	display: flex;
	justify-content: center;
	margin-top: 20px;
	width: 100%;
}

.momp-gallery-add-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 30px;
	border: 2px dashed #cbd5e1;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.2s ease;
	background: #fff;
	min-width: 200px;
}

.momp-gallery-add-btn:hover {
	border-color: #3b82f6;
	background: #f8fafc;
}