﻿
/* VanInventory - Global Toast Notifications */

.vi-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(380px, calc(100vw - 40px));
    pointer-events: none;
}

.vi-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #ffffff;
    border-radius: 12px;
    border-left: 5px solid #64748b;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.18);
    font-family: "Segoe UI", Arial, sans-serif;
    animation: viToastSlideIn 0.35s ease forwards;
    pointer-events: auto;
}

.vi-toast-success {
    border-left-color: #16a34a;
}

.vi-toast-error {
    border-left-color: #dc2626;
}

.vi-toast-warning {
    border-left-color: #f59e0b;
}

.vi-toast-info {
    border-left-color: #2563eb;
}

.vi-toast-icon {
    font-size: 22px;
    line-height: 1;
    font-weight: bold;
}

.vi-toast-success .vi-toast-icon {
    color: #16a34a;
}

.vi-toast-error .vi-toast-icon {
    color: #dc2626;
}

.vi-toast-warning .vi-toast-icon {
    color: #f59e0b;
}

.vi-toast-info .vi-toast-icon {
    color: #2563eb;
}

.vi-toast-body {
    flex: 1;
    min-width: 0;
}

.vi-toast-title {
    font-size: 14px;
    font-weight: 700;
    color: #172338;
    margin-bottom: 4px;
}

.vi-toast-message {
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
    overflow-wrap: anywhere;
}

.vi-toast-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

    .vi-toast-close:hover {
        color: #172338;
    }

.vi-toast.hiding {
    animation: viToastSlideOut 0.25s ease forwards;
}

@keyframes viToastSlideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes viToastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(50px);
    }
}

@media (max-width: 600px) {
    .vi-toast-container {
        top: 12px;
        right: 12px;
        width: calc(100vw - 24px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .vi-toast,
    .vi-toast.hiding {
        animation: none;
    }
}


/* VanInventory - Custom Confirmation Dialog */

.vi-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 36, 0.65);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: viConfirmFadeIn 0.2s ease;
}

.vi-confirm-box {
    background: #ffffff;
    width: 100%;
    max-width: 440px;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 20px 65px rgba(0, 0, 0, 0.25);
    font-family: "Segoe UI", Arial, sans-serif;
    animation: viConfirmPopIn 0.25s ease;
}

.vi-confirm-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #fff3db;
    color: #b7791f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    margin-bottom: 18px;
}

.vi-confirm-title {
    font-size: 20px;
    font-weight: 700;
    color: #172338;
    margin-bottom: 10px;
}

.vi-confirm-message {
    font-size: 14px;
    line-height: 1.6;
    color: #64748b;
    margin-bottom: 25px;
}

.vi-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.vi-confirm-btn {
    padding: 11px 20px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #e2e8f0;
}

.vi-confirm-cancel {
    background: #ffffff;
    color: #334155;
}

.vi-confirm-accept {
    background: #101a2d;
    border-color: #101a2d;
    color: #ffffff;
}

    .vi-confirm-accept:hover {
        background: #263b59;
    }

@keyframes viConfirmFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes viConfirmPopIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 480px) {
    .vi-confirm-actions {
        flex-direction: column-reverse;
    }

    .vi-confirm-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vi-confirm-overlay,
    .vi-confirm-box {
        animation: none;
    }
}
