/* Base styles */
:root {
  --color-primary: #051821;
  --color-primary-light: rgba(5, 24, 33, 0.6);
  --color-primary-lighter: rgba(5, 24, 33, 0.38);
  --color-interactive: #051821;
  --color-secondary: #505d64;
  --color-tertiary: #828c90;
  --color-error: #e3290f;
  --color-error-light: #fceae7;
  --color-error-lighter: #f9d4cf;
  --color-border: #e6e8e9;
  --color-background-light: #f3f4f6;
  --header-gradient-start: #AE1B52; /* Vibrant magenta */
  --header-gradient-end: #581A3B; /* Dark burgundy */
  --content-bg: #f9fafb; /* Light gray for content area */
}

html {
  font-size: 16px;
}

html,
body {
  height: 100%;
  font-family: 'EuclidB', 'Helvetica', sans-serif;
  font-size: 1rem;
  line-height: 1.5rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--color-primary);
  background-color: #fff;
}

/* Sidebar specific styles */
.sidebar {
  width: 244px;
  border-right: 1px solid transparent; /* Default state has transparent border */
  transition: border-right 0.2s ease;
}

.sidebar:hover {
  border-right: 1px solid #f3f4f6; /* Ultra's exact color from $dark-palette, 100 */
}

/* Apply hover transitions for non-active items only */
.sidebar a:not(.bg-gray-800) {
  transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Active state styling */
.sidebar a.bg-gray-800 {
  background-color: #1f2937; /* Ensure consistent bg color */
  color: white;
}

/* Icon color in active state */
.sidebar a.bg-gray-800 svg {
  color: white;
}

/* Hover behaviors for non-active items */
.sidebar a:hover:not(.bg-gray-800) {
  background-color: rgba(229, 231, 235, 0.75); /* lighter hover for non-active */
}

.sidebar-nav-item {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.sidebar-section-header {
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  text-transform: uppercase;
  color: var(--color-primary-light);
}

/* Typography scale */
h1, .h1 {
  font-size: 20px;
  font-weight: 500;
  line-height: 24px;
}

h2, .h2 {
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
}

.body-text {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.small-text {
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

/* Text states */
.text-disabled {
  color: var(--color-primary-lighter);
}

.text-interactive {
  color: var(--color-primary);
}

.text-error {
  color: var(--color-error);
}

/* Links */
a {
  text-decoration: underline;
  text-underline-offset: .08em;
  text-decoration-thickness: .0625em;
  /* Exact LXP link color - updated to black */
  color: #051821;
}

a:hover {
  text-decoration: none;
}

/* Focus states */
:focus-visible {
  outline: .125rem solid #051821;
  outline-offset: .125rem;
  box-shadow: 0 0 0 .125rem #fff;
}

::selection {
  color: var(--color-primary);
  background-color: rgba(5, 24, 33, 0.2);
}

::placeholder {
  color: var(--color-secondary);
}

/* Buttons */
.button {
  font-weight: 700;
  font-size: 1rem;
  font-family: 'EuclidB', 'Helvetica', sans-serif;
  line-height: 1.5rem;
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  justify-content: center;
  min-width: 5rem;
  padding: .4375rem .9375rem;
  text-align: center;
  text-decoration: none;
  border-style: solid;
  border-width: 1px;
  border-radius: .25rem;
  cursor: pointer;
  appearance: none;
}

.button[disabled] {
  cursor: not-allowed;
}

.button--small {
  font-size: .875rem;
  line-height: 1rem;
  min-width: 0;
}

.button--full-width {
  width: 100%;
}

/* Primary buttons */
.button--primary {
  color: #fff;
  background-color: #051821;
  border-color: #051821;
}

.button--primary:hover {
  color: #fff;
  background-color: #192e37;
  border-color: #192e37;
}

.button--primary:active {
  color: #fff;
  background-color: #223a42;
  border-color: #223a42;
}

.button--primary[disabled] {
  color: #fff;
  background-color: #cdd1d3;
  border-color: #cdd1d3;
}

/* Secondary buttons */
.button--secondary {
  color: var(--color-primary);
  background-color: var(--color-background-light);
  border-color: var(--color-background-light);
}

.button--secondary:hover {
  background-color: #e6e8e9;
  border-color: #e6e8e9;
}

.button--secondary:active {
  background-color: #cdd1d3;
  border-color: #cdd1d3;
}

.button--secondary[disabled] {
  color: var(--color-tertiary);
  background-color: var(--color-background-light);
  border-color: var(--color-background-light);
}

/* Tertiary buttons */
.button--tertiary {
  color: #051821;
  background-color: transparent;
  border-color: currentcolor;
}

.button--tertiary:hover {
  color: #192e37;
  background-color: rgba(5, 24, 33, 0.08);
}

.button--tertiary:active {
  color: #223a42;
  background-color: rgba(5, 24, 33, 0.16);
}

.button--tertiary[disabled] {
  color: var(--color-tertiary);
  background-color: transparent;
  border-color: var(--color-tertiary);
}

/* Studytube header styles */
.bg-brand-gradient {
  background: radial-gradient(
    ellipse at top right,
    var(--header-gradient-start),
    var(--header-gradient-end) 80%
  );
}

.page-header {
  border-radius: 1rem;
  box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.10);
  margin-bottom: 1rem;
  overflow: hidden;
}

.page-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 4rem;
  font-family: 'Aeonik', 'Helvetica', sans-serif;
}

.dropdown-menu {
  min-width: 12rem;
  position: absolute;
  right: 0;
  margin-top: 0.25rem;
  z-index: 10;
  background-color: white;
  border-radius: 0.375rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: #4b5563;
}

.dropdown-item:hover {
  background-color: #f3f4f6;
}

/* Main content area */

.main-content-container {
  min-width: 100%;
}

.sidebar-container + .main-content-container {
  min-width: calc(100% - 244px);
}

.main-content-container,
.main-content {
  background-color: var(--content-bg);
  min-height: calc(100vh - 64px); /* Adjust based on topbar height */
}

.content-container {
  padding: 1rem;
}

.content-box {
  background-color: white;
  border-radius: 1rem;
  box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.10);
  overflow: hidden;
}
