create-nexaui-electron
Version:
Create Nexa App - Tool untuk membuat aplikasi Nexa Electron
1,252 lines (1,052 loc) • 26.5 kB
CSS
.nx-modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
opacity: 0;
transition: opacity 0.3s ease-in-out;
}
.nx-modal.show {
opacity: 1;
}
.nx-modal-content {
background-color: #fff;
margin: 10% auto;
padding: 0;
width: 50%;
border-radius: 4px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
transform: translateY(-20px);
transition: transform 0.3s ease-in-out;
}
.nx-modal.show .nx-modal-content {
transform: translateY(0);
}
/* Responsivitas untuk layar mobile */
.nx-modal-header {
padding: 1rem;
border-bottom: 1px solid #dee2e6;
display: flex;
justify-content: space-between;
align-items: center;
}
.nx-modal-body {
padding: 1rem;
}
.nx-modal-footer {
padding: 1rem;
border-top: 1px solid #dee2e6;
display: flex;
justify-content: flex-end;
gap: 0.5rem;
}
.nx-close {
width: 24px;
height: 24px;
padding: 0;
border: none;
background: transparent;
color: #666;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
transition: all 0.2s ease;
position: relative;
margin-left: 8px;
}
/* Modern X icon using pseudo-elements */
.nx-close::before,
.nx-close::after {
content: '';
position: absolute;
width: 14px;
height: 2px;
background-color: currentColor;
border-radius: 1px;
transition: all 0.2s ease;
}
.nx-close::before {
transform: rotate(45deg);
}
.nx-close::after {
transform: rotate(-45deg);
}
/* Hover effect */
.nx-close:hover {
background-color: rgba(0,0,0,0.05);
color: #333;
}
/* Active/Click effect */
.nx-close:active {
background-color: rgba(0,0,0,0.1);
transform: scale(0.95);
}
/* Remove default text content */
.nx-close span {
display: none;
}
/* Focus state */
.nx-close:focus {
outline: none;
box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}
/* Dark mode support */
@media (prefers-color-scheme: dark) {
.nx-close {
color: #999;
}
.nx-close:hover {
background-color: rgba(255,255,255,0.1);
color: #fff;
}
.nx-close:active {
background-color: rgba(255,255,255,0.15);
}
}
/* Tambahan untuk aksesibilitas focus */
.nx-modal:focus,
.nx-modal-content:focus,
.nx-close:focus {
outline: 2px solid #0066cc;
outline-offset: 2px;
}
/* Tambahan untuk keyboard navigation */
.nx-modal-footer .btn:focus {
box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0066cc;
}
/* Modal Sizes */
.nx-modal-sm .nx-modal-content {
width: 300px;
}
.nx-modal-lg .nx-modal-content {
width: 800px;
}
.nx-modal-fullscreen {
padding: 0;
z-index: 41000;
}
.nx-modal-fullscreen .nx-modal-content {
width: 100%;
height: 100%;
margin: 0;
border-radius: 0;
}
/* Modal Variations */
.nx-modal-centered .nx-modal-content {
margin: 0;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) ;
max-height: 90vh;
width: 50%;
}
/* Responsive untuk modal centered */
@media (max-width: 768px) {
.nx-modal-centered .nx-modal-content {
width: 90%;
max-height: 80vh;
}
}
/* Responsive adjustments */
@media (max-width: 768px) {
.nx-modal-lg .nx-modal-content {
width: 90%;
}
.nx-modal-sm .nx-modal-content {
width: 80%;
}
}
/* Scrollable Modal */
.nx-modal-scrollable .nx-modal-content {
max-height:60vh;
display: flex;
flex-direction: column;
}
.nx-modal-body::-webkit-scrollbar {
width: 5px;
}
.nx-modal-body::-webkit-scrollbar-thumb {
background-color: #888;
border-radius: 8px;
}
.nx-modal-body::-webkit-scrollbar-thumb:hover {
background-color: #555;
}
.nx-modal-scrollable .nx-modal-body {
overflow-y: auto;
flex: 1 1 auto;
min-height: 0;
}
/* Static Modal */
.nx-modal-static .nx-modal-content {
animation: modalShake 0.3s ease-in-out;
}
@keyframes modalShake {
0%, 100% { transform: translateX(0); }
25% { transform: translateX(-5px); }
75% { transform: translateX(5px); }
}
/* Tambahkan animasi untuk modal */
.nx-modal {
transition: opacity 0.3s ease-in-out;
}
.nx-modal-content {
transition: transform 0.3s ease-in-out;
}
.nx-modal.show .nx-modal-content {
transform: translateY(0);
}
/* Modal Animations */
.nx-modal-fade {
opacity: 0;
transition: opacity 0.3s ease-in-out;
}
.nx-modal-fade.show {
opacity: 1;
}
.nx-modal-slide .nx-modal-content {
transform: translateY(-100%);
transition: transform 0.3s ease-in-out;
}
.nx-modal-slide.show .nx-modal-content {
transform: translateY(0);
}
.nx-modal-zoom .nx-modal-content {
transform: scale(0.7);
opacity: 0;
transition: all 0.3s ease-in-out;
}
.nx-modal-zoom.show .nx-modal-content {
transform: scale(1);
opacity: 1;
}
/* Keyboard Events Styling */
kbd {
background-color: #f8f9fa;
border: 1px solid #dee2e6;
border-radius: 3px;
padding: 2px 6px;
font-size: 0.875em;
}
/* Alert Styling untuk Callbacks */
.alert {
padding: 0.75rem 1.25rem;
margin-bottom: 1rem;
border: 1px solid transparent;
border-radius: 0.25rem;
}
.alert-success {
color: #155724;
background-color: #d4edda;
border-color: #c3e6cb;
}
.alert-info {
color: #0c5460;
background-color: #d1ecf1;
border-color: #bee5eb;
}
/* Accessibility Styles */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
/* Focus Styles */
.nx-modal *:focus {
outline: 2px solid #0066cc;
outline-offset: 2px;
}
/* High Contrast Mode Support */
@media (forced-colors: active) {
.nx-modal-content {
border: 2px solid ButtonText;
}
.nx-close {
border: 1px solid ButtonText;
}
}
/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
.nx-modal,
.nx-modal-content {
transition: none;
}
}
/* Modal Interactions */
.nx-modal-draggable .nx-modal-content {
position: fixed;
margin: 0;
transform: none;
transition: none;
width: auto;
max-width: 90%;
max-height: 90vh;
}
.nx-modal-draggable .nx-modal-header {
cursor: move;
user-select: none;
padding: 1rem;
background: #f8f9fa;
}
.nx-modal-draggable .nx-modal-content.dragging {
opacity: 0.95;
box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.nx-modal-resizable .nx-modal-content {
position: relative;
resize: both;
overflow-y: hidden;
/* overflow: auto;*/
min-width: 300px;
min-height: 200px;
}
.nx-modal-resizable .nx-modal-content::after {
content: '';
position: absolute;
bottom: 0;
right: 0;
width: 15px;
height: 15px;
cursor: se-resize;
background: linear-gradient(135deg, transparent 50%, #ddd 50%);
}
/* Modal Stacking */
.nx-modal-stacking {
z-index: 1050;
}
.nx-modal-stacking.active {
z-index: 1051;
}
.nx-modal-stacking .nx-modal-content {
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
/* Custom Animations */
.nx-modal-custom-animation {
--animation-duration: 0.5s;
--animation-timing: cubic-bezier(0.4, 0, 0.2, 1);
}
/* Flip Animation */
.nx-modal-custom-animation.flip .nx-modal-content {
transform: perspective(1000px) rotateX(-90deg);
transition: transform var(--animation-duration) var(--animation-timing);
}
.nx-modal-custom-animation.flip.show .nx-modal-content {
transform: perspective(1000px) rotateX(0);
}
/* Swing Animation */
.nx-modal-custom-animation.swing .nx-modal-content {
transform: rotateY(-70deg);
transition: transform var(--animation-duration) var(--animation-timing);
}
.nx-modal-custom-animation.swing.show .nx-modal-content {
transform: rotateY(0);
}
/* Bounce Animation */
@keyframes modalBounce {
0%, 20%, 50%, 80%, 100% {
transform: translateY(0);
}
40% {
transform: translateY(-30px);
}
60% {
transform: translateY(-15px);
}
}
.nx-modal-custom-animation.bounce .nx-modal-content {
animation: modalBounce var(--animation-duration) var(--animation-timing);
}
/* Transition Timing */
.nx-modal-transition-timing.ease .nx-modal-content {
transition-timing-function: ease;
}
.nx-modal-transition-timing.ease-in .nx-modal-content {
transition-timing-function: ease-in;
}
.nx-modal-transition-timing.ease-out .nx-modal-content {
transition-timing-function: ease-out;
}
.nx-modal-transition-timing.ease-in-out .nx-modal-content {
transition-timing-function: ease-in-out;
}
/* Special Effects */
.nx-modal-effects.blur {
backdrop-filter: blur(5px);
}
.nx-modal-effects.glass .nx-modal-content {
background: rgba(255, 255, 255, 0.8);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.3);
}
.nx-modal-effects.neon .nx-modal-content {
box-shadow: 0 0 10px rgba(0, 123, 255, 0.5),
0 0 20px rgba(0, 123, 255, 0.3),
0 0 30px rgba(0, 123, 255, 0.1);
}
.nx-modal-effects.shadow-pulse .nx-modal-content {
animation: shadowPulse 2s infinite;
}
@keyframes shadowPulse {
0% {
box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.4);
}
70% {
box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
}
100% {
box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
}
}
/* Modal Themes */
.nx-modal-themes {
--modal-primary: #0d6efd;
--modal-secondary: #6c757d;
--modal-success: #198754;
--modal-danger: #dc3545;
--modal-warning: #ffc107;
--modal-info: #0dcaf0;
--modal-light: #f8f9fa;
--modal-dark: #212529;
}
/* Theme: Light */
.nx-modal-themes.theme-light .nx-modal-content {
background: var(--modal-light);
color: var(--modal-dark);
}
.nx-modal-themes.theme-light .nx-modal-header {
background: #ffffff;
border-bottom: 1px solid rgba(0,0,0,0.1);
}
/* Theme: Dark */
.nx-modal-themes.theme-dark .nx-modal-content {
background: var(--modal-dark);
color: #fff;
}
.nx-modal-themes.theme-dark .nx-modal-header {
background: #2c3034;
border-bottom: 1px solid rgba(255,255,255,0.1);
}
.nx-modal-themes.theme-dark .nx-close {
color: #fff;
}
/* Theme: Colorful */
.nx-modal-themes.theme-primary .nx-modal-header {
background: var(--modal-primary);
color: #fff;
}
.nx-modal-themes.theme-success .nx-modal-header {
background: var(--modal-success);
color: #fff;
}
/* Custom Layouts */
.nx-modal-layouts.layout-sidebar .nx-modal-content {
display: flex;
max-width: 900px;
}
.nx-modal-layouts.layout-sidebar .nx-modal-sidebar {
width: 250px;
background: #f8f9fa;
padding: 1rem;
border-right: 1px solid #dee2e6;
}
.nx-modal-layouts.layout-sidebar .nx-modal-main {
flex: 1;
display: flex;
flex-direction: column;
}
/* Layout: Split */
.nx-modal-layouts.layout-split .nx-modal-body {
display: flex;
gap: 1rem;
}
.nx-modal-layouts.layout-split .split-left,
.nx-modal-layouts.layout-split .split-right {
flex: 1;
padding: 1rem;
}
/* Layout: Tabs */
.nx-modal-layouts.layout-tabs .nx-modal-body {
padding: 0;
}
.nx-modal-tab-nav {
display: flex;
border-bottom: 1px solid #dee2e6;
padding: 0.5rem 1rem 0;
background: #f8f9fa;
}
.nx-modal-tab {
padding: 0.5rem 1rem;
cursor: pointer;
border: 1px solid transparent;
border-bottom: none;
margin-bottom: -1px;
border-radius: 4px 4px 0 0;
}
.nx-modal-tab.active {
background: #fff;
border-color: #dee2e6;
color: var(--modal-primary);
}
.nx-modal-tab-content {
padding: 1rem;
}
.nx-modal-tab-pane {
display: none;
}
.nx-modal-tab-pane.active {
display: block;
}
/* Additional Components */
.nx-modal-components .nx-modal-toolbar {
padding: 0.5rem 1rem;
background: #f8f9fa;
border-bottom: 1px solid #dee2e6;
display: flex;
gap: 0.5rem;
}
.nx-modal-components .nx-modal-sidebar-toggle {
width: 24px;
height: 24px;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
border: none;
background: none;
cursor: pointer;
}
.nx-modal-components .nx-modal-search {
position: relative;
flex: 1;
}
.nx-modal-components .nx-modal-search-icon {
position: absolute;
right: 0.75rem;
top: 50%;
transform: translateY(-50%);
color: #6c757d;
}
/* Status Bar */
.nx-modal-components .nx-modal-statusbar {
padding: 0.5rem 1rem;
background: #f8f9fa;
border-top: 1px solid #dee2e6;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 0.875rem;
color: #6c757d;
}
/* Breadcrumbs */
.nx-modal-components .nx-modal-breadcrumb {
padding: 0.5rem 1rem;
background: #f8f9fa;
border-bottom: 1px solid #dee2e6;
}
.nx-modal-breadcrumb ul {
display: flex;
list-style: none;
margin: 0;
padding: 0;
gap: 0.5rem;
}
.nx-modal-breadcrumb li:not(:last-child)::after {
content: '/';
margin-left: 0.5rem;
color: #6c757d;
}
/* Performance Optimizations */
.nx-modal-placeholder {
text-align: center;
padding: 2rem;
background: #f8f9fa;
}
.nx-modal-loading {
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
}
/* Optimize animations */
@media (prefers-reduced-motion: reduce) {
.nx-modal * {
animation-duration: 0.01ms ;
animation-iteration-count: 1 ;
transition-duration: 0.01ms ;
scroll-behavior: auto ;
}
}
/* Optimize rendering */
.nx-modal {
will-change: opacity;
contain: content;
}
.nx-modal-content {
will-change: transform;
contain: layout style paint;
}
/* Memory optimization indicators */
.nx-modal.optimized::after {
content: '✓';
position: absolute;
top: 0.5rem;
right: 0.5rem;
color: #28a745;
font-size: 0.875rem;
}
/* Mobile & Touch Optimizations */
/* Touch Gestures */
.nx-modal-touch {
touch-action: none; /* Prevent browser handling of touch events */
}
.nx-modal-touch .nx-modal-content {
-webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
overscroll-behavior: contain; /* Prevent scroll chaining */
}
/* Swipe to Close */
.nx-modal-swipeable .nx-modal-content {
transform: translateY(0);
transition: transform 0.3s ease-out;
will-change: transform;
}
.nx-modal-swipeable.swiping .nx-modal-content {
transition: none;
}
.nx-modal-swipeable.swipe-close .nx-modal-content {
transform: translateY(100%);
}
/* Mobile Responsive Adjustments */
@media (max-width: 576px) {
.nx-modal-content {
width: 100% ;
margin: 0;
border-radius: 0;
min-height: 100%;
}
.nx-modal-centered .nx-modal-content {
min-height: auto;
border-radius: 8px;
margin: 1rem;
width: calc(100% - 2rem) ;
}
.nx-modal-bottom-sheet .nx-modal-content {
position: fixed;
bottom: 0;
border-radius: 16px 16px 0 0;
max-height: 90vh;
}
/* Adjust header for better touch targets */
.nx-modal-header {
padding: 1rem;
min-height: 56px;
}
.nx-close {
padding: 12px;
font-size: 24px;
}
/* Adjust footer for better touch targets */
.nx-modal-footer {
padding: 1rem;
gap: 1rem;
}
.nx-modal-footer .btn {
flex: 1;
padding: 12px;
font-size: 16px;
}
}
/* Mobile Performance Optimizations */
@media (max-width: 576px) {
.nx-modal {
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
perspective: 1000;
transform: translateZ(0);
}
.nx-modal * {
-webkit-tap-highlight-color: transparent;
}
}
/* Safe Area Support */
@supports(padding: max(0px)) {
.nx-modal-content {
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
padding-bottom: env(safe-area-inset-bottom);
}
}
/* Optimasi Draggable Modal */
.nx-modal-draggable .nx-modal-content {
will-change: transform;
transform: translate3d(0, 0, 0);
backface-visibility: hidden;
perspective: 1000px;
}
.nx-modal-draggable .nx-modal-content.gpu-accelerated {
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.nx-modal-draggable .nx-modal-content.dragging {
cursor: grabbing ;
user-select: none;
}
/* Optimasi untuk header saat drag */
.nx-modal-draggable .nx-modal-header {
cursor: grab;
touch-action: none;
}
.nx-modal-draggable .nx-modal-header:active {
cursor: grabbing;
}
/* Draggable Modal Styling */
.nx-modal-draggable .nx-modal-content {
position: fixed;
margin: 0;
transform: none;
transition: none;
width: auto;
max-width: 90%;
max-height: 90vh;
}
.nx-modal-draggable .nx-modal-header {
cursor: move;
user-select: none;
padding: 1rem;
background: var(--bg-modal);
}
.nx-modal-draggable .nx-modal-content.dragging {
opacity: 0.95;
box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
/* Snap indicators */
.nx-modal-draggable .nx-modal-content::before {
content: '';
position: absolute;
inset: -10px;
border: 2px dashed transparent;
pointer-events: none;
transition: border-color 0.2s;
}
.nx-modal-draggable .nx-modal-content.dragging::before {
border-color: rgba(0,0,0,0.1);
}
/* Override jQuery UI styles */
.ui-draggable {
will-change: transform;
}
.ui-draggable-dragging {
transition: none ;
z-index: 1100 ;
}
/* Window Controls - Modern Style */
.nx-modal-controls {
display: flex;
align-items: center;
gap: 6px;
margin-right: 12px;
position: absolute;
right: 32px;
}
/* Base style untuk semua tombol controls */
.nx-modal-controls button {
width: 28px;
height: 28px;
padding: 0;
border: none;
border-radius: 4px;
background: transparent;
color: #666;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
position: relative;
transition: all 0.2s ease;
}
/* Modern icons menggunakan pseudo-elements */
.nx-btn-minimize::before {
content: '';
width: 12px;
height: 2px;
background-color: currentColor;
border-radius: 1px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.nx-btn-maximize::before {
content: '';
width: 12px;
height: 12px;
border: 2px solid currentColor;
border-radius: 1px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.nx-btn-restore::before {
content: '';
width: 10px;
height: 10px;
border: 2px solid currentColor;
border-radius: 1px;
position: absolute;
top: 45%;
left: 45%;
}
.nx-btn-restore::after {
content: '';
width: 10px;
height: 10px;
border: 2px solid currentColor;
border-radius: 1px;
position: absolute;
top: 55%;
left: 55%;
background: white;
z-index: 1;
}
/* Hover effects */
.nx-modal-controls button:hover {
background-color: rgba(0,0,0,0.05);
color: #333;
}
/* Active/Click effects */
.nx-modal-controls button:active {
background-color: rgba(0,0,0,0.1);
transform: scale(0.95);
}
/* Focus effects */
.nx-modal-controls button:focus {
outline: none;
box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}
/* Dark mode support */
@media (prefers-color-scheme: dark) {
.nx-modal-controls button {
color: #999;
}
.nx-modal-controls button:hover {
background-color: rgba(255,255,255,0.1);
color: #fff;
}
.nx-modal-controls button:active {
background-color: rgba(255,255,255,0.15);
}
.nx-btn-restore::after {
background: #333;
}
}
.nx-modal-header .nx-close {
margin-left: 8px;
}
.nx-modal-header {
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
padding: 0.75rem 1rem;
}
.nx-modal-header h5 {
margin: 0;
flex: 1;
}
/* State Classes */
.nx-modal.minimized .nx-modal-content {
position: fixed;
bottom: 0;
right: 20px;
width: 300px ;
height: auto ;
}
.nx-modal.minimized .nx-modal-body,
.nx-modal.minimized .nx-modal-footer {
display: none;
}
.nx-modal.maximized {
padding: 0 ;
z-index:50000;
}
.nx-modal.maximized .nx-modal-content {
position: fixed ;
top: 0 ;
left: 0 ;
right: 0 ;
bottom: 0 ;
width: 100% ;
height: 100% ;
max-width: 100% ;
max-height: 100% ;
margin: 0 ;
padding: 0 ;
border-radius: 0 ;
transform: none ;
}
.nx-modal.maximized .nx-modal-body {
height: calc(100vh - var(--header-height) - var(--footer-height));
overflow-y: auto;
padding: 1rem;
}
.nx-modal.maximized .nx-modal-header {
border-radius: 0;
padding: 1rem;
}
.nx-modal.maximized .nx-modal-footer {
padding: 1rem;
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: #fff;
}
/* Transisi untuk animasi smooth */
.nx-modal-content {
transition: all 0.3s ease-in-out;
}
/* Default state - untuk restore */
.nx-modal-content {
position: relative;
width: 50%;
margin: 10% auto;
max-width: 90%;
max-height: 90vh;
background: var(--bg-modal);
border-radius: 4px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
transition: all 0.3s ease-in-out;
}
.nx-modal-body {
height: auto;
max-height: calc(90vh - 120px);
overflow-y: auto;
padding: 1rem;
}
.nx-modal-footer {
position: relative;
bottom: auto;
padding: 1rem;
border-top: 1px solid #dee2e6;
}
/* Multiple Modals */
.nx-modal-backdrop {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
opacity: 0;
transition: opacity 0.3s ease;
}
.nx-modal-backdrop.show {
opacity: 1;
}
/* Adjust spacing for stacked modals */
.nx-modal-stacking:not(:first-of-type) {
margin-top: 2rem;
margin-left: 2rem;
}
/* Visual indication for active modal */
.nx-modal-stacking.active .nx-modal-content {
border: 2px solid #0d6efd;
}
/* Improve focus management */
.nx-modal-stacking:focus {
outline: none;
}
.nx-modal-stacking.active:focus .nx-modal-content {
box-shadow: 0 0 0 3px rgba(13,110,253,0.25);
}
/* Modal Settings */
.nx-modal-no-backdrop {
background-color: transparent;
}
.nx-modal:not(.nx-modal-has-footer) .nx-modal-footer {
/* display: none;*/
}
/* Animation Settings */
.nx-modal-fade {
opacity: 0;
transition: opacity 0.3s ease;
}
.nx-modal-fade.show {
opacity: 1;
}
.nx-modal-slide {
transform: translateY(-100%);
transition: transform 0.3s ease;
}
.nx-modal-slide.show {
transform: translateY(0);
}
/* Position Settings */
.nx-modal-centered .nx-modal-content {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
/* Window Controls Styling */
.nx-modal-header.has-controls {
display: flex;
align-items: center;
padding-right: 80px; /* Ruang untuk controls */
}
.nx-modal-header.has-controls h5 {
flex: 1;
margin: 0;
}
.nx-modal-controls {
display: flex;
gap: 8px;
margin-right: 8px;
position: absolute;
right: 40px;
}
.nx-modal-controls button {
width: 28px;
height: 28px;
padding: 0;
border: none;
background: transparent;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
color: #666;
transition: all 0.2s ease;
}
.nx-modal-controls button:hover {
background-color: rgba(0,0,0,0.05);
}
.nx-modal-controls button:active {
background-color: rgba(0,0,0,0.1);
}
/* Dark mode */
@media (prefers-color-scheme: dark) {
.nx-modal-controls button {
color: #999;
}
.nx-modal-controls button:hover {
background-color: rgba(255,255,255,0.1);
}
.nx-modal-controls button span span {
background-color: #333 ;
}
}