mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-09-27 20:11:15 +02:00
162 lines
2.6 KiB
CSS
162 lines
2.6 KiB
CSS
/* Toast Container */
|
|
#toast-container {
|
|
position: fixed;
|
|
top: 140px;
|
|
right: 20px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
z-index: 9999;
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* Toast */
|
|
.toast {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 14px 16px;
|
|
background-color: rgba(30, 30, 30, 0.9);
|
|
backdrop-filter: blur(12px);
|
|
-webkit-backdrop-filter: blur(12px);
|
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
border-radius: 10px;
|
|
color: #f3f4f6;
|
|
font-family: inherit;
|
|
font-size: 0.875rem;
|
|
max-width: 320px;
|
|
min-width: 220px;
|
|
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
|
|
animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
pointer-events: auto;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Toast Icon */
|
|
.toast-icon {
|
|
flex-shrink: 0;
|
|
font-size: 20px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.toast-icon svg {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.toast.success .toast-icon {
|
|
color: #22c55e;
|
|
}
|
|
|
|
.toast.error .toast-icon {
|
|
color: #ef4444;
|
|
}
|
|
|
|
.toast.warning .toast-icon {
|
|
color: #f59e0b;
|
|
}
|
|
|
|
.toast.info .toast-icon {
|
|
color: #0ea5e9;
|
|
}
|
|
|
|
/* Toast Message */
|
|
.toast-message {
|
|
flex: 1;
|
|
font-weight: 400;
|
|
line-height: 1.4;
|
|
word-break: break-word;
|
|
}
|
|
|
|
/* Toast Close Button */
|
|
.toast-close {
|
|
flex-shrink: 0;
|
|
background: none;
|
|
border: none;
|
|
color: #9ca3af;
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
width: 24px;
|
|
height: 24px;
|
|
border-radius: 4px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: background-color 0.15s ease, color 0.15s ease;
|
|
}
|
|
|
|
.toast-close:hover {
|
|
background-color: rgba(255, 255, 255, 0.1);
|
|
color: #ffffff;
|
|
}
|
|
|
|
.toast-progress {
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 0;
|
|
height: 3px;
|
|
width: 100%;
|
|
background-color: rgba(255, 255, 255, 0.1);
|
|
animation: progress var(--toast-duration, 4000ms) linear forwards;
|
|
}
|
|
|
|
.toast.success .toast-progress {
|
|
background-color: #22c55e;
|
|
}
|
|
|
|
.toast.error .toast-progress {
|
|
background-color: #ef4444;
|
|
}
|
|
|
|
/* Animations */
|
|
@keyframes slideIn {
|
|
from {
|
|
transform: translateY(-20px);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: translateY(0);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
@keyframes slideOut {
|
|
from {
|
|
transform: translateY(0);
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
transform: translateY(-20px);
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
@keyframes progress {
|
|
from {
|
|
width: 100%;
|
|
}
|
|
to {
|
|
width: 0%;
|
|
}
|
|
}
|
|
|
|
.toast.removing {
|
|
animation: slideOut 0.25s ease-in forwards;
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
#toast-container {
|
|
top: auto;
|
|
bottom: 16px;
|
|
right: 16px;
|
|
left: 16px;
|
|
}
|
|
|
|
.toast {
|
|
max-width: none;
|
|
min-width: auto;
|
|
}
|
|
} |