/* Profile Edit styles */

/* == Profile Completion Checklist == */

.checklist {
	background: var(--card-bg);
	border-radius: var(--radius-lg);
	border: 1px solid var(--border);
	overflow: hidden;
}

.checklist.complete {
	border-color: var(--success);
}

.checklist > header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--space-4);
	cursor: pointer;
	user-select: none;
}

.checklist > header > div {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	font-weight: 600;
	font-size: var(--text-sm);
}

.checklist .percent {
	background: var(--primary);
	color: var(--button-text);
	font-size: var(--text-xs);
	font-weight: 700;
	padding: var(--space-0\.5) var(--space-2);
	border-radius: var(--radius-xl);
}

.checklist.complete .percent {
	background: var(--success);
}

.checklist > header small {
	font-size: var(--text-sm);
	color: var(--muted);
}

.checklist > header .chevron-icon {
	transition: transform 0.2s ease;
	color: var(--muted);
}

.checklist > header .chevron-icon.rotated {
	transform: rotate(90deg);
}

.checklist > header .chevron-down {
	transform: rotate(90deg);
}

/* Progress bar */
.checklist progress {
	display: block;
	width: 100%;
	height: 4px;
	border: none;
	background: var(--border);
	appearance: none;
	-webkit-appearance: none;
}

.checklist progress::-webkit-progress-bar {
	background: var(--border);
}

.checklist progress::-webkit-progress-value {
	background: linear-gradient(90deg, var(--primary), var(--success));
	transition: width 0.3s ease;
}

.checklist progress::-moz-progress-bar {
	background: linear-gradient(90deg, var(--primary), var(--success));
}

/* Task list */
.checklist ul {
	list-style: none;
	margin: 0;
	padding: var(--space-2) 0;
}

.checklist li {
	display: flex;
	align-items: center;
	gap: var(--gap-base);
	padding: var(--space-3) var(--space-4);
	border-bottom: 1px solid var(--border);
}

.checklist li:last-child {
	border-bottom: none;
}

.checklist li.completed {
	opacity: 0.6;
}

.checklist li > svg,
.checklist li > .empty {
	flex-shrink: 0;
}

.checklist li .check-icon.completed {
	color: var(--success);
}

.checklist li .empty {
	display: block;
	width: 18px;
	height: 18px;
	border: 2px solid var(--border);
	border-radius: var(--radius-full);
}

.checklist li > div {
	flex: 1;
	min-width: 0;
}

.checklist li h4 {
	font-weight: 500;
	font-size: var(--text-sm);
	margin: 0 0 var(--space-0\.5);
}

.checklist li p {
	font-size: var(--text-xs);
	color: var(--muted);
	margin: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.checklist li em {
	flex-shrink: 0;
	font-style: normal;
	font-size: var(--text-xs);
	font-weight: 600;
	color: var(--success);
	background: var(--success-bg-subtle-flat);
	padding: var(--space-0\.5) var(--space-2);
	border-radius: var(--radius-xl);
}

.checklist li.completed em {
	color: var(--muted);
	background: transparent;
}

.checklist li button {
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	border-radius: var(--radius-full);
	background: var(--primary);
	color: var(--button-text);
	border: none;
	cursor: pointer;
}


/* Message area (instructions / errors) */
#photo-upload .notice {
	gap: var(--space-2);
	padding: var(--space-4);
	border-radius: var(--card-radius);
	text-align: center;
}

#photo-upload .notice.error {
	background: var(--error-bg-subtle-flat);
	border: 1px solid rgba(239, 68, 68, 0.3);
	color: var(--error);
}

#photo-upload .notice.success {
	background: var(--success-bg-subtle-flat);
	border: 1px solid rgba(34, 197, 94, 0.3);
	color: var(--success);
}

#photo-upload .notice svg {
	flex-shrink: 0;
}

#photo-upload .option {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	flex: 1;
	padding: var(--space-6) var(--space-4);
	background: var(--accent);
	border: 2px solid var(--border);
	border-radius: var(--card-radius);
	cursor: pointer;
	transition: all 0.2s;
	text-align: center;
}

