Files
michaelschiemer/resources/css/components/admin/admin-asset-preview.css
2025-11-24 21:28:25 +01:00

167 lines
3.3 KiB
CSS

/**
* Asset Preview Styles
* ITCSS: Components Layer
*/
/* Preview Column in Table */
.preview-column {
width: 80px;
text-align: center;
}
.asset-preview-thumbnail {
position: relative;
width: 60px;
height: 60px;
margin: 0 auto;
border-radius: var(--radius-sm);
overflow: hidden;
background: var(--bg-alt);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: transform var(--duration-default) var(--easing-default);
}
.asset-preview-thumbnail:hover {
transform: scale(1.1);
}
.asset-preview-thumbnail .preview-image {
width: 100%;
height: 100%;
object-fit: cover;
}
.asset-preview-thumbnail .preview-video-icon,
.asset-preview-thumbnail .preview-file-icon {
font-size: 1.5rem;
color: var(--muted);
}
.preview-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6);
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity var(--duration-default) var(--easing-default);
}
.asset-preview-thumbnail:hover .preview-overlay {
opacity: 1;
}
.preview-link {
color: var(--text-inverse);
text-decoration: none;
font-size: 1.25rem;
padding: var(--space-xs);
border-radius: var(--radius-sm);
transition: background var(--duration-default) var(--easing-default);
}
.preview-link:hover {
background: rgba(255, 255, 255, 0.2);
}
.preview-placeholder {
color: var(--muted);
font-size: 0.75rem;
}
/* Lightbox for Full Preview */
.asset-lightbox {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.95);
z-index: 10000;
display: flex;
align-items: center;
justify-content: center;
padding: var(--space-xl);
animation: fadeIn var(--duration-default) var(--easing-default);
}
.asset-lightbox__content {
position: relative;
max-width: 90vw;
max-height: 90vh;
display: flex;
align-items: center;
justify-content: center;
}
.asset-lightbox__image {
max-width: 100%;
max-height: 90vh;
object-fit: contain;
border-radius: var(--radius-md);
}
.asset-lightbox__close {
position: absolute;
top: var(--space-lg);
right: var(--space-lg);
background: rgba(255, 255, 255, 0.2);
border: none;
color: var(--text-inverse);
width: 40px;
height: 40px;
border-radius: 50%;
font-size: 1.5rem;
cursor: pointer;
transition: background var(--duration-default) var(--easing-default);
display: flex;
align-items: center;
justify-content: center;
}
.asset-lightbox__close:hover {
background: rgba(255, 255, 255, 0.3);
}
.asset-lightbox__info {
position: absolute;
bottom: var(--space-lg);
left: 50%;
transform: translateX(-50%);
background: rgba(0, 0, 0, 0.7);
color: var(--text-inverse);
padding: var(--space-md);
border-radius: var(--radius-md);
text-align: center;
min-width: 200px;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Responsive */
@media (max-width: 768px) {
.preview-column {
width: 60px;
}
.asset-preview-thumbnail {
width: 50px;
height: 50px;
}
}