/**
 * Shibhu Matrimony – Edit Profile Styles
 *
 * Shares the same design token / CSS custom property system as
 * submit-form.css. Override these in your theme for customisation.
 *
 * @package Modern_Matrimony
 * @since   1.1.0
 */

/* ============================================================
   Wrapper & Container
   ============================================================ */
.sm-edit-wrap {
	width: 100%;
	max-width: 900px;
	margin: 0 auto;
	padding: 0 1rem;
}

.sm-edit-container {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 24px rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

/* ============================================================
   Header
   ============================================================ */
.sm-edit-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.75rem 2rem;
	background: linear-gradient(135deg, #d63384 0%, #b02567 100%);
	color: #fff;
}

.sm-edit-header svg {
	flex-shrink: 0;
	opacity: 0.9;
}

.sm-edit-header h2 {
	margin: 0 0 0.25rem;
	font-size: 1.35rem;
	font-weight: 700;
	color: #fff;
}

.sm-edit-header p {
	margin: 0;
	font-size: 0.875rem;
	opacity: 0.85;
}

/* ============================================================
   Notice / Status Banner
   ============================================================ */
.sm-notice {
	padding: 0.875rem 1.25rem;
	border-radius: 8px;
	margin-bottom: 1.25rem;
	font-size: 0.9rem;
	line-height: 1.5;
}

.sm-notice--info {
	background: #e0f0ff;
	border-left: 4px solid #2196f3;
	color: #0d47a1;
}

.sm-notice--warning {
	background: #fff8e1;
	border-left: 4px solid #ffc107;
	color: #7b4f00;
}

.sm-notice--error {
	background: #fdecea;
	border-left: 4px solid #e53935;
	color: #b71c1c;
}

.sm-notice--success {
	background: #e8f5e9;
	border-left: 4px solid #43a047;
	color: #1b5e20;
}

/* ============================================================
   Sections
   ============================================================ */
.sm-edit-section {
	padding: 1.75rem 2rem;
	border-bottom: 1px solid #f0f0f0;
}

.sm-edit-section:last-of-type {
	border-bottom: none;
}

.sm-edit-section-title {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 1.05rem;
	font-weight: 700;
	color: #333;
	margin: 0 0 1.25rem;
}

.sm-edit-section-title svg {
	color: #d63384;
	flex-shrink: 0;
}

/* ============================================================
   Field Grid  (reuses submit-form tokens)
   ============================================================ */
.sm-field-grid {
	display: grid;
	gap: 1.1rem;
}

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

.sm-field--full {
	grid-column: 1 / -1;
}

@media (max-width: 600px) {
	.sm-grid-2 {
		grid-template-columns: 1fr;
	}
}

/* ============================================================
   Field / Label / Input  (shared with submit form)
   ============================================================ */
.sm-field {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.sm-label {
	font-size: 0.85rem;
	font-weight: 600;
	color: #444;
}

.sm-label--required::after {
	content: ' *';
	color: #e53935;
}

.sm-input-wrap {
	position: relative;
}

.sm-input,
.sm-select,
.sm-textarea {
	width: 100%;
	padding: 0.6rem 0.85rem;
	border: 1.5px solid #ddd;
	border-radius: 8px;
	font-size: 0.95rem;
	color: #333;
	background: #fafafa;
	transition: border-color 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
}

.sm-input:focus,
.sm-select:focus,
.sm-textarea:focus {
	outline: none;
	border-color: #d63384;
	box-shadow: 0 0 0 3px rgba(214, 51, 132, 0.12);
	background: #fff;
}

.sm-input--error {
	border-color: #e53935 !important;
}

.sm-textarea {
	resize: vertical;
	min-height: 100px;
}

.sm-select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	padding-right: 2.25rem;
}

.sm-char-count {
	font-size: 0.775rem;
	color: #888;
	text-align: right;
	margin-top: 0.25rem;
}

/* ============================================================
   Photo Uploader
   ============================================================ */
.sm-edit-photo-uploader {
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
	align-items: flex-start;
}

.sm-photo-drop-zone {
	width: 200px;
	height: 200px;
	border: 2px dashed #ddd;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	overflow: hidden;
	transition: border-color 0.2s, background 0.2s;
	position: relative;
	background: #fafafa;
}

.sm-photo-drop-zone:hover,
.sm-photo-drop-zone.sm-drag-over {
	border-color: #d63384;
	background: #fff0f7;
}

.sm-photo-drop-zone.sm-drag-over {
	box-shadow: 0 0 0 3px rgba(214, 51, 132, 0.15);
}

.sm-photo-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.4rem;
	padding: 1rem;
	color: #aaa;
}

