/* File Manager Styles */
/* =================== */

.file-manager-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 1rem;
}

.file-manager-header {
  background: white;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.file-item {
  transition: all 0.2s ease;
  border: 1px solid #e5e7eb;
}

.file-item:hover {
  border-color: var(--primary-light);
  box-shadow: 0 4px 6px rgba(43, 58, 92, 0.1);
  transform: translateY(-1px);
}

.file-list-container {
  background: white;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Upload Modal Styles */
.upload-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.upload-modal.hidden {
  display: none;
}

.upload-modal-content {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

.upload-modal-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.upload-modal-close {
  background: none;
  border: none;
  padding: 0.5rem;
  border-radius: 0.375rem;
  color: var(--neutral-dark);
  cursor: pointer;
  transition: colors 0.2s;
}

.upload-modal-close:hover {
  color: var(--primary-dark);
  background: var(--background-light);
}

.upload-modal-body {
  padding: 1.5rem;
  flex: 1;
  overflow-y: auto;
}

.upload-modal-footer {
  padding: 1.5rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Button Styles */
.btn-primary {
  background: var(--primary-dark);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover {
  background: var(--primary-medium);
}

.btn-secondary {
  background: var(--neutral-light);
  color: var(--primary-dark);
  border: 1px solid var(--neutral-dark);
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary:hover {
  background: var(--neutral-dark);
  color: white;
  border-color: var(--primary-medium);
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

/* Form Styles */
.form-control {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--neutral-light);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(124, 146, 194, 0.1);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary-dark);
  margin-bottom: 0.25rem;
}

/* Google Drive Specific Styles */
.google-drive-file-item {
  border: 1px solid var(--neutral-light);
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
}

.google-drive-file-item:hover {
  border-color: var(--primary-light);
  box-shadow: 0 2px 4px rgba(124, 146, 194, 0.1);
}

.google-drive-icon {
  color: var(--green-medium);
}

/* File Source Indicator */
.file-source-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.file-source-badge.google-drive {
  background: rgba(70, 126, 87, 0.1);
  color: var(--green-dark);
}

.file-source-badge.upload {
  background: rgba(124, 146, 194, 0.1);
  color: var(--primary-dark);
}

/* File Type Icons */
.file-type-icon {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
}

/* Category Colors */
.category-portfolio { background-color: #dbeafe; color: #1e40af; }
.category-risk { background-color: #fee2e2; color: #dc2626; }
.category-compliance { background-color: #d1fae5; color: #059669; }
.category-templates { background-color: #ede9fe; color: #7c3aed; }
.category-reports { background-color: #fef3c7; color: #d97706; }
.category-meeting { background-color: #e0e7ff; color: #5b21b6; }
.category-general { background-color: #f3f4f6; color: #374151; }

/* Responsive Design */
@media (max-width: 768px) {
  .file-manager-container {
    padding: 0.5rem;
  }
  
  .file-manager-header {
    padding: 1rem;
  }
  
  .file-list-container {
    padding: 1rem;
  }
  
  .file-item {
    padding: 1rem;
  }
  
  .file-item .flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .file-item .flex-shrink-0:last-child {
    align-self: flex-end;
    margin-top: 0.5rem;
  }
}

/* Loading States */
.loading-spinner {
  border: 2px solid #f3f4f6;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* File Upload Drag & Drop */
.upload-dropzone {
  border: 2px dashed #d1d5db;
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: #3b82f6;
  background-color: #eff6ff;
}

.upload-dropzone.dragover {
  border-style: solid;
}

/* File Actions */
.file-actions {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.file-item:hover .file-actions {
  opacity: 1;
}

/* Statistics Cards */
.stats-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.stats-card.documents {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stats-card.templates {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stats-card.storage {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

/* Search and Filter Bar */
.search-filter-bar {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

/* Tags */
.file-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  background-color: #f3f4f6;
  color: #374151;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  margin: 0.125rem;
}

.file-tag:hover {
  background-color: #e5e7eb;
}

/* Template Variables */
.template-variables {
  background: #fef7ff;
  border: 1px solid #e9d5ff;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-top: 1rem;
}

.template-variable {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.template-variable:last-child {
  border-bottom: none;
}

/* File Preview */
.file-preview {
  max-width: 200px;
  max-height: 150px;
  object-fit: cover;
  border-radius: 0.25rem;
  border: 1px solid #e5e7eb;
}

/* Notifications */
.notification-enter {
  transform: translateX(100%);
  opacity: 0;
}

.notification-enter-active {
  transform: translateX(0);
  opacity: 1;
  transition: all 0.3s ease;
}

.notification-exit {
  transform: translateX(0);
  opacity: 1;
}

.notification-exit-active {
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
}

/* Custom Scrollbar */
.file-list-container {
  max-height: 600px;
  overflow-y: auto;
}

.file-list-container::-webkit-scrollbar {
  width: 6px;
}

.file-list-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.file-list-container::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.file-list-container::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}