
/* Custom Alert Styles */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    animation: slideDown 0.5s ease forwards;
}

.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.alert-error {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

.alert-info {
    color: #055160;
    background-color: #cff4fc;
    border-color: #b6effb;
}

/* Media Card Enhancements */
.media-card {
    transition: transform 0.3s, box-shadow 0.3s;
}

.media-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* File Upload Styling */
.file-drop-area {
    border: 2px dashed #cbd5e1;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
}

.file-drop-area:hover, .file-drop-area.dragover {
    border-color: #3b82f6;
}

.file-preview {
    max-width: 100%;
    max-height: 200px;
    margin-top: 1rem;
}

/* Fixed Modal Styling - Hide by default */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
}

.modal.show {
    display: block;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    max-width: 500px;
    z-index: 1050;
}

.modal-content {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1rem;
}

.modal-footer {
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Navbar fixes */
.navbar {
    position: relative;
    z-index: 1030 !important;
}

.navbar-collapse {
    z-index: 1031 !important;
}

.dropdown-menu {
    z-index: 1032 !important;
}

/* Bootstrap navbar mobile menu fix */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: #0d6efd;
        padding: 1rem;
        border-radius: 0 0 0.5rem 0.5rem;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }
    
    .navbar-collapse.show, 
    .navbar-collapse.collapsing {
        display: block !important;
    }
}

/* Custom animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { 
        opacity: 0; 
        transform: translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Animation classes */
.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-slide-down {
    animation: slideDown 0.5s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.5s ease forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-shake {
    animation: shake 0.8s ease;
}

/* Animation delays */
.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

.delay-400 {
    animation-delay: 400ms;
}

.delay-500 {
    animation-delay: 500ms;
}

/* Accessibility */
:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Tailwind Enhancements */
.bg-primary {
    background-color: #3b82f6 !important;
}

.bg-secondary {
    background-color: #6b7280 !important;
}

.bg-success {
    background-color: #10b981 !important;
}

.bg-danger {
    background-color: #ef4444 !important;
}

.bg-warning {
    background-color: #f59e0b !important;
}

.bg-info {
    background-color: #3b82f6 !important;
}

.text-primary {
    color: #3b82f6 !important;
}

.text-secondary {
    color: #6b7280 !important;
}

.text-success {
    color: #10b981 !important;
}

.text-danger {
    color: #ef4444 !important;
}

.text-warning {
    color: #f59e0b !important;
}

.text-info {
    color: #3b82f6 !important;
}

.border-primary {
    border-color: #3b82f6 !important;
}

.btn {
    @apply px-4 py-2 rounded font-medium transition-colors;
}

.btn-primary {
    @apply bg-blue-600 hover:bg-blue-700 text-white;
}

.btn-secondary {
    @apply bg-gray-600 hover:bg-gray-700 text-white;
}

.btn-success {
    @apply bg-green-600 hover:bg-green-700 text-white;
}

.btn-danger {
    @apply bg-red-600 hover:bg-red-700 text-white;
}

.btn-warning {
    @apply bg-yellow-600 hover:bg-yellow-700 text-white;
}

.btn-info {
    @apply bg-blue-600 hover:bg-blue-700 text-white;
}

.btn-outline-primary {
    @apply border border-blue-600 text-blue-600 hover:bg-blue-600 hover:text-white;
}

.btn-outline-secondary {
    @apply border border-gray-600 text-gray-600 hover:bg-gray-600 hover:text-white;
}

.btn-outline-success {
    @apply border border-green-600 text-green-600 hover:bg-green-600 hover:text-white;
}

.btn-outline-danger {
    @apply border border-red-600 text-red-600 hover:bg-red-600 hover:text-white;
}

.btn-sm {
    @apply px-3 py-1 text-sm;
}

.btn-lg {
    @apply px-6 py-3 text-lg;
}

.badge {
    @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.badge-primary {
    @apply bg-blue-100 text-blue-800;
}

.badge-secondary {
    @apply bg-gray-100 text-gray-800;
}

.badge-success {
    @apply bg-green-100 text-green-800;
}

.badge-danger {
    @apply bg-red-100 text-red-800;
}

.badge-warning {
    @apply bg-yellow-100 text-yellow-800;
}

.badge-info {
    @apply bg-blue-100 text-blue-800;
}

.card {
    @apply bg-white rounded-lg shadow;
}

.card-header {
    @apply px-6 py-4 border-b border-gray-200;
}

.card-body {
    @apply p-6;
}

.card-footer {
    @apply px-6 py-4 border-t border-gray-200;
}

.form-control {
    @apply block w-full px-3 py-2 bg-white border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500;
}

.form-label {
    @apply block text-sm font-medium text-gray-700 mb-1;
}

.form-text {
    @apply mt-1 text-sm text-gray-500;
}

.form-check {
    @apply flex items-center;
}

.form-check-input {
    @apply h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500;
}

.form-check-label {
    @apply ml-2 block text-sm text-gray-700;
}

/* Table Styles */
.table {
    @apply min-w-full divide-y divide-gray-200;
}

.table th {
    @apply px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider;
}

.table td {
    @apply px-6 py-4 whitespace-nowrap text-sm text-gray-500;
}

.table-striped tbody tr:nth-of-type(odd) {
    @apply bg-gray-50;
}

.table-hover tbody tr:hover {
    @apply bg-gray-100;
}

/* File Type Icons */
.file-icon {
    @apply flex items-center justify-center w-12 h-12 rounded-full bg-gray-100;
}

.file-image {
    @apply text-blue-500;
}

.file-pdf {
    @apply text-red-500;
}

.file-word {
    @apply text-blue-700;
}

.file-excel {
    @apply text-green-600;
}

.file-powerpoint {
    @apply text-orange-600;
}

.file-archive {
    @apply text-yellow-600;
}

.file-text {
    @apply text-gray-600;
}

.file-audio {
    @apply text-purple-600;
}

.file-video {
    @apply text-pink-600;
}

.file-default {
    @apply text-gray-500;
}

/* Tag filtering styles */
.tag-filter {
    transition: all 0.2s ease-in-out;
}

.tag-filter.active {
    @apply bg-blue-100 text-blue-800;
}

.tag-badge {
    transition: all 0.2s ease-in-out;
}

.tag-badge:hover {
    @apply bg-blue-200;
}

/* React-like CSS for file drop area */
.file-drop-area.is-active {
    @apply border-blue-500 bg-blue-50;
}

#file-preview-container {
    text-align: center;
    margin-top: 1rem;
}

#active-filters {
    transition: all 0.3s ease;
}
