/**
 * Kuzmack Suites Toast Notification Styles
 */

/* Toast Container */
.toast-container {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    max-width: 400px;
}

/* Position Variants */
.toast-container.top-right {
    top: 0;
    right: 0;
}

.toast-container.top-left {
    top: 0;
    left: 0;
}

.toast-container.bottom-right {
    bottom: 0;
    right: 0;
}

.toast-container.bottom-left {
    bottom: 0;
    left: 0;
}

.toast-container.top-center {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.toast-container.bottom-center {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Toast Notification */
.toast-notification {
    pointer-events: all;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 300px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid;
    position: relative;
    overflow: hidden;
}

/* Show Animation */
.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* Hide Animation */
.toast-notification.hide {
    opacity: 0;
    transform: translateX(100%);
}

/* Left Position Animations */
.toast-container.top-left .toast-notification,
.toast-container.bottom-left .toast-notification {
    transform: translateX(-100%);
}

.toast-container.top-left .toast-notification.show,
.toast-container.bottom-left .toast-notification.show {
    transform: translateX(0);
}

.toast-container.top-left .toast-notification.hide,
.toast-container.bottom-left .toast-notification.hide {
    transform: translateX(-100%);
}

/* Center Position Animations */
.toast-container.top-center .toast-notification,
.toast-container.bottom-center .toast-notification {
    transform: translateY(-100%);
}

.toast-container.top-center .toast-notification.show,
.toast-container.bottom-center .toast-notification.show {
    transform: translateY(0);
}

.toast-container.top-center .toast-notification.hide,
.toast-container.bottom-center .toast-notification.hide {
    transform: translateY(-100%);
}

/* Toast Icon */
.toast-icon {
    flex-shrink: 0;
    font-size: 24px;
    line-height: 1;
    margin-top: 2px;
}

/* Toast Content */
.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-message {
    font-size: 14px;
    line-height: 1.5;
    color: #1f2937;
    word-wrap: break-word;
}

/* Toast Close Button */
.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #6b7280;
    font-size: 16px;
    line-height: 1;
    transition: color 0.2s;
    opacity: 0.6;
}

.toast-close:hover {
    color: #1f2937;
    opacity: 1;
}

/* Toast Type Variants */

/* Success Toast */
.toast-notification.toast-success {
    border-left-color: #10b981;
}

.toast-notification.toast-success .toast-icon {
    color: #10b981;
}

.toast-notification.toast-success::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to right, rgba(16, 185, 129, 0.1), transparent);
    pointer-events: none;
}

/* Error Toast */
.toast-notification.toast-error {
    border-left-color: #ef4444;
}

.toast-notification.toast-error .toast-icon {
    color: #ef4444;
}

.toast-notification.toast-error::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to right, rgba(239, 68, 68, 0.1), transparent);
    pointer-events: none;
}

/* Warning Toast */
.toast-notification.toast-warning {
    border-left-color: #f59e0b;
}

.toast-notification.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-notification.toast-warning::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to right, rgba(245, 158, 11, 0.1), transparent);
    pointer-events: none;
}

/* Info Toast */
.toast-notification.toast-info {
    border-left-color: #3b82f6;
}

.toast-notification.toast-info .toast-icon {
    color: #3b82f6;
}

.toast-notification.toast-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to right, rgba(59, 130, 246, 0.1), transparent);
    pointer-events: none;
}

/* Hover Effect */
.toast-notification:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 640px) {
    .toast-container {
        max-width: calc(100% - 40px);
        padding: 20px;
    }

    .toast-notification {
        min-width: 280px;
        max-width: 100%;
    }

    /* Full width on mobile for center positions */
    .toast-container.top-center,
    .toast-container.bottom-center {
        left: 20px;
        right: 20px;
        transform: none;
        max-width: calc(100% - 40px);
    }
}

/* Dark Mode Support (if needed in future) */
@media (prefers-color-scheme: dark) {
    .toast-notification {
        background: #1f2937;
    }

    .toast-message {
        color: #f3f4f6;
    }

    .toast-close {
        color: #9ca3af;
    }

    .toast-close:hover {
        color: #f3f4f6;
    }
}

/* Accessibility */
.toast-notification:focus-within {
    outline: 2px solid var(--color-primary, #2563eb);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .toast-notification {
        transition: opacity 0.1s;
    }

    .toast-notification,
    .toast-notification.show,
    .toast-notification.hide {
        transform: none;
    }
}
