grocery-app/frontend/src/styles/ImageModal.css
2026-01-27 00:03:58 -08:00

84 lines
1.2 KiB
CSS

/* ImageModal - specialized full-screen image viewer */
.image-modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.9);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
padding: 2rem;
animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.image-modal-content {
position: relative;
max-width: 90vw;
max-height: 90vh;
background: white;
border-radius: 12px;
padding: 1rem;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
animation: slideUp 0.3s ease;
}
@keyframes slideUp {
from {
transform: translateY(50px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
.image-modal-img {
max-width: 100%;
max-height: 70vh;
object-fit: contain;
display: block;
border-radius: 8px;
}
@media (max-width: 768px) {
.image-modal-overlay {
padding: 1rem;
}
.image-modal-img {
max-height: 60vh;
}
}
@media (max-width: 480px) {
.image-modal-overlay {
padding: 0.5rem;
}
.image-modal-content {
padding: 0.5rem;
border-radius: 8px;
max-width: 95vw;
}
.image-modal-img {
max-height: 50vh;
border-radius: 4px;
}
}