.sm-photo-placeholder svg {
	color: #ccc;
}

.sm-photo-placeholder p {
	margin: 0;
	font-size: 0.8rem;
	font-weight: 600;
	color: #888;
}

.sm-photo-hint {
	font-size: 0.7rem;
	color: #bbb;
}

.sm-photo-preview {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sm-photo-input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

.sm-photo-actions {
	display: flex;
	gap: 0.6rem;
	flex-wrap: wrap;
	align-items: center;
}

/* ============================================================
   Buttons
   ============================================================ */
.sm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.65rem 1.35rem;
	border-radius: 8px;
	border: none;
	font-size: 0.925rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s, opacity 0.2s, transform 0.1s;
	line-height: 1.2;
}

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

.sm-btn-primary {
	background: var(--sm-primary);
	color: #fff;
}

.sm-btn-primary:hover {
	opacity: 0.9;
	color: #fff;
	background: var(--sm-primary);
}

.sm-btn-secondary {
	background: #f3f4f6;
	color: #444;
	border: 1.5px solid #ddd;
}

.sm-btn-secondary:hover {
	background: #e9eaec;
	color: #333;
}

.sm-btn-danger {
	background: #fdecea;
	color: #c62828;
	border: 1.5px solid #ffcdd2;
}

.sm-btn-danger:hover {
	background: #ffcdd2;
}

.sm-btn-sm {
	padding: 0.45rem 0.9rem;
	font-size: 0.83rem;
}

/* Loading spinner on primary button. */
.sm-btn.sm-loading {
	opacity: 0.75;
	pointer-events: none;
}

.sm-btn.sm-loading::after {
	content: '';
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: sm-spin 0.7s linear infinite;
	margin-left: 0.5rem;
}

@keyframes sm-spin {
	to { transform: rotate(360deg); }
}

/* ============================================================
   Form Actions Row
   ============================================================ */
.sm-edit-form-actions {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 1.5rem 2rem 2rem;
	flex-wrap: wrap;
}

/* ============================================================
   Form Response
   ============================================================ */
.sm-form-response {
	display: none;
	padding: 0.875rem 1.25rem;
	border-radius: 8px;
	font-size: 0.9rem;
	font-weight: 500;
	margin: 0 2rem 0.5rem;
	line-height: 1.5;
}

.sm-form-response a {
	color: inherit;
	text-decoration: underline;
}

.sm-form-response.sm-success {
	background: #e8f5e9;
	border-left: 4px solid #43a047;
	color: #1b5e20;
}

.sm-form-response.sm-error {
	background: #fdecea;
	border-left: 4px solid #e53935;
	color: #b71c1c;
}

.sm-form-response.sm-info {
	background: #e0f0ff;
	border-left: 4px solid #2196f3;
	color: #0d47a1;
}

/* ============================================================
   Utility
   ============================================================ */
.sm-hidden {
	display: none !important;
}

/* ============================================================
   Responsive tweaks
   ============================================================ */
@media (max-width: 768px) {
	.sm-edit-section {
		padding: 1.25rem 1rem;
	}

	.sm-edit-header {
		padding: 1.25rem 1rem;
	}

	.sm-edit-form-actions {
		padding: 1rem 1rem 1.5rem;
	}

	.sm-form-response {
		margin: 0 1rem 0.5rem;
	}
}
