@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

*, ::before, ::after {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

/* Toast Container */
.vironeer-toasts {
    position: fixed;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    top: 16px;
    right: 16px;
    padding: 0;
    width: 380px;
    max-width: calc(100vw - 32px);
    z-index: 9999999;
    pointer-events: none;
}

.vironeer-toast-bottom-right {
    top: auto;
    bottom: 16px;
    right: 16px;
    flex-direction: column-reverse;
}

.vironeer-toast-top-left {
    top: 16px;
    left: 16px;
    right: auto;
}

.vironeer-toast-bottom-left {
    top: auto;
    right: auto;
    left: 16px;
    bottom: 16px;
    flex-direction: column-reverse;
}

.vironeer-toast-top-center {
    top: 16px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
}

.vironeer-toast-bottom-center {
    top: auto;
    bottom: 16px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: column-reverse;
}

/* Toast Card */
.vironeer-toast {
    position: relative;
    width: 100%;
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.42), 0 4px 12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    margin: 0;
    flex-shrink: 0;
    animation: toastSlideIn 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.vironeer-toast:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px -4px rgba(0, 0, 0, 0.5), 0 6px 16px rgba(0, 0, 0, 0.3);
}

.vironeer-toast.close-animation {
    opacity: 0 !important;
    transform: translateX(40px) scale(0.94) !important;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.vironeer-toast-top-left .vironeer-toast,
.vironeer-toast-bottom-left .vironeer-toast {
    animation-name: toastSlideInLeft;
}

.vironeer-toast-top-left .vironeer-toast.close-animation,
.vironeer-toast-bottom-left .vironeer-toast.close-animation {
    transform: translateX(-40px) scale(0.94) !important;
}

.vironeer-toast-top-center .vironeer-toast,
.vironeer-toast-bottom-center .vironeer-toast {
    animation-name: toastSlideInCenter;
}

.vironeer-toast-top-center .vironeer-toast.close-animation,
.vironeer-toast-bottom-center .vironeer-toast.close-animation {
    transform: translateY(-20px) scale(0.9) !important;
}

/* Close Button */
.vironeer-toast-close {
    position: absolute;
    top: 13px;
    right: 13px;
    background: transparent;
    outline: none;
    border: 0;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.55;
    transition: all 0.2s ease;
    z-index: 10;
}

[dir="rtl"] .vironeer-toast-close {
    right: auto;
    left: 13px;
}

.vironeer-toast-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.1);
}

.vironeer-toast-close-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 13px 13px;
}

/* Toast Content */
.vironeer-toast-content {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 16px 18px;
    color: #f8fafc;
}

.vironeer-toast-auto-close .vironeer-toast-content {
    padding-bottom: 20px;
}

/* Toast Icon Badge */
.vironeer-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    background-size: 20px 20px;
    background-position: center;
    background-repeat: no-repeat;
    margin: 0;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

/* Context & Typography */
.vironeer-toast-context {
    flex: 1;
    min-width: 0;
    padding-right: 18px;
    line-height: 1.4;
}

[dir="rtl"] .vironeer-toast-context {
    padding-right: 0;
    padding-left: 18px;
}

.vironeer-toast-title {
    font-size: 0.94rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 3px 0;
    letter-spacing: -0.2px;
}

.vironeer-toast-text {
    font-size: 0.86rem;
    color: #cbd5e1;
    margin: 0;
    font-weight: 400;
    line-height: 1.45;
    word-break: break-word;
}

/* Progress Bar */
.vironeer-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3.5px;
    width: 0;
    transition-timing-function: linear;
    transition: linear 10ms;
}

/* ==================== THEME ACCENTS ==================== */

/* SUCCESS */
.vironeer-toast-success {
    border-left: 4px solid #10b981;
    box-shadow: 0 14px 34px -4px rgba(16, 185, 129, 0.22), 0 4px 12px rgba(0, 0, 0, 0.35);
}
[dir="rtl"] .vironeer-toast-success {
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    border-right: 4px solid #10b981;
}
.vironeer-toast-success .vironeer-toast-icon {
    background-color: rgba(16, 185, 129, 0.16);
    border: 1.5px solid rgba(16, 185, 129, 0.35);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}
.vironeer-toast-success-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
}
.vironeer-toast-success .vironeer-toast-progress {
    background: linear-gradient(90deg, #10b981, #34d399);
}

/* ERROR */
.vironeer-toast-error {
    border-left: 4px solid #ef4444;
    box-shadow: 0 14px 34px -4px rgba(239, 68, 68, 0.22), 0 4px 12px rgba(0, 0, 0, 0.35);
}
[dir="rtl"] .vironeer-toast-error {
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    border-right: 4px solid #ef4444;
}
.vironeer-toast-error .vironeer-toast-icon {
    background-color: rgba(239, 68, 68, 0.16);
    border: 1.5px solid rgba(239, 68, 68, 0.35);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.2);
}
.vironeer-toast-error-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='15' y1='9' x2='9' y2='15'%3E%3C/line%3E%3Cline x1='9' y1='9' x2='15' y2='15'%3E%3C/line%3E%3C/svg%3E");
}
.vironeer-toast-error .vironeer-toast-progress {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

/* WARNING */
.vironeer-toast-warning {
    border-left: 4px solid #f59e0b;
    box-shadow: 0 14px 34px -4px rgba(245, 158, 11, 0.22), 0 4px 12px rgba(0, 0, 0, 0.35);
}
[dir="rtl"] .vironeer-toast-warning {
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    border-right: 4px solid #f59e0b;
}
.vironeer-toast-warning .vironeer-toast-icon {
    background-color: rgba(245, 158, 11, 0.16);
    border: 1.5px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}
.vironeer-toast-warning-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'%3E%3C/path%3E%3Cline x1='12' y1='9' x2='12' y2='13'%3E%3C/line%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'%3E%3C/line%3E%3C/svg%3E");
}
.vironeer-toast-warning .vironeer-toast-progress {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* INFO */
.vironeer-toast-info {
    border-left: 4px solid #3b82f6;
    box-shadow: 0 14px 34px -4px rgba(59, 130, 246, 0.22), 0 4px 12px rgba(0, 0, 0, 0.35);
}
[dir="rtl"] .vironeer-toast-info {
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    border-right: 4px solid #3b82f6;
}
.vironeer-toast-info .vironeer-toast-icon {
    background-color: rgba(59, 130, 246, 0.16);
    border: 1.5px solid rgba(59, 130, 246, 0.35);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
}
.vironeer-toast-info-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='16' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'%3E%3C/line%3E%3C/svg%3E");
}
.vironeer-toast-info .vironeer-toast-progress {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

/* Keyframe Animations */
@keyframes toastSlideIn {
    0% {
        opacity: 0;
        transform: translateX(40px) scale(0.94);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastSlideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-40px) scale(0.94);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastSlideInCenter {
    0% {
        opacity: 0;
        transform: translateY(-25px) scale(0.92);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}