#photo-upload .option:active {
	transform: scale(0.98);
}

#photo-upload .option.dragging {
	border-color: var(--primary);
	border-style: solid;
	background: rgba(var(--primary-rgb), 0.1);
}

#photo-upload .option .option-icon {
	display: flex;
	justify-content: center;
	margin-bottom: var(--space-3);
	color: var(--muted);
	transition: color 0.2s;
}

#photo-upload .option .option-text {
	font-size: var(--text-base);
	font-weight: 500;
	color: var(--foreground);
	margin-bottom: var(--space-1);
}

#photo-upload .option .option-hint {
	font-size: var(--text-sm);
	color: var(--muted);
}

/* Camera step */
#photo-upload .camera {
	display: flex;
	flex-direction: column;
	gap: var(--gap-base);
}

.camera-preview {
	position: relative;
	width: 100%;
	height: 360px;
	max-height: calc(100dvh - 260px);
	background: var(--surface);
	border-radius: var(--card-radius);
	overflow: hidden;
}

.camera-preview video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.camera-preview video.mirror {
	transform: scaleX(-1);
}

.camera-guide {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.camera-guide-circle {
	width: 90%;
	height: 90%;
	border: 2px dashed rgba(255, 255, 255, 0.4);
	border-radius: var(--radius-full);
}

.camera-controls {
	gap: var(--space-8);
	padding: var(--space-2) 0;
}

.camera-switch-btn {
	width: 44px;
	height: 44px;
	background: var(--accent);
	border: 1px solid var(--border);
	border-radius: var(--radius-full);
	cursor: pointer;
	transition: all 0.2s;
}

/* camera-capture-btn defined in Attachment Camera section */

.camera-placeholder {
	width: 44px;
	height: 44px;
}

/* Cropper — the 4:5 frame lives inside the Cropper component; the container
   is sized to leave room for header + controls + footer on mobile viewports */
#photo-upload .cropper {
	position: relative;
	width: 100%;
	height: 360px;
	max-height: calc(100dvh - 260px);
	background: var(--accent);
	border-radius: var(--card-radius);
	overflow: hidden;
}

#photo-upload .controls {
	display: flex;
	align-items: center;
	gap: var(--gap-base);
	padding: var(--space-4);
}

.zoom-btn {
	width: 36px;
	height: 36px;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	cursor: pointer;
	transition: all 0.2s;
}

.zoom-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.zoom-slider {
	flex: 1;
	height: 4px;
	background: var(--border);
	border-radius: var(--radius-2xs);
	appearance: none;
	cursor: pointer;
}

.zoom-slider::-webkit-slider-thumb {
	appearance: none;
	width: 18px;
	height: 18px;
	background: var(--primary);
	border-radius: var(--radius-full);
	cursor: pointer;
	transition: transform 0.2s;
}

.zoom-slider::-moz-range-thumb {
	width: 18px;
	height: 18px;
	background: var(--primary);
	border: none;
	border-radius: var(--radius-full);
	cursor: pointer;
}

/* Upload Progress */
#photo-upload .progress {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: var(--space-8);
}

.progress-circle {
	position: relative;
	width: 100px;
	height: 100px;
	margin-bottom: var(--space-4);
}

.progress-circle svg {
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.progress-circle .progress-bg {
	fill: none;
	stroke: var(--border);
	stroke-width: 3;
}

.progress-circle .progress-fill {
	fill: none;
	stroke: var(--primary);
	stroke-width: 3;
	stroke-linecap: round;
	transition: stroke-dasharray 0.3s ease;
}

.progress-circle .progress-text {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: var(--text-xl);
	font-weight: 600;
	color: var(--foreground);
}

#photo-upload .progress p {
	font-size: var(--text-base);
	color: var(--muted);
	margin: 0;
}

/* Success State */
#photo-upload .success {
	text-align: center;
	padding: var(--space-4);
}

