/* Base toast container styles */
.pxu-toast-container {
    position: fixed;
    display: flex;
    gap: 10px;
    z-index: 99999;
    pointer-events: none;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {

    /* Adjust center positions on mobile */
    .pxu-toast-container[id$="center-center"],
    .pxu-toast-container[id$="top-center"],
    .pxu-toast-container[id$="bottom-center"] {
        left: 10px !important;
        right: 10px !important;
        transform: none !important;
        max-width: calc(100vw - 20px);
    }

    /* Adjust side positions on mobile */
    .pxu-toast-container[id$="top-left"],
    .pxu-toast-container[id$="center-left"],
    .pxu-toast-container[id$="bottom-left"] {
        left: 10px !important;
    }

    .pxu-toast-container[id$="top-right"],
    .pxu-toast-container[id$="center-right"],
    .pxu-toast-container[id$="bottom-right"] {
        right: 10px !important;
    }

    /* Reduce gaps on mobile */
    .pxu-toast-container {
        gap: 8px;
    }
}

.pxu-toast-notification {
    min-width: 250px;
    max-width: 320px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    color: #fafafa;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    pointer-events: auto;
}

/* Position-based animations */
/* Top positions slide down */
[id*="top"] .pxu-toast-notification {
    transform: translateY(-20px);
}

/* Bottom positions slide up */
[id*="bottom"] .pxu-toast-notification {
    transform: translateY(20px);
}

/* Left positions slide from left */
[id*="left"] .pxu-toast-notification {
    transform: translateX(-20px);
}

/* Right positions slide from right */
[id*="right"] .pxu-toast-notification {
    transform: translateX(20px);
}

/* Center positions fade in with scale */
[id*="center-center"] .pxu-toast-notification {
    transform: scale(0.9);
}

/* Show state - all animations end at normal state */
.pxu-toast-notification.pxu-toast-show {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

.pxu-toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.pxu-toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.pxu-toast-message {
    line-height: 1.4;
    word-break: break-word;
}

.pxu-toast-action {
    margin-left: 16px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.pxu-toast-action:hover {
    background: rgba(255, 255, 255, 0.3);
}

.pxu-toast-close {
    margin-left: 8px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0 0 0 8px;
    flex-shrink: 0;
}

.pxu-toast-close:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Color variations */
.pxu-toast-success {
    background-color: #22c55e;
}

.pxu-toast-error {
    background-color: #ef4444;
}

.pxu-toast-warning {
    background-color: #f97316;
    color: #111111;
}

.pxu-toast-warning .pxu-toast-action,
.pxu-toast-warning .pxu-toast-close {
    color: rgba(0, 0, 0, 0.7);
}

.pxu-toast-warning .pxu-toast-action:hover {
    background: rgba(0, 0, 0, 0.1);
}

.pxu-toast-info {
    background-color: #2563eb;
}

.pxu-toast-loading {
    background-color: #212121;
}

.pxu-toast-spin {
    animation: pxu-toast-spin 1s linear infinite;
}

@keyframes pxu-toast-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.pxu-toast-action.reload-action {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 4px 12px;
    margin-left: 10px;
    font-weight: bold;
}

.pxu-toast-action.reload-action:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .pxu-toast-notification {
        min-width: 200px;
        max-width: 100%;
        font-size: 13px;
        padding: 10px 12px;
        gap: 10px;
    }

    .pxu-toast-icon {
        font-size: 18px;
    }

    .pxu-toast-action {
        font-size: 12px;
        padding: 3px 6px;
        margin-left: 8px;
    }
}