/**
 * Custom Vanilla Toast Notification System - IPHACON 2027
 * Self-Hosted, Zero CDN Dependency, High Performance & Secure
 */

#custom-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 400px;
    width: calc(100% - 40px);
}

.custom-toast {
    position: relative;
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #ffffff;
    color: #1e293b;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.45;
}

.custom-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.custom-toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

/* Status Variants with Modern Left Accent */
.custom-toast-success {
    border-left: 5px solid #10b981;
}
.custom-toast-success .toast-icon {
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
}

.custom-toast-error {
    border-left: 5px solid #ef4444;
}
.custom-toast-error .toast-icon {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

.custom-toast-warning {
    border-left: 5px solid #f59e0b;
}
.custom-toast-warning .toast-icon {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
}

.custom-toast-info {
    border-left: 5px solid #2d69ff;
}
.custom-toast-info .toast-icon {
    color: #2d69ff;
    background: rgba(45, 105, 255, 0.12);
}

/* Icon Badge */
.toast-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* Content Area */
.toast-content {
    flex-grow: 1;
    padding-top: 2px;
}

.toast-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #0f172a;
    margin-bottom: 2px;
}

.toast-message {
    color: #475569;
    font-size: 0.84rem;
    word-break: break-word;
}

/* Close Button */
.toast-close-btn {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 1rem;
    line-height: 1;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.toast-close-btn:hover {
    color: #0f172a;
    background: #f1f5f9;
}

/* Progress Countdown Bar */
.toast-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(0, 0, 0, 0.08);
}

.toast-progress-fill {
    height: 100%;
    width: 100%;
    transition: width linear;
}

.custom-toast-success .toast-progress-fill { background: #10b981; }
.custom-toast-error .toast-progress-fill { background: #ef4444; }
.custom-toast-warning .toast-progress-fill { background: #f59e0b; }
.custom-toast-info .toast-progress-fill { background: #2d69ff; }

/* Mobile Optimizations */
@media (max-width: 576px) {
    #custom-toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
    }
}
