/* Estilos personalizados para toasts do Bootstrap */
.toast-container {
    z-index: 9999 !important;
}

.toast {
    min-width: 300px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
}

/* Toasts com header */
.toast.bg-success .toast-header {
    background-color: #198754 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.toast.bg-danger .toast-header {
    background-color: #dc3545 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.toast.bg-warning .toast-header {
    background-color: #ffc107 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.toast.bg-info .toast-header {
    background-color: #0dcaf0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.toast.bg-primary .toast-header {
    background-color: #0d6efd !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Toast body styling */
.toast .toast-body {
    padding: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Toast header styling */
.toast .toast-header {
    padding: 0.5rem 0.75rem;
    border-radius: calc(0.375rem - 1px) calc(0.375rem - 1px) 0 0;
}

.toast .toast-header strong {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Botão close personalizado */
.toast .close {
    background: none;
    border: none;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    color: inherit;
    text-shadow: none;
    opacity: 0.7;
    cursor: pointer;
    padding: 0.25rem;
    margin: 0;
}

.toast .close:hover,
.toast .close:focus {
    opacity: 1;
}

.toast .close.close-white {
    color: #ffffff;
}

.toast .close span {
    font-size: 1.5rem;
    line-height: 1;
}

/* Toasts sem header - layout flexível */
.toast .d-flex {
    align-items: stretch;
}

.toast .d-flex .toast-body {
    flex-grow: 1;
    margin: 0;
    border-radius: 0.375rem 0 0 0.375rem;
}

.toast .d-flex .close {
    border-radius: 0 0.375rem 0.375rem 0;
    padding: 0.75rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animações suaves */
.toast.showing {
    opacity: 0;
    transform: translateX(100%);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.3s ease-in-out;
}

.toast.hide {
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 576px) {
    .toast-container {
        position: fixed !important;
        top: 1rem !important;
        right: 1rem !important;
        left: 1rem !important;
        width: auto !important;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
}
