/* Enhanced Preview UI Styles */

.design-previews {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 10px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.preview-box {
    position: relative;
    width: 100px; /* Fixed width for consistency */
    height: 100px; /* Square aspect ratio */
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.preview-box:hover {
    transform: translateY(-2px);
    border-color: #94a3b8;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.preview-box.active {
    border-color: #3b82f6; /* Primary blue */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: scale(1.05);
    z-index: 1;
}

.preview-box.active::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    pointer-events: none;
}

.preview-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preview-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #ffffff;
    padding: 4px;
}

.preview-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(2px);
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
    text-align: center;
    padding: 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-top: 1px solid rgba(0,0,0,0.05);
    transition: color 0.2s;
}

.preview-box.active .preview-label {
    color: #2563eb;
    background: rgba(239, 246, 255, 0.95); /* Light blue bg */
    border-top-color: rgba(59, 130, 246, 0.2);
}

/* Add a checkmark or indicator for the active side */
.preview-box.active::before {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 2;
}

/* Empty state styling */
.preview-box img[src=""], 
.preview-box img:not([src]) {
    opacity: 0;
}

.preview-box:has(img[src=""])::before,
.preview-box:has(img:not([src]))::before {
    /* Optional: Show something when image is missing, though JS usually handles this */
}
