/* 
 * PrintPlay WooCommerce Notifications (Toasts) CSS 
 */

#pp-toast-container {
    position: fixed !important;
    bottom: 2rem !important;
    right: 2rem !important;
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    pointer-events: none !important;
    max-width: 480px !important;
    width: calc(100% - 2rem) !important;
    align-items: flex-end !important;
}

.pp-toast {
    pointer-events: auto !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    padding: 1rem 3rem 1rem 1.2rem !important;
    box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.04) !important;
    margin: 0 !important;
    border: none !important;
    border-left: 4px solid #133A7D !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    position: relative !important;
    transform: translateY(20px) scale(0.95) !important;
    opacity: 0 !important;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    color: #1a1a2e !important;
    font-size: 0.95rem !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    line-height: 1.4 !important;
    overflow: hidden !important;
    width: 100% !important;
}

.pp-toast.pp-toast-visible {
    transform: translateY(0) scale(1) !important;
    opacity: 1 !important;
}

.pp-toast::before,
.pp-toast::after {
    display: none !important;
}

.pp-toast-icon {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
}

.pp-toast-content {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex: 1 !important;
    min-width: 0 !important;
}

.pp-notice-text {
    flex: 1 !important;
    word-break: break-word !important;
    font-weight: 500 !important;
    color: #334155 !important;
}

.pp-toast .button {
    background: #f1f5f9 !important;
    color: #133A7D !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: all 0.2s ease !important;
    border: none !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.pp-toast .button:hover {
    background: #e2e8f0 !important;
    color: #0f2e64 !important;
}

.pp-toast-close {
    position: absolute !important;
    top: 50% !important;
    right: 0.5rem !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
    cursor: pointer !important;
    padding: 0.5rem !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    z-index: 10 !important;
}

.pp-toast-close:hover {
    background: #f1f5f9 !important;
    color: #ef4444 !important;
}

.pp-toast.woocommerce-message {
    border-left-color: #10B981 !important;
}

.pp-toast.woocommerce-error {
    border-left-color: #ef4444 !important;
}

.pp-toast.woocommerce-info {
    border-left-color: #3b82f6 !important;
}

/* Hide the default global message container when empty or containing toasts (in case it leaves space) */
.woocommerce-notices-wrapper:empty {
    display: none !important;
}

/* Make sure any original message boxes left behind in the DOM are completely invisible if empty */
form.checkout .woocommerce-error {
    /* Don't toast checkout errors, as users need to see exactly what fields to fill in right there */
}

@media (max-width: 768px) {
    #pp-toast-container {
        bottom: 1rem !important;
        right: 1rem !important;
        left: 1rem !important;
        width: calc(100% - 2rem) !important;
        max-width: none !important;
        align-items: stretch !important;
    }

    .pp-toast {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 1rem 2.5rem 1rem 1.25rem !important;
    }

    .pp-toast-content {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
        align-items: flex-start !important;
    }

    .pp-toast .button {
        width: 100% !important;
        text-align: center !important;
        padding: 0.75rem !important;
    }

    .pp-toast-close {
        top: 0.75rem !important;
        transform: none !important;
    }
}