.success-preview {
	position: relative;
	display: inline-block;
	margin-bottom: var(--space-4);
}

.success-preview img {
	width: 120px;
	height: 120px;
	border-radius: var(--radius-full);
	object-fit: cover;
	border: 3px solid var(--primary);
}

.success-preview .pending-badge {
	position: absolute;
	bottom: -8px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: var(--space-1);
	padding: var(--space-1) var(--space-3);
	background: var(--warning);
	color: white;
	font-size: var(--text-xs);
	font-weight: 600;
	border-radius: var(--radius-full);
	white-space: nowrap;
}

#photo-upload .success h3 {
	font-size: var(--text-xl);
	margin: 0 0 0.5rem;
}

#photo-upload .success .success-message {
	font-size: var(--text-sm);
	color: var(--muted);
	margin: 0;
	line-height: var(--line-height-normal);
}

/* Photo Upload Options (Take Photo / Choose Photo) */
#photo-upload .options {
	display: flex;
	flex-direction: row;
	gap: var(--gap-base);
    padding: var(--padding-base);
}

.camera-switch-btn,
.zoom-btn { color:var(--foreground); }
.zoom-btn { background:none; border:none; }

/* == PHOTO PENDING OVERLAY - Profile & Gallery == */

/* Large centered overlay for main profile photo */
.photo-pending-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--gap-base);
	background: var(--overlay-medium);
	color: white;
	z-index: 10;
}

.photo-pending-overlay svg {
	width: var(--icon-3xl);
	height: var(--icon-3xl);
	opacity: 0.9;
}

.photo-pending-overlay .pending-label {
	font-size: var(--text-lg);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.photo-pending-overlay .pending-hint {
	font-size: var(--text-sm);
	
	opacity: 0.9;
	text-align: center;
	max-width: 200px;
}

/* Rejected state overlay */
.photo-pending-overlay.rejected {
	background: rgba(220, 38, 38, 0.7);
}

/* Membership status  */

.membership-status {
	display: flex;
	align-items: center;
	gap: var(--space-1);
}

.membership-status .membership-label {
	font-size: var(--text-base);
	font-weight: 600;
	color: var(--vip-gold);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* Desktop: table-like layout for settings toggles */
@media (min-width: 768px) {
	#page-settings .toggle-item {
		display: grid;
		grid-template-columns: 200px 1fr auto;
		align-items: center;
		gap: var(--gap-base);
	}
	/* Inline form groups in settings (e.g., Who Can Message Me) */
	
	.panels .form-group {
		flex-direction: row;
		align-items: center;
		gap: var(--gap-base);
	}

	.panels .form-group select {
		width: auto;
		min-width: 180px;
	}
}



/* Blocked Users List */
.blocked-users-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
}

.blocked-user-item {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	padding: var(--space-3) 0;
	border-bottom: 1px solid var(--border);
}

.blocked-user-item:last-child {
	border-bottom: none;
}

.blocked-user-photo {
	width: var(--icon-3xl);
	height: var(--icon-3xl);
	border-radius: var(--radius-full);
	overflow: hidden;
	flex-shrink: 0;
	background: var(--muted);
}

.blocked-user-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.blocked-user-photo .avatar-placeholder {
	width: 100%;
	height: 100%;
	background: var(--muted);
}

.blocked-user-info {
	flex: 1;
	min-width: 0;
}

.blocked-user-name {
	font-weight: 500;
	color: var(--foreground);
}

.blocked-user-age {
	color: var(--muted);
	font-weight: 400;
}

.btn-unblock {
	background: var(--card-bg);
	color: var(--foreground);
}


/* Membership card */
.membership-card {
	background: var(--vip-box-bg);
	border: 1px solid rgba(212, 175, 55, 0.3);
}
.dark .membership-card {
	color: #f5f0e0;
	border-color: rgba(212, 175, 55, 0.2);
}
.cancel-subscription P {
	font-size: var(--text-sm);
	padding:var(--space-2) 0;
}
.cancel-subscription .btn {
	color:var(--muted);
	font-weight: normal;
	font-size: var(--text-xs);
}
.membership-status-display {
	padding:var(--space-4) 0;
	text-align: center;
}
.membership-status-display .vip-icon {
	flex-shrink: 0;
	margin-right:var(--space-2);
}

