/* Elegant Toast Styles */
.toast {
    font-size: 0.8rem;
    min-width: 120px;
    max-width: 200px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    border: none;
    border-radius: 6px;
    z-index: 1056 !important; /* Above modals */
    backdrop-filter: blur(8px);
    overflow: hidden;
    margin-bottom: 8px;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    letter-spacing: 0.3px;
}

/* Toast colors with subtle transparency for elegance */
.toast.bg-primary {
    background-color: rgba(13, 110, 253, 0.85) !important;
}

.toast.bg-success {
    background-color: rgba(25, 135, 84, 0.85) !important;
}

.toast.bg-danger {
    background-color: rgba(220, 53, 69, 0.85) !important;
}

.toast.bg-warning {
    background-color: rgba(255, 193, 7, 0.85) !important;
    color: #212529 !important;
}

.toast.bg-info {
    background-color: rgba(23, 162, 184, 0.85) !important;
}

/* Ultra-elegant view toast */
.toast.view-toast {
    background-color: rgba(52, 58, 64, 0.75) !important;
    backdrop-filter: blur(10px);
    border-left: 3px solid rgba(108, 117, 125, 0.8);
}

/* Elegant single-row toast body */
.toast .toast-body {
    padding: 0.5rem 0.7rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    line-height: 1.2;
    justify-content: space-between;
}

.toast .toast-body i {
    margin-right: 0.4rem;
    font-size: 0.9rem;
}

/* Compact close button */
.toast .btn-close {
    padding: 0.4rem;
    margin-left: 0.3rem;
    opacity: 0.7;
    font-size: 0.6rem;
}

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

/* Smooth toast animation */
.toast.showing,
.toast.hide {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Toast Position */
.toast.position-fixed {
    bottom: 1rem !important;
    right: 1rem !important;
}

/* Toast container styling */
#toast-container {
    z-index: 1060;
    max-width: 200px;
    pointer-events: none; /* Allow clicking through container */
    bottom: 15px !important;
    right: 15px !important;
}

#toast-container .toast {
    pointer-events: auto; /* But allow interaction with toasts */
}

/* Like/Unlike specific toasts */
.toast.like-toast .toast-body {
    display: flex;
    align-items: center;
}

.toast.like-toast i.bi-heart-fill {
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-right: 0.4rem;
}

.toast.like-toast i.bi-heart {
    font-size: 0.9rem;
    margin-right: 0.4rem;
}

/* View toast specific styling */
.toast i.bi-eye {
    color: #adb5bd;
    font-size: 0.9rem;
}

/* Message toast specific styling */
.toast.message-toast {
    background-color: rgba(13, 110, 253, 0.85) !important;
    border-left: 3px solid rgba(13, 110, 253, 1);
}

.toast.message-toast.success {
    background-color: rgba(25, 135, 84, 0.85) !important;
    border-left: 3px solid rgba(25, 135, 84, 1);
}

.toast.message-toast.error {
    background-color: rgba(220, 53, 69, 0.85) !important;
    border-left: 3px solid rgba(220, 53, 69, 1);
}

.toast.message-toast i {
    font-size: 1rem;
}

/* Toast with animation */
.toast.animated .toast-body {
    position: relative;
    overflow: hidden;
}

.toast.animated .toast-body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Confirmation toast specific styling - Dark Elegant Theme */
.toast.confirmation-toast {
    min-width: 280px;
    max-width: 350px;
    background: linear-gradient(135deg, #272238, #1e1a29) !important;
    border-left: 4px solid #0d6efd;
    color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
    margin-bottom: 15px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1060 !important;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

/* Add subtle gradient overlay */
.toast.confirmation-toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.15), transparent);
    opacity: 0.7;
    z-index: 0;
    pointer-events: none;
}

.toast.confirmation-toast .toast-header {
    background-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.75rem 1rem;
    position: relative;
    z-index: 1;
}

.toast.confirmation-toast .toast-header strong {
    background: linear-gradient(90deg, #e9ecef, #b8c7ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    letter-spacing: 0.02em;
    font-weight: 600;
}

.toast.confirmation-toast .toast-header i {
    color: #0d6efd;
    margin-right: 8px;
}

.toast.confirmation-toast .toast-body {
    padding: 1rem;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.toast.confirmation-toast .message-row {
    width: 100%;
    margin-bottom: 1rem;
}

.toast.confirmation-toast .toast-body p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.toast.confirmation-toast .button-row {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.toast.confirmation-toast .btn-container {
    display: flex;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1rem;
    margin-top: 0.5rem;
    gap: 1rem;
}

.toast.confirmation-toast .btn {
    font-size: 0.85rem;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.toast.confirmation-toast .btn-outline-dark {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
}

.toast.confirmation-toast .btn-outline-dark:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.toast.confirmation-toast .btn-warning {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    border: none;
    color: #fff;
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.3);
}

.toast.confirmation-toast .btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(13, 110, 253, 0.4);
}

/* Responsive adjustments */
@media (max-width: 576px) {
    #toast-container {
        max-width: 180px;
        right: 10px !important;
        bottom: 10px !important;
    }

    .toast {
        font-size: 0.75rem;
        min-width: 100px;
    }

    .toast.confirmation-toast {
        min-width: 200px;
        max-width: 280px;
    }
}