/* Toast Notification System */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    width: 100%;
}

.toast {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-left: 4px solid;
    animation: toastSlideIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.toast--success {
    border-left-color: #10b981;
}

.toast--error {
    border-left-color: #ef4444;
}

.toast--warning {
    border-left-color: #f59e0b;
}

.toast--info {
    border-left-color: #3b82f6;
}

.toast--loading {
    border-left-color: #6b7280;
}

.toast__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast__content {
    flex: 1;
    min-width: 0;
}

.toast__title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #1f2937;
}

.toast__message {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
}

.toast__close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #9ca3af;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.toast__close:hover {
    color: #6b7280;
}

.toast__close svg {
    width: 16px;
    height: 16px;
}

.toast__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0 0 12px 12px;
    animation: toastProgress linear;
}

.toast--success .toast__progress {
    background: #10b981;
}

.toast--error .toast__progress {
    background: #ef4444;
}

.toast--warning .toast__progress {
    background: #f59e0b;
}

.toast--info .toast__progress {
    background: #3b82f6;
}

.toast--loading .toast__progress {
    background: #6b7280;
    animation: toastProgressIndeterminate 2s ease-in-out infinite;
}

/* Animations */
@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes toastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

@keyframes toastProgressIndeterminate {
    0% {
        width: 0%;
        left: 0%;
    }
    50% {
        width: 100%;
        left: 0%;
    }
    100% {
        width: 0%;
        left: 100%;
    }
}

/* Toast States */
.toast--exiting {
    animation: toastSlideOut 0.3s ease-in forwards;
}

.toast--paused .toast__progress {
    animation-play-state: paused;
}

/* Responsive Design */

/* Medium screens - 768px and below */
@media (max-width: 768px) {
    .toast-container {
        top: 15px;
        right: 15px;
        left: 15px;
        max-width: 350px;
        margin: 0 auto;
        gap: 10px;
    }
    
    .toast {
        padding: 14px 16px;
        border-radius: 10px;
    }
    
    .toast__icon {
        width: 18px;
        height: 18px;
    }
    
    .toast__title {
        font-size: 13px;
        margin-bottom: 3px;
    }
    
    .toast__message {
        font-size: 13px;
        line-height: 1.3;
    }
    
    .toast__close svg {
        width: 14px;
        height: 14px;
    }
}

/* Small screens - 550px and below */
@media (max-width: 550px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: 320px;
        margin: 0 auto;
        gap: 8px;
    }
    
    .toast {
        padding: 12px 14px;
        border-radius: 8px;
        gap: 10px;
    }
    
    .toast__icon {
        width: 16px;
        height: 16px;
        margin-top: 1px;
    }
    
    .toast__title {
        font-size: 12px;
        font-weight: 600;
        margin-bottom: 2px;
    }
    
    .toast__message {
        font-size: 12px;
        line-height: 1.3;
    }
    
    .toast__close {
        padding: 2px;
    }
    
    .toast__close svg {
        width: 12px;
        height: 12px;
    }
    
    .toast__progress {
        height: 2px;
    }
}

/* Very small screens - 400px and below */
@media (max-width: 400px) {
    .toast-container {
        top: 8px;
        right: 8px;
        left: 8px;
        max-width: 280px;
        margin: 0 auto;
        gap: 6px;
    }
    
    .toast {
        padding: 10px 12px;
        border-radius: 6px;
        gap: 8px;
    }
    
    .toast__icon {
        width: 14px;
        height: 14px;
    }
    
    .toast__title {
        font-size: 11px;
        font-weight: 600;
    }
    
    .toast__message {
        font-size: 11px;
        line-height: 1.2;
    }
    
    .toast__close svg {
        width: 10px;
        height: 10px;
    }
    
    .toast__progress {
        height: 2px;
    }
}

/* Landscape orientation on small screens */
@media (max-width: 550px) and (orientation: landscape) {
    .toast-container {
        top: 5px;
        right: 10px;
        left: 10px;
        max-width: 300px;
        margin: 0 auto;
        gap: 6px;
    }
    
    .toast {
        padding: 8px 12px;
    }
    
    .toast__title {
        font-size: 11px;
        margin-bottom: 1px;
    }
    
    .toast__message {
        font-size: 11px;
        line-height: 1.2;
    }
}