.membership-info {
	flex: 1;
}

.membership-info h2 {
	margin: 0;
	font-size: var(--text-xl);
	white-space: pre;
	font-weight: 400;
}

@media (min-width: 768px) {
	.membership-status-display {
		display: flex;
		align-items: center;
		padding: var(--padding-base);
		gap: var(--gap-base);
	}
	.membership-info h2 {
		text-align: left;
	}
}



.membership-info .subscription-detail {
	display: block;
	font-size: var(--text-sm);
	color: var(--muted);
	margin-top: var(--space-1);
}

/* Payment status badges */
.status-badge {
	display: inline-block;
	padding: var(--space-0\.5) var(--space-2);
	font-size: var(--text-xs);
	font-weight: 500;
	border-radius: var(--radius-xs);
	text-transform: capitalize;
}

.status-badge.status-completed {
	background: rgba(34, 197, 94, 0.15);
	color: var(--success);
}

.status-badge.status-pending {
	background: rgba(251, 191, 36, 0.15);
	color: var(--coin-gold-dark);
}

.status-badge.status-failed,
.status-badge.status-cancelled {
	background: rgba(239, 68, 68, 0.15);
	color: var(--error);
}

.status-badge.status-refunded {
	background: rgba(156, 163, 175, 0.15);
	color: #6b7280;
}

/* Payment table product display */
.product-type {
	display: block;
	font-weight: 500;
	text-transform: uppercase;
	font-size: var(--text-xs);
	color: var(--vip-gold);
}

.coin-history,
.payment-history {
	margin-top: var(--space-6);
}

.coin-history h4,
.payment-history h4 {
	margin-bottom: var(--space-3);
}

.transaction-table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--text-sm);
}

.transaction-table th,
.transaction-table td {
	padding: var(--space-3) var(--space-1);
	text-align: left;
	border-bottom: 1px solid var(--border);
}

.transaction-table th {
	font-weight: 400;
	color: var(--muted);
	font-size: var(--text-xs);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.transaction-table td.positive {
	color: #059669;
	font-weight: 600;
}

.transaction-table tbody tr:last-child td {
	border-bottom: none;
}

.transaction-table td.transaction-time-exact {
	color: var(--muted);
}

@media (max-width: 640px) {
	.transaction-table th:nth-child(3),
	.transaction-table td.transaction-time-exact {
		display: none;
	}
}

.transaction-table th.amount,
.transaction-table td.amount {
	text-align: right;
}


/* Danger zone */
.danger-zone {
	border-color: rgba(220, 38, 38, 0.3);
}

.danger-zone h3 {
	color: var(--error);
}

.danger-actions {
	display: flex;
	flex-direction: column;
	gap: var(--gap-base);
}

.danger-action {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--gap-base);
	padding: var(--space-3) 0;
	border-bottom: 1px solid var(--border);
}

.danger-action:last-child {
	border-bottom: none;
}

.action-info {
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
}

.action-info strong {
	font-size: var(--text-base);
	color: var(--primary);
}

.action-info span {
	font-size: var(--text-sm);
	color: var(--muted);
}

/* Interests Section */
#edit-profile .interests {
	margin-top: var(--space-6);
	border: none;
	padding: 0;
}

#edit-profile .interests .section-description {
	margin: var(--space-1) 0 0;
}

#edit-profile .interests .grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-3);
}

@media (min-width: 768px) {
	#edit-profile .interests .grid {
		grid-template-columns: repeat(3, 1fr);
		gap: var(--gap-base);
	}
}

