frontend_nyla/src/components/UiComponents/Popup/Popup.module.css

271 lines
No EOL
4.7 KiB
CSS

/* Overlay that covers the entire screen */
.overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
padding: 20px;
}
/* Main popup container */
.popup {
border: 1px solid var(--color-primary);
background: var(--color-bg);
border-radius: 25px;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
max-height: 90vh;
display: flex;
flex-direction: column;
overflow: hidden;
animation: popupSlideIn 0.2s ease-out;
}
/* Size variants */
.small {
max-width: 400px;
min-width: 300px;
}
.medium {
max-width: 600px;
min-width: 400px;
}
.large {
max-width: 900px;
min-width: 600px;
}
.fullscreen {
width: 95vw;
height: 95vh;
max-width: none;
max-height: none;
}
/* Popup animation */
@keyframes popupSlideIn {
from {
opacity: 0;
transform: scale(0.9) translateY(-20px);
}
to {
opacity: 1;
transform: scale(1) translateY(0);
}
}
/* Header section */
.header {
padding: 20px 24px 16px;
border-bottom: 1px solid var(--color-primary);
display: flex;
justify-content: space-between;
align-items: center;
background: var(--color-bg);
flex-shrink: 0;
}
.title {
margin: 0;
font-size: 18px;
font-weight: 400;
color: var(--color-text);
flex: 1;
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.headerActions {
display: flex;
align-items: center;
gap: 8px;
flex-shrink: 0;
margin-left: 16px;
}
.actionButton {
display: flex;
height: 35px;
width: 35px;
align-items: center;
justify-content: center;
gap: 6px;
padding: 15px;
border: none;
border-radius: 25px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
white-space: nowrap;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: var(--color-secondary);
color: white;
}
.actionButton:hover {
background: var(--color-secondary-hover);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.actionButton:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.spinner {
width: 14px;
height: 14px;
border: 2px solid transparent;
border-top: 2px solid currentColor;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.closeButton {
background: var(--color-primary);
border: none;
font-size: 18px;
color: #3A3A3A;
cursor: pointer;
padding: 8px;
border-radius: 25px;
transition: all 0.2s ease;
line-height: 1;
margin-left: 8px;
display: flex;
align-items: center;
justify-content: center;
height: 35px;
width: 35px;
}
.closeButton:hover {
background-color: var(--color-primary-hover);
color: #3A3A3A;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
/* Content section */
.content {
padding: 24px;
overflow-y: auto;
flex: 1;
}
/* Footer section */
.footer {
padding: 16px 24px;
border-top: 1px solid var(--color-primary);
display: flex;
justify-content: flex-end;
gap: 12px;
background: var(--color-bg);
flex-shrink: 0;
}
/* Dark mode support for action buttons */
[data-theme="dark"] .actionButton.primary {
background: #3182ce;
}
[data-theme="dark"] .actionButton.primary:hover:not(:disabled) {
background: #2c5aa0;
box-shadow: 0 2px 4px rgba(49, 130, 206, 0.3);
}
[data-theme="dark"] .actionButton.secondary {
background: #4a5568;
}
[data-theme="dark"] .actionButton.secondary:hover:not(:disabled) {
background: #2d3748;
box-shadow: 0 2px 4px rgba(74, 85, 104, 0.3);
}
[data-theme="dark"] .actionButton.success {
background: #38a169;
}
[data-theme="dark"] .actionButton.success:hover:not(:disabled) {
background: #2f855a;
box-shadow: 0 2px 4px rgba(56, 161, 105, 0.3);
}
[data-theme="dark"] .actionButton.danger {
background: #e53e3e;
}
[data-theme="dark"] .actionButton.danger:hover:not(:disabled) {
background: #c53030;
box-shadow: 0 2px 4px rgba(229, 62, 62, 0.3);
}
/* Responsive design */
@media (max-width: 640px) {
.popup {
margin: 10px;
}
.small,
.medium,
.large {
min-width: 280px;
width: 100%;
}
.fullscreen {
width: 100vw;
height: 100vh;
border-radius: 0;
}
.content {
padding: 16px;
}
.header {
padding: 16px;
flex-direction: column;
gap: 12px;
align-items: stretch;
}
.title {
text-align: center;
margin-bottom: 8px;
}
.headerActions {
justify-content: center;
flex-wrap: wrap;
margin-left: 0;
}
.actionButton {
padding: 6px 12px;
font-size: 12px;
}
.footer {
padding: 12px 16px;
flex-direction: column-reverse;
}
}