/* Toast Alerts */
/* Estilos para notificações toast (success, error, warning, info) */

.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
    pointer-events: none;
}

@media (max-width: 576px) {
    .toast-container {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
}

.toast-alert {
    background: #fff;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 60px;
    pointer-events: auto;
    animation: slideInRight 0.3s ease-out;
    position: relative;
    border-left: 4px solid;
    transition: all 0.3s ease;
}

.toast-alert.toast-removing {
    animation: slideOutRight 0.3s ease-in forwards;
}

.toast-alert:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Toast types */
.toast-alert.toast-success {
    border-left-color: #28a745;
}

.toast-alert.toast-success .toast-icon {
    color: #28a745;
}

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

.toast-alert.toast-error .toast-icon {
    color: #dc3545;
}

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

.toast-alert.toast-warning .toast-icon {
    color: #ffc107;
}

.toast-alert.toast-info {
    border-left-color: #17a2b8;
}

.toast-alert.toast-info .toast-icon {
    color: #17a2b8;
}

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

.toast-icon svg {
    width: 100%;
    height: 100%;
}

.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.toast-title {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
    margin: 0;
    color: #212529;
}

.toast-message {
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 0;
    color: #6c757d;
}

.toast-close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    opacity: 1;
}

.toast-close svg {
    width: 16px;
    height: 16px;
    color: #6c757d;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    animation: progressBar 15s linear forwards;
    border-radius: 0 0 0 0.5rem;
}

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

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

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

/* Laravel Flash Messages integration */
.alert-toast-wrapper {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    max-width: 400px;
}

@media (max-width: 576px) {
    .alert-toast-wrapper {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
}

.alert-toast-wrapper .alert {
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    animation: slideInRight 0.3s ease-out;
}

.alert-toast-wrapper .alert.alert-dismissible {
    padding-right: 3rem;
}
