.toast-container {
position: fixed;
z-index: 999999;
pointer-events: none;
}
.toast-container * {
box-sizing: border-box;
}
.toast-container > div {
position: relative;
pointer-events: auto;
overflow: hidden;
margin: 10px;
padding: 16px;
width: 350px;
max-width: 90%;
border-radius: 10px;
background: #fff;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
color: #333;
opacity: 0;
transform: translateY(20px);
animation: slideIn 0.3s forwards;
display: flex;
align-items: center;
gap: 10px;
}
body.scdarkcolors .toast-container > div {
background: #1e1e1e;
color: #dcdcdc;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
@keyframes slideIn {
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes slideOut {
to {
opacity: 0;
transform: translateY(-20px);
}
}
@keyframes toastExit {
0% {
transform: translateY(0);
opacity: 1;
}
100% {
transform: translateY(-20px);
opacity: 0;
}
}
.toast-exit {
animation: toastExit 0.5s forwards ease-out;
}
.toast-top-center,
.toast-bottom-center,
.toast-top-full-width,
.toast-bottom-full-width,
.toast-top-left,
.toast-top-right,
.toast-bottom-right,
.toast-bottom-left,
.toast-center-center,
.toast-center-right,
.toast-center-left {
position: fixed;
}
.toast-top-center {
top: 20px;
left: 50%;
transform: translateX(-50%);
}
.toast-bottom-center {
bottom: 20px;
left: 50%;
transform: translateX(-50%);
}
.toast-top-full-width,
.toast-bottom-full-width {
left: 0;
right: 0;
width: 100%;
max-width: 100%;
margin: 0;
}
.toast-container.toast-bottom-full-width .toast,
.toast-container.toast-top-full-width .toast {
width: calc(100% - 20px) !important;
max-width: calc(100% - 20px) !important;
box-sizing: border-box;
}
.toast-top-full-width { top: 20px; }
.toast-bottom-full-width { bottom: 20px; }
.toast-top-left { top: 20px; left: 20px; }
.toast-top-right { top: 20px; right: 20px; }
.toast-bottom-right { bottom: 20px; right: 20px; }
.toast-bottom-left { bottom: 20px; left: 20px; }
.toast-center-center {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.toast-center-right {
top: 50%;
right: 20px;
transform: translateY(-50%);
}
.toast-center-left {
top: 50%;
left: 20px;
transform: translateY(-50%);
} .rtl .toast-top-left { left: auto; right: 20px; }
.rtl .toast-top-right { right: auto; left: 20px; }
.rtl .toast-bottom-right { right: auto; left: 20px; }
.rtl .toast-bottom-left { left: auto; right: 20px; }
.rtl .toast-center-right { right: auto; left: 20px; }
.rtl .toast-center-left { left: auto; right: 20px; }
.toast-container > div::before {
content: '';
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: 6px;
border-radius: 10px 0 0 10px;
}
body.scdarkcolors .toast-container > div::before {
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
}
.rtl .toast-container > div::before {
left: auto;
right: 0;
border-radius: 0 10px 10px 0;
} .toast-info::before { background: #007bff; }
.toast-success::before { background: #28a745; }
.toast-warning::before { background: #ffc107; }
.toast-error::before { background: #dc3545; }
body.scdarkcolors .toast-info { color: #a1c4fd; }
body.scdarkcolors .toast-success { color: #c3e6cb; }
body.scdarkcolors .toast-warning { color: #ffeeba; }
body.scdarkcolors .toast-error { color: #f8d7da; }
.toast-title {
font-size: 16px;
font-weight: 600;
margin-bottom: 0;
line-height: 1;
}
.toast-info .toast-title { color: #007bff; }
.toast-success .toast-title { color: #28a745; }
.toast-warning .toast-title { color: #ffc107; }
.toast-error .toast-title { color: #dc3545; }
body.scdarkcolors .toast-info .toast-title { color: #a1c4fd; }
body.scdarkcolors .toast-success .toast-title { color: #c3e6cb; }
body.scdarkcolors .toast-warning .toast-title { color: #ffeeba; }
body.scdarkcolors .toast-error .toast-title { color: #f8d7da; }
.toast-message {
font-size: 14px;
line-height: 1.5;
word-break: break-word;
direction: ltr;
}
.rtl .toast-message { direction: rtl; }
.toast-message a,
.toast-message label {
color: #007bff;
text-decoration: none;
}
.toast-message a:hover {
color: #0056b3;
text-decoration: underline;
}
body.scdarkcolors .toast-message a,
body.scdarkcolors .toast-message label { color: #a1c4fd; }
body.scdarkcolors .toast-message a:hover { color: #c3e6cb; }
.toast-close-button {
position: absolute;
top: 12px;
right: 12px;
font-size: 16px;
color: #666;
background: none;
border: none;
cursor: pointer;
opacity: 0.8;
transition: opacity 0.2s ease;
}
body.scdarkcolors .toast-close-button { color: #dcdcdc; }
.toast-close-button:hover,
.toast-close-button:focus {
opacity: 1;
color: #000;
}
body.scdarkcolors .toast-close-button:hover,
body.scdarkcolors .toast-close-button:focus { color: #fff; }
.rtl .toast-close-button {
right: auto;
left: 12px;
}
.toast-progress {
position: absolute;
bottom: 0;
height: 4px;
background: rgba(0, 0, 0, 0.2);
transition: width 0.3s ease;
direction: ltr;
}
body.scdarkcolors .toast-progress {
background: rgba(255, 255, 255, 0.2);
}
.rtl .toast-progress {
direction: rtl;
right: 0;
left: auto;
}
@media (max-width: 480px) {
.toast-container > div {
width: 300px;
padding: 12px 32px 12px 12px;
}
.rtl .toast-container > div {
padding: 12px 12px 12px 32px;
}
.toast-title { font-size: 15px; }
.toast-message { font-size: 13px; }
.toast-close-button {
top: 10px;
right: 10px;
font-size: 14px;
}
}
@media (max-width: 320px) {
.toast-container > div {
width: 90%;
padding: 10px 28px 10px 10px;
}
.rtl .toast-container > div {
padding: 10px 10px 10px 28px;
}
}