/* ===== MODERN HOME PAGE STYLING ===== */

/* CSS Variables for consistent theming */
:root {
  --primary-blue: #3b82f6;
  --primary-blue-dark: #2563eb;
  --secondary-blue: #6366f1;
  --accent-purple: #8b5cf6;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --border-light: #e5e7eb;
  --border-medium: #d1d5db;
  --success-green: #10b981;
  --warning-orange: #f59e0b;
  --danger-red: #ef4444;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ===== MAIN APP CONTAINER ===== */
/* Note: Layout handled by base.css - this file only styles the panels */

/* ===== VIEWER PANEL ===== */
.viewer-panel {
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

/* Mobile viewer panel styling */
@media (max-width: 900px) {
  .viewer-panel {
    flex-shrink: 0;
    min-height: 0;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }
}

/* ===== VIEWER CONTAINER ===== */
.viewerContainer {
  height: 100%;
  width: 100%;
  overflow: auto;
  background: var(--bg-primary);
}

.pdfViewer {
  background: var(--bg-primary);
}

/* ===== VIEWER PLACEHOLDER ===== */
#viewer-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  width: 100%;
  text-align: center;
  padding: 4rem 2rem 2rem;
}

.vp-empty {
  max-width: 400px;
  margin-top: 2rem;
}

.vp-empty[hidden] {
  display: none !important;
}

.vp-empty p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.vp-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.vp-loading[hidden] {
  display: none !important;
}

.vp-loading p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ===== LOADING SPINNER ===== */
.spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--border-light);
  border-top-color: var(--primary-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== DRAG DIVIDER ===== */
#dragDivider {
  width: 8px;
  background: var(--border-light);
  cursor: col-resize;
  transition: background-color 0.3s ease;
  position: relative;
  z-index: 10;
}

/* Mobile divider styling */
@media (max-width: 900px) {
  #dragDivider {
    width: 100%;
    height: 10px;
    cursor: row-resize;
    background: var(--border-light);
    flex-shrink: 0;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
}

#dragDivider:hover {
  background: var(--primary-blue);
}

#dragDivider:focus {
  outline: 2px solid var(--primary-blue);
  outline-offset: -2px;
}

/* ===== SIDE PANEL ===== */
.side-panel {
  background: var(--bg-primary);
  border-left: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

/* Mobile side panel styling */
@media (max-width: 900px) {
  .side-panel {
    border-left: none;
    border-top: 1px solid var(--border-light);
    flex: 1;
    min-height: 0;
  }
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border-bottom: 1px solid var(--border-light);
}

.tabs li {
  flex: 1;
  text-align: center;
}

.tabs li a {
  display: block;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  position: relative;
}

.tabs li a:hover {
  background: rgba(59, 130, 246, 0.05);
  color: var(--text-primary);
}

.tabs li.active a {
  background: var(--bg-primary);
  color: var(--primary-blue);
  font-weight: 600;
  border-bottom-color: var(--primary-blue);
  box-shadow: var(--shadow-sm);
}

.tabs li.active a::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--bg-primary);
}

/* ===== TAB CONTENT ===== */
.tab-content {
  flex: 1;
  overflow: hidden; /* Let child containers handle their own scrolling */
  padding: 1.5rem;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  min-height: 0; /* Allow flex child to shrink */
}

/* ===== RESPONSIVE DESIGN ===== */
/* Note: Responsive layout handled by base.css and JavaScript */

/* Responsive styles removed - handled by base.css and JavaScript */

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --bg-primary: #1f2937;
    --bg-secondary: #374151;
    --bg-tertiary: #4b5563;
    --border-light: #4b5563;
    --border-medium: #6b7280;
  }
  
  .app-container {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  }
  
  .viewer-panel,
  .side-panel {
    background: var(--bg-primary);
    border-color: var(--border-light);
  }
  
  .tabs {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  }
  
  .tabs li a:hover {
    background: rgba(59, 130, 246, 0.1);
  }
  
  .tabs li.active a {
    background: var(--bg-primary);
  }
}