/**
 * User Profile Tab Styles
 *
 * @package User_Account_Hub
 * @since 4.0.0
 */

/* ============================================================================
   PROFILE TAB
   ========================================================================== */

.uah-profile-tab {
	display: flex;
	flex-direction: column;
	gap: var(--uah-spacing-xxl);
}

/* ============================================================================
   PROFILE SECTIONS
   ========================================================================== */

.uah-profile-section {
	padding: 25px;
	background: var(--uah-color-bg-alt);
	border-radius: var(--uah-radius-m);
	border: 1px solid var(--uah-color-border);
}

.uah-section-title {
	margin: 0 0 var(--uah-spacing-xl) 0;
	font-size: var(--uah-font-size-l);
	font-weight: var(--uah-font-weight-semibold);
	color: var(--uah-color-heading);
	display: flex;
	align-items: center;
	gap: var(--uah-spacing-m);
	padding-bottom: var(--uah-spacing-xl);
	border-bottom: 2px solid var(--uah-color-border);
}

.uah-section-title i {
	color: var(--uah-color-primary);
	font-size: 22px;
}

.uah-subsection-title {
	margin: var(--uah-spacing-xl) 0 var(--uah-spacing-xl) 0;
	font-size: var(--uah-font-size-base);
	font-weight: var(--uah-font-weight-semibold);
	color: var(--uah-color-heading);
}

/* ============================================================================
   PROFILE GRID (Avatar + Form)
   ========================================================================== */

.uah-profile-grid {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 30px;
}

/* Avatar Section */
.uah-avatar-section {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 15px;
}

/* Avatar Wrapper for Edit Button Overlay */
.uah-avatar-section .uah-user-avatar-wrapper {
	position: relative;
	width: 150px;
	height: 150px;
	border-radius: var(--uah-radius-full);
	overflow: visible;
	margin: 0 auto;
}

.uah-avatar-section .uah-user-avatar-wrapper .uah-user-avatar {
	width: 100%;
	height: 100%;
	border-radius: var(--uah-radius-full);
	object-fit: cover;
	border: 4px solid var(--uah-color-primary);
	box-shadow: var(--uah-shadow-xl);
	display: block;
}

/* Profile Form Section */
.uah-profile-form-section {
	flex: 1;
}

/* ============================================================================
   FORM ELEMENTS
   ========================================================================== */

.uah-form-label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: #333;
	font-size: 14px;
}

.uah-form-control {
	width: 100%;
	padding: 12px 15px;
	border: 2px solid var(--uah-color-border);
	border-radius: var(--uah-radius-m);
	font-size: 14px;
	font-family: inherit;
	transition: all var(--uah-transition-normal);
	background: var(--uah-color-bg);
}

.uah-form-control:focus {
	outline: none;
	border-color: var(--uah-color-primary);
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Read-only form control styling (v5.3.1) */
.uah-form-control-readonly {
	background-color: var(--uah-color-bg-alt);
	color: var(--uah-color-faded);
	cursor: not-allowed;
	opacity: 0.8;
}

.uah-form-control-readonly:hover,
.uah-form-control-readonly:focus {
	border-color: var(--uah-color-border);
	box-shadow: none;
}

.uah-form-hint {
	margin-top: 6px;
	font-size: 12px;
	color: #666;
	display: flex;
	align-items: center;
	gap: 5px;
}

.uah-form-hint i {
	font-size: 14px;
}

#bio-char-count {
	font-weight: 600;
	transition: color 0.3s ease;
}

/* Color states for character counter (v5.3.0+) */
#bio-char-count.uah-ok {
	color: var(--uah-color-success);
}

#bio-char-count.uah-warning {
	color: var(--uah-color-secondary);
}

#bio-char-count.uah-over-limit {
	color: var(--uah-color-error);
}

/* ============================================================================
   STATISTICS GRID
   ========================================================================== */

.uah-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 20px;
	margin-bottom: 20px;
}

.uah-stat-card {
	display: flex;
	align-items: center;
	gap: 15px;
	padding: 20px;
	background: #fff;
	border-radius: 8px;
	border: 2px solid #e0e0e0;
	transition: all 0.3s ease;
}

.uah-stat-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	border-color: #667eea;
}

.uah-stat-icon {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f0f4ff;
	color: #667eea;
	font-size: 24px;
	flex-shrink: 0;
}

.uah-stat-icon.uah-level-icon {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
}

