/**
 * Arc Theme for Super Productivity
 * Dark theme inspired by Arc Dark design
 * Clean, modern, and optimized
 */

/* Smooth transitions */
:root {
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
}

/* Arc dark theme variables */
body.isDarkTheme {
  /* ===============================
   * ARC COLOR PALETTE
   * ===============================*/

  --arc-bg-dark: #2d323d;
  --arc-bg-medium: #383c4a;
  --arc-bg-light: #444a58;
  --arc-bg-lighter: #4e5467;
  --arc-sidebar: #2e343e;
  --arc-text: #c5cfd9;
  --arc-text-bright: #d3dae3;
  --arc-blue: #5294e2;
  --arc-selection: #4a5466;

  /* ===============================
   * BACKGROUND COLORS
   * ===============================*/

  /* Main backgrounds */
  --bg: var(--arc-bg-dark);
  --bg-darker: #262933;
  --bg-slightly-lighter: #2f3341;
  --bg-lighter: var(--arc-bg-medium);
  --bg-lightest: var(--arc-bg-light);
  --bg-super-light: var(--arc-bg-lighter);

  /* Component backgrounds */
  --card-bg: var(--arc-bg-medium);
  --sidenav-bg: var(--arc-sidebar);
  --selected-task-bg-color: var(--arc-bg-medium);
  --banner-bg: var(--arc-bg-medium);

  /* Task backgrounds with better hierarchy */
  --task-c-bg: #2f3341;
  --task-c-selected-bg: var(--arc-bg-medium);
  --sub-task-c-bg: #2f3341;
  --sub-task-c-bg-done: #2a2e3a;
  --task-c-bg-done: #2a2e3a;
  --task-c-current-bg: var(--arc-selection);
  --task-c-drag-drop-bg: var(--arc-selection);
  --sub-task-c-bg-in-selected: #353947;

  /* Note backgrounds */
  --standard-note-bg: var(--arc-bg-medium);
  --standard-note-bg-hovered: #3e4355;

  /* ===============================
   * TEXT COLORS
   * ===============================*/

  --text-color: var(--arc-text);
  --text-color-less-intense: rgba(197, 207, 217, 0.87);
  --text-color-muted: rgba(197, 207, 217, 0.54);
  --text-color-more-intense: var(--arc-text-bright);
  --text-color-most-intense: #ffffff;

  /* Note text */
  --standard-note-fg: var(--arc-text);

  /* Task detail */
  --task-detail-value-color: rgba(197, 207, 217, 0.7);

  /* ===============================
   * BORDERS & SEPARATORS
   * ===============================*/

  --extra-border-color: #252833;
  --separator-color: rgba(37, 40, 51, 0.6);
  --divider-color: var(--arc-sidebar);

  /* Chip borders */
  --chip-outline-color: rgba(197, 207, 217, 0.23);

  /* ===============================
   * ACCENT & THEME COLORS
   * ===============================*/

  /* Arc signature blue accent */
  --palette-accent-500: var(--arc-blue);
  --c-accent: var(--arc-blue);
  --palette-accent-100: #b9d4f3;
  --palette-accent-200: #9cc3ee;
  --palette-accent-300: #7fb2ea;
  --palette-accent-400: #62a0e6;
  --palette-accent-600: #4a85ca;
  --palette-accent-700: #3f76b8;
  --palette-accent-800: #3567a6;
  --palette-accent-900: #2a5894;

  /* ===============================
   * UI ELEMENTS
   * ===============================*/

  /* Scrollbar - Arc styled */
  --scrollbar-thumb: #3e4350;
  --scrollbar-thumb-hover: #4a4f5e;
  --scrollbar-track: var(--arc-bg-dark);

  /* Close button */
  --close-btn-bg: var(--arc-bg-medium);
  --close-btn-border: transparent;

  /* Select/Options */
  --select-hover-bg: rgba(82, 148, 226, 0.12);
  --options-border-color: rgba(82, 148, 226, 0.2);

  /* Attachments */
  --attachment-bg: var(--arc-bg-medium);
  --attachment-border: transparent;
  --attachment-control-bg: rgba(0, 0, 0, 0.3);
  --attachment-control-border: transparent;
  --attachment-control-hover-bg: rgba(0, 0, 0, 0.7);

  /* Grid */
  --grid-color: rgba(197, 207, 217, 0.08);

  /* Progress */
  --progress-bg: rgba(197, 207, 217, 0.15);

  /* Improvement banner */
  --improvement-text: var(--arc-text-bright);
  --improvement-border: rgba(82, 148, 226, 0.3);
  --improvement-button-text: #ffffff;

  /* ===============================
   * SHADOWS - SUBTLE
   * ===============================*/

  /* Subtle shadows for depth */
  --shadow-key-umbra-opacity: 0.2;
  --shadow-key-penumbra-opacity: 0.14;
  --shadow-ambient-shadow-opacity: 0.12;

  /* Task shadows */
  --task-current-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  --task-selected-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);

  /* ===============================
   * HOVER CONTROLS
   * ===============================*/

  --hover-controls-border: 1px solid rgba(82, 148, 226, 0.3);
  --hover-controls-border-opacity: 0.3;

  /* ===============================
   * INTERACTION STATES
   * ===============================*/

  --hover-bg-opacity: 0.04;
  --focus-bg-opacity: 0.08;
  --pressed-bg-opacity: 0.12;
  --disabled-opacity: 0.38;
}

/* Hide gradient backgrounds */
body::before,
body .first-line:hover .hover-controls::before {
  display: none !important;
}

/* Apply background and text colors */
body,
body.isDarkTheme {
  background-color: var(--bg);
  color: var(--text-color);
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal);
}

/* Page wrapper */
body .page-wrapper,
body.isDarkTheme .page-wrapper {
  color: var(--text-color);
}

/* Links with Arc accent */
a,
body a[href],
body.isDarkTheme a[href] {
  color: var(--c-accent);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

a:hover,
body a[href]:hover,
body.isDarkTheme a[href]:hover {
  opacity: 0.8;
}

/* Smooth hover states */
.task-c:hover,
.sub-task-c:hover {
  background-color: var(--task-c-selected-bg);
  transition: background-color var(--transition-fast);
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

/* Material overrides for Arc theme */
body.isDarkTheme {
  --mat-theme-surface: var(--card-bg);
  --mat-theme-on-surface: var(--text-color);
  --mat-theme-background: var(--bg);
  --mat-theme-primary: var(--arc-blue);
  --mat-fab-small-container-color: var(--c-accent);
  --mat-sys-primary-container: var(--c-accent);
}

/* Tables - simplified */
table,
.mat-table {
  color: var(--text-color);
  border-color: var(--extra-border-color);
}

/* Optional Arc light theme support (for future) */
/*
body:not(.isDarkTheme) {
  --arc-bg-dark: #f5f6f7;
  --arc-bg-medium: #ffffff;
  --arc-bg-light: #fafbfc;
  --arc-sidebar: #e7e8eb;
  --arc-text: #3b3e45;
  --arc-text-bright: #2e3238;
  --arc-blue: #5294e2;
}
*/
