/**
 * css/layout.css
 * --------------
 * Global application layout:
 * - App-level flex structure (.app-layout)
 * - Main workspace (.main-workspace) connected to collapsible sidebar
 * - Thin sticky footer bar (.workspace-footer)
 * - 3-column dashboard grid layout & card primitives
 * - Tabbed view viewports (.tab-content)
 * - Toast notification overlays and responsive breakpoints
 */

.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background-color: var(--bg-dark);
  position: relative;
}

/* Main Workspace (Shifts smoothly to right of sidebar) */
.main-workspace {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Main Workspace Content Area */
.workspace-content {
  flex: 1;
  padding: 24px 28px 60px 28px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* Tabbed Content Switching */
.tab-content {
  display: none;
  animation: tabFadeIn 0.25s ease-out;
}

.tab-content.active {
  display: block;
}

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

/* Main Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 340px 1fr 380px;
  gap: 24px;
}

@media (max-width: 1280px) {
  .dashboard-grid {
    grid-template-columns: 320px 1fr;
  }
  .thoughts-stream-card {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .thoughts-stream-card {
    grid-column: span 1;
  }
  .workspace-content {
    padding: 16px 14px 70px 14px;
  }
}

/* Cards Common */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
}

/* Thin Workspace Footer Bar (Connected to right side of drawer) */
.workspace-footer {
  height: 38px;
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-color);
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-dim);
  z-index: 40;
}

.footer-left,
.footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-left .divider,
.footer-right .divider {
  color: rgba(255, 255, 255, 0.15);
}

.footer-action-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s;
}

.footer-action-link:hover {
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
}

/* Modal / Toast Notifications */
.toast-notice {
  position: fixed;
  bottom: 48px;
  right: 24px;
  background: #111827;
  border: 1px solid var(--accent-emerald);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999;
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}
