/* ******************************************************************** */
/* ****************** Toast Modal Styles (Bootstrap 5) **************** */
/* ******************************************************************** */

/* Toast Modal Dialog */
.toast-modal-dialog {
    max-width: 500px;
}

/* Toast Modal Content */
.toast-modal-content {
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.25);
    border: none;
    overflow: hidden;
}

/* Toast Modal Header */
.toast-modal-header {
    padding: 1rem 1.25rem;
    border-bottom: none;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
    border-left: 4px solid;
}

/* Custom close button styling */
.toast-modal-header .btn-close-custom {
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.toast-modal-header .btn-close-custom:hover {
    opacity: 1;
}

/* Toast Modal Body */
.toast-modal-body {
    padding: 1.5rem 1.25rem;
    background: white;
}

/* Image Container */
.toast-modal-image-container {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
}

.toast-modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Message Container */
.toast-modal-message {
    font-size: 1rem;
    line-height: 1.5;
    color: #212529;
}

/* Icon styling */
.toast-modal-header i {
    flex-shrink: 0;
}

/* Title styling */
.toast-modal-header .modal-title {
    font-weight: 600;
    font-size: 1.125rem;
    color: #212529;
}

/* Type-specific border colors using site color variables */
.toast-modal-header.border-success {
    border-left-color: var(--medium-green) !important;
}

.toast-modal-header.border-danger {
    border-left-color: #dc3545 !important;
}

.toast-modal-header.border-warning {
    border-left-color: #ffc107 !important;
}

.toast-modal-header.border-info {
    border-left-color: #0dcaf0 !important;
}

/* Success background */
.toast-modal-header.bg-success {
    background-color: rgba(96, 131, 14, 0.1) !important;
}

/* Error/Danger background */
.toast-modal-header.bg-danger {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

/* Warning background */
.toast-modal-header.bg-warning {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

/* Info background */
.toast-modal-header.bg-info {
    background-color: rgba(13, 202, 240, 0.1) !important;
}

/* Animation for modal entrance */
.modal.fade .toast-modal-dialog {
    transition: transform 0.3s ease-out;
    transform: scale(0.9);
}

.modal.show .toast-modal-dialog {
    transform: scale(1);
}

/* Mobile responsive adjustments */
@media (max-width: 576px) {
    .toast-modal-dialog {
        max-width: calc(100% - 2rem);
        margin: 1rem;
    }

    .toast-modal-image-container {
        width: 80px;
        height: 80px;
    }

    .toast-modal-body {
        padding: 1rem;
    }

    .toast-modal-header {
        padding: 0.875rem 1rem;
    }

    .toast-modal-header .modal-title {
        font-size: 1rem;
    }

    .toast-modal-header i {
        font-size: 1.25rem !important;
    }

    .toast-modal-message {
        font-size: 0.9375rem;
    }
}

/* Very small mobile devices */
@media (max-width: 400px) {
    .toast-modal-image-container {
        display: none; /* Hide image on very small screens */
    }

    .toast-modal-message {
        font-size: 0.875rem;
    }
}

/* Ensure proper z-index layering */
#toastModal {
    z-index: 1060;
}

#toastModal .modal-backdrop {
    z-index: 1059;
}

/* Smooth backdrop transition */
.modal-backdrop.show {
    opacity: 0.5;
}

/* Focus styling for accessibility */
.toast-modal-content:focus {
    outline: 2px solid var(--medium-green);
    outline-offset: 2px;
}

/* Print styles - hide modals when printing */
@media print {
    .modal,
    .modal-backdrop {
        display: none !important;
    }
}

/* Dark mode support (optional - for future use) */
/*
@media (prefers-color-scheme: dark) {
    .toast-modal-content {
        background-color: #212529;
    }

    .toast-modal-body {
        background-color: #212529;
        color: #f8f9fa;
    }

    .toast-modal-message {
        color: #f8f9fa;
    }

    .toast-modal-header .modal-title {
        color: #f8f9fa;
    }
}
*/