@media (min-width: 1024px) {
	#edit-profile .interests .grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

#edit-profile .interests button {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: var(--space-3) var(--space-8) var(--space-3) var(--space-3);
	background: var(--card-bg);
	border: 2px solid var(--border);
	border-radius: var(--radius-md);
	cursor: pointer;
	transition: all 0.15s ease;
	text-align: left;
}

#edit-profile .interests button.selected {
	border-color: var(--primary);
	background: var(--card-bg);
	box-shadow: inset 0 0 0 1px var(--primary);
}

#edit-profile .interests button > span {
	position: absolute;
	top: var(--space-2);
	right: var(--space-2);
	display: flex;
	line-height: 1;
}

#edit-profile .interests button > span svg {
	opacity: 0.25;
	transition: opacity 0.15s, color 0.15s;
}

#edit-profile .interests button.selected > span svg {
	color: var(--primary);
	opacity: 1;
}

#edit-profile .interests button strong {
	font-weight: 600;
	font-size: var(--text-base);
	color: var(--foreground);
}

#edit-profile .interests button small {
	font-size: var(--text-sm);
	color: var(--muted);
	margin-top: var(--space-1);
	line-height: 1.3;
}


/* Niche Tags (user-assigned niches) */
.tags-list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--gap-base);
	font-size: var(--text-sm);
}

.tag {
	display: inline-flex;
	align-items: center;
	gap: var(--gap-base);
	padding: var(--space-2) var(--space-3);
	background: var(--card-bg);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	color: var(--foreground);
	transition: opacity 0.15s ease;
}

.tag.removing {
	opacity: 0.5;
}

.tag.confirming {
	border-color: var(--error);
	background: var(--error-bg-subtle-flat);
}

.tag.confirming .tag-remove {
	opacity: 1;
	background: var(--error);
}

.tag-name {
	line-height: 1;
}

.tag-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	padding: 0;
	margin-left: var(--space-0\.5);
	background: var(--muted);
	border: none;
	border-radius: var(--radius-full);
	cursor: pointer;
	opacity: 0.6;
	transition: opacity 0.15s ease, background 0.15s ease;
}

.tag-remove svg {
	width: 10px;
	height: 10px;
	color: var(--background-color);
}

.tag-remove:disabled {
	cursor: not-allowed;
	opacity: 0.3;
}


/* Tags (user-assigned niches) */
ul.tags {
	display: flex;
	flex-wrap: wrap;
	gap: var(--gap-base);
	padding: var(--space-2) 0;
	list-style: none;
	margin: 0;
}

ul.tags li {
	display: inline-flex;
	align-items: center;
	gap: var(--gap-base);
	padding: var(--space-2) var(--space-3);
	background: var(--card-bg);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	font-size: var(--text-sm);
	color: var(--foreground);
	transition: opacity 0.15s ease;
}

ul.tags li.removing {
	opacity: 0.5;
}

ul.tags li.confirming {
	border-color: var(--error);
	background: var(--error-bg-subtle-flat);
}

ul.tags li.confirming button {
	opacity: 1;
	background: var(--error);
}

ul.tags li span {
	line-height: 1;
}

ul.tags li button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	padding: 0;
	margin-left: var(--space-0\.5);
	background: var(--muted);
	border: none;
	border-radius: var(--radius-full);
	cursor: pointer;
	opacity: 0.6;
	transition: opacity 0.15s ease, background 0.15s ease;
}

ul.tags li button svg {
	width: 10px;
	height: 10px;
	color: var(--background-color);
}

ul.tags li button:disabled {
	cursor: not-allowed;
	opacity: 0.3;
}

/* Niche Tags in Edit Section */
#edit-profile .niches {
	margin-top: var(--space-8);
	padding-top: var(--space-6);
	border-top: 1px solid var(--border);
}

#edit-profile .niches .profile-field-header {
	margin-bottom: var(--margin-base);
}

#edit-profile .niches h2 {
	font-size: var(--text-lg);
	font-weight: 600;
	margin: 0 0 0.25rem 0;
}

#edit-profile .niches .section-description {
	font-size: var(--text-sm);
	color: var(--muted);
	margin: 0;
}