grocery-app/frontend/src/styles/AddImageModal.css
2026-01-01 22:55:39 -08:00

177 lines
2.7 KiB
CSS

.add-image-modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.6);
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
animation: fadeIn 0.2s ease-out;
}
.add-image-modal {
background: white;
padding: 2em;
border-radius: 12px;
max-width: 500px;
width: 90%;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
animation: slideUp 0.3s ease-out;
}
.add-image-modal h2 {
margin: 0 0 0.5em 0;
font-size: 1.5em;
color: #333;
text-align: center;
}
.add-image-subtitle {
margin: 0 0 1.5em 0;
color: #666;
font-size: 0.95em;
text-align: center;
}
.add-image-subtitle strong {
color: #007bff;
}
.add-image-options {
display: flex;
flex-direction: column;
gap: 1em;
margin: 2em 0;
}
.add-image-option-btn {
padding: 1.2em;
border: 2px solid #ddd;
border-radius: 8px;
background: white;
font-size: 1.1em;
cursor: pointer;
transition: all 0.2s;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5em;
}
.add-image-option-btn:hover {
border-color: #007bff;
background: #f8f9fa;
transform: translateY(-2px);
box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}
.add-image-option-btn.camera {
color: #007bff;
}
.add-image-option-btn.gallery {
color: #28a745;
}
.add-image-preview-container {
margin: 1.5em 0;
display: flex;
justify-content: center;
}
.add-image-preview {
position: relative;
width: 250px;
height: 250px;
border: 2px solid #ddd;
border-radius: 8px;
overflow: hidden;
}
.add-image-preview img {
width: 100%;
height: 100%;
object-fit: cover;
}
.add-image-remove {
position: absolute;
top: 8px;
right: 8px;
background: rgba(255, 0, 0, 0.8);
color: white;
border: none;
border-radius: 50%;
width: 30px;
height: 30px;
font-size: 1.5em;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
line-height: 1;
padding: 0;
}
.add-image-remove:hover {
background: rgba(255, 0, 0, 1);
}
.add-image-actions {
display: flex;
gap: 1em;
margin-top: 1.5em;
}
.add-image-cancel,
.add-image-confirm {
flex: 1;
padding: 0.8em;
border: none;
border-radius: 6px;
font-size: 1em;
cursor: pointer;
transition: all 0.2s;
}
.add-image-cancel {
background: #f0f0f0;
color: #333;
}
.add-image-cancel:hover {
background: #e0e0e0;
}
.add-image-confirm {
background: #28a745;
color: white;
}
.add-image-confirm:hover {
background: #218838;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes slideUp {
from {
transform: translateY(30px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}