/**
 * Model Selector Styles
 * Virtual Try-On - SaaS Mode
 */

.vfr-selector-wrapper {
	max-width: 800px;
	margin: 2em auto;
	padding: 2em;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Tabs */
.vfr-tabs {
	display: flex;
	gap: 1em;
	margin-bottom: 2em;
	border-bottom: 2px solid #e5e7eb;
}

.vfr-tab {
	flex: 1;
	padding: 1em 2em;
	background: none;
	border: none;
	border-bottom: 3px solid transparent;
	cursor: pointer;
	font-size: 1em;
	font-weight: 600;
	color: #6b7280;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
}

.vfr-tab:hover {
	color: #374151;
	background: #f9fafb;
}

.vfr-tab.active {
	color: #2563eb;
	border-bottom-color: #2563eb;
}

.vfr-tab-icon {
	font-size: 1.2em;
}

/* Tab Content */
.vfr-tab-content {
	display: none;
}

.vfr-tab-content.active {
	display: block;
	animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

.vfr-description {
	font-size: 1.1em;
	color: #374151;
	margin-bottom: 1.5em;
	text-align: center;
}

/* Model Grid */
.vfr-model-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 1.5em;
	margin-bottom: 2em;
}

.vfr-model-card {
	background: #fff;
	border: 2px solid #e5e7eb;
	border-radius: 12px;
	padding: 1em;
	cursor: pointer;
	transition: all 0.3s ease;
	text-align: center;
}

.vfr-model-card:hover {
	border-color: #2563eb;
	transform: translateY(-4px);
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.vfr-model-image {
	width: 100%;
	aspect-ratio: 3/4;
	overflow: hidden;
	border-radius: 8px;
	margin-bottom: 0.75em;
	background: #f3f4f6;
}

.vfr-model-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.vfr-model-info strong {
	display: block;
	font-size: 0.95em;
	color: #111827;
	margin-bottom: 0.25em;
}

.vfr-model-info small {
	display: block;
	font-size: 0.85em;
	color: #6b7280;
}

/* Loading State */
.vfr-loading {
	text-align: center;
	padding: 3em 2em;
}

.vfr-spinner {
	display: inline-block;
	width: 50px;
	height: 50px;
	border: 4px solid #e5e7eb;
	border-top-color: #2563eb;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin-bottom: 1em;
}

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

.vfr-loading p {
	font-size: 1.1em;
	color: #374151;
	margin-bottom: 0.5em;
}

.vfr-loading small {
	display: block;
	color: #6b7280;
	font-size: 0.9em;
}

/* Result Display */
.vfr-result {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0,0,0,0.9);
	z-index: 99999;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2em;
}

.vfr-result-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	max-width: 800px;
	margin-bottom: 1em;
}

.vfr-result-header h3 {
	color: #fff;
	font-size: 1.5em;
	margin: 0;
}

.vfr-close-result {
	background: rgba(255,255,255,0.1);
	border: none;
	color: #fff;
	font-size: 2em;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	cursor: pointer;
	transition: all 0.3s ease;
}

.vfr-close-result:hover {
	background: rgba(255,255,255,0.2);
	transform: scale(1.1);
}

.vfr-result-image-wrapper {
	position: relative;
	max-width: 800px;
	max-height: 80vh;
}

.vfr-result-image-wrapper img {
	width: 100%;
	height: auto;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.vfr-cache-badge {
	position: absolute;
	top: 1em;
	right: 1em;
	background: #10b981;
	color: #fff;
	padding: 0.5em 1em;
	border-radius: 999px;
	font-size: 0.9em;
	font-weight: 600;
	box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.vfr-result-actions {
	display: flex;
	gap: 1em;
	margin-top: 1.5em;
}

.vfr-result-actions button {
	padding: 0.75em 1.5em;
	background: #2563eb;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 1em;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
}

.vfr-result-actions button:hover {
	background: #1d4ed8;
	transform: translateY(-2px);
}

/* Upload Area */
.vfr-upload-area {
	text-align: center;
	padding: 2em;
}

.vfr-upload-label {
	display: inline-block;
	padding: 2em 3em;
	background: #f9fafb;
	border: 2px dashed #d1d5db;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.vfr-upload-label:hover {
	background: #f3f4f6;
	border-color: #2563eb;
}

.vfr-upload-icon {
	display: block;
	font-size: 3em;
	margin-bottom: 0.5em;
}

.vfr-premium-notice {
	margin-top: 1.5em;
	padding: 1em;
	background: #fef3c7;
	border: 1px solid #fbbf24;
	border-radius: 8px;
	color: #92400e;
	font-size: 0.9em;
}

/* Notifications */
.vfr-notification {
	position: fixed;
	bottom: 2em;
	right: 2em;
	padding: 1em 1.5em;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(0,0,0,0.2);
	z-index: 100000;
	animation: slideIn 0.3s ease;
}

@keyframes slideIn {
	from {
		transform: translateX(400px);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

.vfr-notification.vfr-error {
	background: #fef2f2;
	border-left: 4px solid #ef4444;
	color: #991b1b;
}

.vfr-notification.vfr-success {
	background: #f0fdf4;
	border-left: 4px solid #10b981;
	color: #065f46;
}

/* Responsive */
@media (max-width: 768px) {
	.vfr-selector-wrapper {
		padding: 1.5em;
	}

	.vfr-model-grid {
		grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
		gap: 1em;
	}

	.vfr-tabs {
		flex-direction: column;
		gap: 0;
	}

	.vfr-tab {
		border-bottom: 1px solid #e5e7eb;
	}

	.vfr-result {
		padding: 1em;
	}

	.vfr-notification {
		left: 1em;
		right: 1em;
		bottom: 1em;
	}
}

