/* Default styling for the toast container */
.custom-swal-container {
    right: 40px !important;
    bottom: 40px !important;
}

/* Toast styling */
.custom-swal-toast {
    width: 400px !important;
    padding: 15px !important;
    border-radius: 12px !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
}

/* Toast message text */
.swal-toast-text {
    font-size: 1.2rem; /* Default size */
    font-weight: 600;
    padding: 12px;
}

/* Adjust for tablets */
@media (max-width: 768px) {
    .custom-swal-toast {
        width: 80% !important;
        max-width: 350px !important;
    }

    .custom-swal-container {
        right: 20px !important;
        bottom: 20px !important;
    }

    .swal-toast-text {
        font-size: 1rem; /* Smaller text for medium screens */
    }
}

/* Adjust for small mobile screens */
@media (max-width: 480px) {
    .custom-swal-toast {
        width: 90% !important;
        max-width: 320px !important;
        padding: 12px !important;
    }

    .custom-swal-container {
        right: 10px !important;
        bottom: 10px !important;
    }

    .swal-toast-text {
        font-size: 0.9rem; /* Even smaller text for small screens */
    }
}

.swal2-close {
    color: black !important; /* Default black close button */
    font-size: 22px; /* Adjust font size */
    border: none; /* Remove default border */
    background: transparent; /* Transparent background */
    cursor: pointer; /* Change cursor to pointer on hover */
    border-radius: 50%; /* Make the button circular */
    padding: 12px; /* Adds space around the icon */
    transition: color 0.3s ease, transform 0.3s ease, background-color 0.3s ease, border 0.3s ease; /* Smooth transition for color, scaling, and background */
    display: flex; /* Use flexbox to center the icon */
    align-items: center; /* Center the icon vertically */
    justify-content: center; /* Center the icon horizontally */
    width: 40px; /* Fixed width */
    height: 40px; /* Fixed height */
}

.swal2-close:hover {
    color: #555353 !important;
    transform: scale(1.1); /* Slightly scale the button on hover */
    background-color: rgba(0, 0, 0, 0.1); /* Light gray background on hover */
    border: 2px solid #555353; /* Darker border color on hover */
}

.swal2-close:focus {
    outline: none;
}

.library-document-card {
    position: relative;
    width: 300px;
    height: 180px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.flap {
    position: absolute;
    top: -25px;
    left: 0;
    width: 120px;
    height: 25px;
    clip-path: polygon(0 0, 80% 0, 100% 100%, 0% 100%);
}

/* Category-based background colors for library document cards */
.library-document-card.category-1,
.flap.category-1 {
    background-color: #ef4444; /* Red */
}

.library-document-card.category-2,
.flap.category-2 {
    background-color: #3b82f6; /* Blue */
}

.library-document-card.category-3,
.flap.category-3 {
    background-color: #8b5cf6; /* Purple */}

.library-document-card.category-4,
.flap.category-4 {
    background-color: #10b981; /* Green */
}

.library-document-card.category-5,
.flap.category-5 {
    background-color: #f97316; /* Orange */
}

.library-document-card.category-6,
.flap.category-6 {
    background-color: #06b6d4; /* Cyan */
}

.library-document-card.category-7,
.flap.category-7 {
    background-color: #84cc16; /* Lime */
}

.library-document-card.category-8,
.flap.category-8 {
    background-color: #ec4899; /* Pink */
}

.library-document-card.category-9,
.flap.category-9 {
    background-color: #6366f1; /* Indigo */
}

.library-document-card.category-10,
.flap.category-10 {
    background-color: #14b8a6; /* Teal */
}

.library-document-card.category-default,
.flap.category-default {
    background-color: #6b7280; /* Gray - for uncategorized */
}

/* Hover effect for file type icons */
.library-document-card:hover .file-type-icon {
    opacity: 0.3;
}

/* Text shadow for better readability on colored backgrounds */
.library-document-card .absolute {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* Action buttons styling */
.library-action-btn {
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.library-action-btn:hover {
    background-color: rgba(255, 255, 255, 0.4) !important;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.library-action-btn:active {
    transform: scale(0.98);
}

/* Improved cursor pointer for cards */
.library-document-card {
    cursor: pointer;
}

.library-document-card:hover {
    transform: translateY(-2px);
}

.library-category-1 {
    background-color: #ef4444; /* Red */
}

.library-category-2 {
    background-color: #3b82f6; /* Blue */
}

.library-category-3 {
    background-color: #8b5cf6; /* Purple */}

.library-category-4 {
    background-color: #10b981; /* Green */
}

.library-category-5 {
    background-color: #f97316; /* Orange */
}

.library-category-6 {
    background-color: #06b6d4; /* Cyan */
}

.library-category-7 {
    background-color: #84cc16; /* Lime */
}