.uah-stat-icon.uah-level-icon.uah-level-bronze {
	background: linear-gradient(135deg, #CD7F32 0%, #8B5A2B 100%);
}

.uah-stat-icon.uah-level-icon.uah-level-silver {
	background: linear-gradient(135deg, #C0C0C0 0%, #808080 100%);
}

.uah-stat-icon.uah-level-icon.uah-level-gold {
	background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

.uah-stat-icon.uah-level-icon.uah-level-platinum {
	background: linear-gradient(135deg, #E5E4E2 0%, #B8B8B8 100%);
}

.uah-stat-content {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.uah-stat-card .uah-stat-value {
	font-size: 32px;
	font-weight: 700;
	color: #333;
	line-height: 1;
}

.uah-stat-card .uah-stat-label {
	font-size: 13px;
	color: #666;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* ============================================================================
   LEVEL PROGRESS
   ========================================================================== */

.uah-level-progress {
	margin-top: 20px;
	padding: 20px;
	background: #fff;
	border-radius: 8px;
	border: 2px solid #e0e0e0;
}

.uah-progress-info {
	margin-bottom: 15px;
	font-size: 14px;
	color: #666;
}

.uah-progress-info p {
	margin: 0;
}

.uah-progress-info.uah-max-level {
	text-align: center;
	padding: 10px;
	background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
	color: #fff;
	border-radius: 6px;
	margin-bottom: 0;
}

.uah-progress-info i {
	margin-right: 5px;
}

.uah-progress-bar {
	width: 100%;
	height: 20px;
	background: #e0e0e0;
	border-radius: 10px;
	overflow: hidden;
	position: relative;
}

.uah-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
	border-radius: 10px;
	transition: width 0.5s ease;
	position: relative;
	overflow: hidden;
}

.uah-progress-fill::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
	animation: shimmer 2s infinite;
}

@keyframes shimmer {
	0% {
		transform: translateX(-100%);
	}

	100% {
		transform: translateX(100%);
	}
}

/* ============================================================================
   BADGES
   ========================================================================== */

.uah-badge-count {
	font-size: 16px;
	color: #666;
	font-weight: 400;
	margin-left: 5px;
}

.uah-badges-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 15px;
	margin-bottom: 20px;
}

.uah-badge-card {
	display: flex;
	align-items: center;
	gap: 15px;
	padding: 15px;
	background: #fff;
	border-radius: 8px;
	border: 2px solid #e0e0e0;
	transition: all 0.3s ease;
}

.uah-badge-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.uah-badge-icon {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f0f4ff;
	font-size: 24px;
	flex-shrink: 0;
}

.uah-badge-info {
	flex: 1;
}

.uah-badge-title {
	margin: 0 0 5px 0;
	font-size: 16px;
	font-weight: 600;
	color: #333;
}

.uah-badge-date {
	margin: 0;
	font-size: 12px;
	color: #666;
}

/* Badges Empty State */
.uah-badges-empty {
	text-align: center;
	padding: 40px 20px;
	color: #666;
}

.uah-badges-empty i {
	font-size: 48px;
	color: #ddd;
	margin-bottom: 15px;
}

.uah-badges-empty p {
	margin: 5px 0;
	font-size: 14px;
}

/* Available Badges */
.uah-available-badges {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 2px solid #e0e0e0;
}

.uah-badges-info {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.uah-badge-requirement {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	background: #fff;
	border-radius: 6px;
	border: 1px solid #e0e0e0;
}

.uah-badge-requirement i {
	font-size: 24px;
	flex-shrink: 0;
}

.uah-badge-requirement span {
	font-size: 14px;
	color: #666;
}

/* ============================================================================
   PUBLIC PROFILE SETTINGS (v5.3.0+)
   ========================================================================== */

.uah-public-profile-settings {
	margin-top: 30px;
	padding: 25px;
	background: #f0fdf4;
	border: 2px solid #10b981;
	border-radius: 8px;
}

.uah-public-profile-settings .uah-section-title {
	margin: 0 0 20px 0;
	font-size: 18px;
	font-weight: 600;
	color: #065f46;
	border-bottom: 2px solid #10b981;
	padding-bottom: 12px;
}

/* Checkbox labels */
.uah-checkbox-label {
	display: flex;
	align-items: center;
	gap: var(--uah-spacing-s);
	cursor: pointer;
	font-weight: 500;
	color: #333;
	user-select: none;
}

.uah-checkbox-label input[type="checkbox"] {
	cursor: pointer;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	margin: 0;
}

.uah-checkbox-label span {
	flex: 1;
}

.uah-checkbox-label:hover {
	color: #059669;
}

/* Profile URL Link (v5.3.1) */
.uah-profile-url-link {
	color: #10b981;
	text-decoration: none;
	transition: color 0.3s ease;
}

.uah-profile-url-link:hover {
	color: #059669;
	text-decoration: underline;
}

.uah-profile-url-link strong {
	color: inherit;
}

/* SEO setting conditional display */
#seo-indexing-setting {
	margin-top: 20px;
	padding-left: 28px;
	overflow: hidden;
}

/* ============================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
	.uah-profile-grid {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.uah-avatar-section {
		align-items: center;
	}

	.uah-stats-grid {
		grid-template-columns: 1fr;
	}

	.uah-badges-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.uah-profile-section {
		padding: 15px;
	}

	.uah-avatar-section .uah-user-avatar-wrapper {
		width: 120px;
		height: 120px;
	}

	.uah-section-title {
		font-size: 18px;
	}

	.uah-stat-card {
		padding: 15px;
	}

	.uah-stat-icon {
		width: 40px;
		height: 40px;
		font-size: 20px;
	}

	.uah-stat-card .uah-stat-value {
		font-size: 24px;
	}

	.uah-badge-card {
		padding: 12px;
	}

	.uah-badge-icon {
		width: 40px;
		height: 40px;
		font-size: 20px;
	}
}