@import url('https://api.fonts.coollabs.io/css2?family=Geist&display=swap');

* {
	font-family: "Geist", sans-serif;
}

/* Media upload thumbnails */
.gallery-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

.main-image-display {
	width: 100%;
	height: 480px;
	margin-bottom: 24px;
	margin-top: 12px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.main-image-display img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: scale(0.98);
	}

	to {
		opacity: 1;
		transform: scale(1);
	}
}

.media-grid {
	display: flex;
	gap: 16px;
	margin: 0 auto;
	/* Centers the tray when items are few */
	max-width: 100%;
	/* Prevents tray from overflowing parent */
	justify-content: flex-start;
	/* Ensures scrolling works correctly without cutting off left side */
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding: 12px 4px;
}

.media-item {
	position: relative;
	border-radius: 8px;
	overflow: hidden;
	background: var(--bg-secondary, #f3f4f6);
	flex-shrink: 0;
	width: 86px;
	height: 86px;
	border: 2px solid transparent;
	box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
	cursor: pointer;
	transition: all 0.25s ease;
	scroll-snap-align: center;
}

.media-item.active {
	border-color: var(--c-primary, #3b82f6);
	box-shadow: 0 0 0 2px var(--c-primary, #3b82f6) inset;
}

.media-item:hover {
	transform: translateY(-3px);
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	opacity: 0.95;
}

.media-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.media-item .remove-btn {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	border: none;
	cursor: pointer;
	font-size: 13px;
	line-height: 22px;
	text-align: center;
	padding: 0;
	z-index: 2;
	opacity: 0;
	transition: opacity 0.15s;
}

.media-item:hover .remove-btn {
	opacity: 1;
}

/* Upload progress overlay */
.media-item .progress-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.85);
	z-index: 1;
}

.media-item .progress-overlay progress {
	width: 90%;
	margin: 0;
}

.media-item.error {
	border-color: #ef4444;
}

.media-item .error-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(239, 68, 68, 0.1);
	color: #dc2626;
	font-size: 12px;
	font-weight: 500;
	text-align: center;
	padding: 8px;
	z-index: 1;
}

.status-dot {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	margin-right: 10px;
	flex-shrink: 0;
}

.status-dot[data-variant="positive"] {
	background-color: #22c55e;
}

.status-dot[data-variant="neutral"] {
	background-color: #eab308;
}

.status-dot[data-variant="negative"] {
	background-color: #ef4444;
}

/* Mobile responsive layout utilities */
.mobile-flex-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
}

.mobile-flex-header h1,
.mobile-flex-header h2,
.mobile-flex-header h3,
.mobile-flex-header h4 {
	margin: 0;
}

.mobile-actions {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	align-items: center;
}

/* Responsive key-value list */
.responsive-kv-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.responsive-kv-row {
	display: flex;
	flex-direction: column;
}

.responsive-kv-label {
	font-weight: 900;
	font-size: 0.875rem;
	margin-bottom: 0.25rem;
}

.responsive-kv-value {
	color: rgba(255, 255, 255, 0.75);
}

@media (min-width: 640px) {
	.responsive-kv-row {
		flex-direction: row;
		align-items: baseline;
	}

	.responsive-kv-label {
		flex: 0 0 30%;
		margin-bottom: 0;
	}

	.responsive-kv-value {
		flex: 1;
	}
}

@media (max-width: 600px) {
	.mobile-flex-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
	}

	.mobile-actions {
		width: 100%;
		justify-content: stretch;
	}

	.mobile-actions .button {
		flex: 1;
		text-align: center;
		justify-content: center;
	}
}