/* ==========================================================================
   LPS License Manager - Toast Notification Styles
   ========================================================================== */

/* Container positioning */
.lm-toast-container {
    position: fixed;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: var(--lm-spacing-sm);
    padding: var(--lm-spacing-md);
    pointer-events: none;
    max-height: 100vh;
    overflow: hidden;
}

.lm-toast-container--top-right {
    top: calc(var(--lm-navbar-height) + var(--lm-spacing-sm));
    right: 0;
    align-items: flex-end;
}

.lm-toast-container--top-left {
    top: calc(var(--lm-navbar-height) + var(--lm-spacing-sm));
    left: var(--lm-sidebar-width);
    align-items: flex-start;
}

.lm-toast-container--bottom-right {
    bottom: 0;
    right: 0;
    align-items: flex-end;
    flex-direction: column-reverse;
}

.lm-toast-container--bottom-left {
    bottom: 0;
    left: var(--lm-sidebar-width);
    align-items: flex-start;
    flex-direction: column-reverse;
}

/* Toast base */
.lm-toast {
    display: flex;
    align-items: flex-start;
    gap: var(--lm-spacing-sm);
    width: 100%;
    max-width: 380px;
    min-width: 280px;
    padding: var(--lm-spacing-md);
    background-color: var(--lm-white);
    border-radius: var(--lm-radius-lg);
    box-shadow: var(--lm-shadow-lg);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    animation: lm-toast-slide-in 0.3s ease-out;
}

.lm-toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

/* Variants */
.lm-toast--success::before { background-color: var(--lm-success); }
.lm-toast--error::before { background-color: var(--lm-danger); }
.lm-toast--warning::before { background-color: var(--lm-warning); }
.lm-toast--info::before { background-color: var(--lm-info); }

.lm-toast--success .lm-toast__icon { color: var(--lm-success); }
.lm-toast--error .lm-toast__icon { color: var(--lm-danger); }
.lm-toast--warning .lm-toast__icon { color: #997404; }
.lm-toast--info .lm-toast__icon { color: #0a94af; }

/* Icon */
.lm-toast__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 1.125rem;
}

/* Content */
.lm-toast__content {
    flex: 1;
    min-width: 0;
}

.lm-toast__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--lm-gray-800);
    margin-bottom: var(--lm-spacing-xs);
}

.lm-toast__message {
    font-size: 0.875rem;
    color: var(--lm-gray-600);
    line-height: 1.4;
    word-wrap: break-word;
}

/* Dismiss button */
.lm-toast__dismiss {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    margin: -4px -4px -4px 0;
    font-size: 0.875rem;
    color: var(--lm-gray-500);
    background: transparent;
    border: none;
    border-radius: var(--lm-radius-md);
    cursor: pointer;
    transition: var(--lm-transition-fast);
}

.lm-toast__dismiss:hover {
    color: var(--lm-gray-800);
    background-color: var(--lm-gray-200);
}

/* Progress bar */
.lm-toast__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--lm-gray-200);
    overflow: hidden;
}

.lm-toast__progress-bar {
    height: 100%;
    width: 100%;
    background-color: var(--lm-gray-400);
    animation: lm-toast-progress linear forwards;
    transform-origin: left;
}

.lm-toast__progress-bar.paused {
    animation-play-state: paused;
}

/* Animations */
@keyframes lm-toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes lm-toast-progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* Responsive - sidebar collapses */
@media (max-width: 991.98px) {
    .lm-toast-container--top-left,
    .lm-toast-container--bottom-left {
        left: var(--lm-sidebar-collapsed-width);
    }
}

@media (max-width: 768px) {
    .lm-toast-container--top-left,
    .lm-toast-container--bottom-left {
        left: 0;
    }

    .lm-toast-container {
        padding: var(--lm-spacing-sm);
    }

    .lm-toast {
        max-width: none;
        min-width: 0;
        width: 100%;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .lm-toast {
        animation: none;
    }
    .lm-toast__progress-bar {
        animation: none;
        opacity: 0;
    }
}
