/*
 * (C) Dr. Jonathan Ingram 2025. All rights reserved.
 * 
 * File: styles.css
 * System: BEAM
 * 
 * This file is part of the BEAM system.
 * Unauthorized copying of this file, via any medium, is strictly prohibited.
 * Unauthorized use, including but not limited to teaching, training, or fine-tuning
 * any artificial intelligence system; reverse engineering; analysis; reproduction;
 * or the creation of derivative or functionally similar systems, is strictly prohibited.
 */

/* Documents Menu Styles - Mac Finder Style */

/* Main finder window */
#documents-window.finder-window {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Titlebar styles */
#documents-window .titlebar {
  -webkit-user-select: none;
  user-select: none;
}

/* Traffic light buttons */
#documents-window .titlebar button {
  transition: all 0.1s ease;
}

#documents-window .titlebar button:hover {
  transform: scale(1.1);
}

#documents-window .titlebar button:active {
  transform: scale(0.95);
}

/* Search box focus state */
#documents-window .titlebar input[type="search"]:focus {
  border-color: #007AFF;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* Sidebar styles */
#documents-window .sidebar {
  -webkit-user-select: none;
  user-select: none;
}

#documents-window .sidebar-item {
  transition: background-color 0.1s ease;
}

#documents-window .sidebar-item:hover {
  background-color: #e8e8e8 !important;
}

#documents-window .sidebar-item:active {
  background-color: #d0d0d0 !important;
}

/* Content area scrollbar */
#documents-window .content::-webkit-scrollbar {
  width: 12px;
}

#documents-window .content::-webkit-scrollbar-track {
  background: transparent;
}

#documents-window .content::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border-radius: 6px;
  border: 2px solid #fff;
}

#documents-window .content::-webkit-scrollbar-thumb:hover {
  background: #a0a0a0;
}

/* Sidebar scrollbar */
#documents-window .sidebar::-webkit-scrollbar {
  width: 8px;
}

#documents-window .sidebar::-webkit-scrollbar-track {
  background: transparent;
}

#documents-window .sidebar::-webkit-scrollbar-thumb {
  background: #d0d0d0;
  border-radius: 4px;
}

#documents-window .sidebar::-webkit-scrollbar-thumb:hover {
  background: #b0b0b0;
}

/* Document grid and list view styles */
#documents-window .documents-grid {
  animation: fadeIn 0.3s ease-in;
}

#documents-window .document-item {
  transition: all 0.15s ease;
  background: transparent !important;
  border: 1px solid transparent !important;
}

#documents-window .document-item:hover {
  background: #f0f0f0 !important;
  border-color: #ddd !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

#documents-window .document-item:active {
  transform: translateY(0) !important;
  background: #e8e8e8 !important;
}

/* Grid layout animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Focus outline for accessibility */
#documents-window .sidebar-item:focus,
#documents-window .document-item:focus {
  outline: 2px solid #007AFF;
  outline-offset: 2px;
}

/* Selection states */
#documents-window .document-item.selected {
  background-color: #007AFF !important;
  color: white !important;
  border-color: #007AFF !important;
}

#documents-window .document-item.selected * {
  color: white !important;
}

/* Document type specific styling */
#documents-window .document-item[data-type="cad"] {
  border-left: 3px solid #34C759;
}

#documents-window .document-item[data-type="bim"] {
  border-left: 3px solid #007AFF;
}

#documents-window .document-item[data-type="pdf"] {
  border-left: 3px solid #FF3B30;
}

#documents-window .document-item[data-type="excel"] {
  border-left: 3px solid #34C759;
}

#documents-window .document-item[data-type="archive"] {
  border-left: 3px solid #FF9500;
}

/* Window shadow enhancement */
#documents-window.finder-window {
  transition: box-shadow 0.2s ease;
}

#documents-window.finder-window:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Responsive grid */
@media (max-width: 1000px) {
  #documents-window .documents-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

@media (max-width: 700px) {
  #documents-window .documents-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

@media (max-width: 500px) {
  #documents-window .documents-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
}

/* Document preview hover effect */
#documents-window .document-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 122, 255, 0.1);
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: 6px;
  pointer-events: none;
}

#documents-window .document-item:hover::after {
  opacity: 1;
}

/* File size and type indicators */
#documents-window .document-item .file-info {
  transition: color 0.15s ease;
}

#documents-window .document-item:hover .file-info {
  color: #666 !important;
}