/*
TT_Avdun Main CSS
Foundation CSS - Master import file for new CSS architecture
*/

/* === CORE FOUNDATION === */
@import url("./core/reset.73da601d3ed0.css");
@import url("./core/variables.c1cb3b1b5fc8.css");
@import url("./core/utilities.c0212b4fa34f.css");
@import url("./core/responsive.9b345d4ce2d2.css");
@import url("./core/animations.602c56d069cd.css");
@import url("./core/print.a6fa0bf1cf54.css");

/* === LAYOUT SYSTEM === */
@import url("./layout/grid.7ac00b0e1a25.css");
@import url("./layout/header.3de2f88e1982.css");
@import url("./layout/footer.3698a42d5325.css");
@import url("./layout/layout.fbf0d687402f.css");

/* === COMPONENT LIBRARY === */
@import url("./components/buttons.b3c45a846247.css");
@import url("./components/cards.980b6cb0a1dc.css");
@import url("./components/forms.a4234a0ee570.css");
@import url("./components/modals.0d189f2938e9.css");
@import url("./components/tables.f98ce0742728.css");
@import url("./components/alerts.19091581555b.css");
@import url("./components/navigation.8d0415b9721f.css");
@import url("./components/file-upload.4858aa3e031e.css");
@import url("./components/assessment-helper.f80a424f8dac.css");
@import url("./components/entity-picker.817438dedf58.css");
@import url("./components/bug-report.1c5031526d89.css");
@import url("./components/help-button.22eef47541e1.css");
@import url("./components/tag-picker.d025989f5e34.css");
@import url("./components/notifications.267fb061dd11.css");
@import url("./components/breadcrumbs.544f7de7155d.css");
@import url("./components/progress.ecbd3ba046c6.css");
@import url("./components/match-scoring.357245099dc8.css");
@import url("./components/error-boundary.9689d9b2764b.css");
@import url("./components/note-replies.68755eadbd53.css");
@import url("./components/exercise-name-warning.32fc0def2aa2.css");
@import url("./components/exercise-deprecated.2f80b8466d60.css");

/* === GLOBAL PAGE STYLES === */
@import url("./pages/notation.68bb92bf4227.css");
@import url("./pages/live-events.b0922f2cb8c3.css");
@import url("./pages/chat.218f33fa8c30.css");

/* === GLOBAL OVERRIDES === */
/* Base HTML elements using design system */
html {
  font-size: 16px; /* Base for rem calculations */
  line-height: var(--leading-normal);
}

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: var(--text-base);
  color: var(--text-dark);
  background-color: var(--background-white);
  line-height: var(--leading-normal);
  display: flex;
  flex-direction: column;
  max-width: 100vw;
}

/* Typography hierarchy */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: var(--space-md);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); }

/* Text elements */
p {
  margin-bottom: var(--space-md);
  line-height: var(--leading-relaxed);
}

a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--dark-blue);
  text-decoration: underline;
}

/* Lists */
ul, ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

li {
  margin-bottom: var(--space-xs);
}

/* Code elements */
code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: var(--text-sm);
  background-color: var(--background-alt);
  color: var(--text-dark);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
}

pre {
  background-color: var(--background-alt);
  color: var(--text-dark);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: var(--space-md);
}

pre code {
  background: none;
  padding: 0;
}

/* Table elements */
table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: var(--space-md);
}

/* Form elements */
input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
}

/* Focus styles */
*:focus {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

/* Selection styles */
::selection {
  background-color: rgba(var(--primary-blue-rgb), 0.2);
  color: var(--text-dark);
}

/* Scrollbar styles */
::-webkit-scrollbar {
  width: 0.5rem;
  height: 0.5rem;
}

::-webkit-scrollbar-track {
  background-color: var(--background-light);
}

::-webkit-scrollbar-thumb {
  background-color: var(--border-medium);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--primary-blue);
}

/* Main content areas */
main {
  flex: 1;
  padding: var(--space-lg);
}

section {
  margin-bottom: var(--space-xl);
}

/* TT_Avdun specific overrides */
.tt-main-content {
  background-color: var(--background-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-xl);
  margin: var(--space-lg) auto;
  max-width: var(--container-2xl);
}

.tt-page-header {
  display: flex;
  /* Title and action buttons share a row while they fit; on a tablet or a
     sideways phone the buttons move below the title instead of running past
     the right edge of the screen. */
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border-light);
}

.tt-page-title {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--text-dark);
  margin: 0;
}

.tt-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.django-form-error {
  color: var(--error);
  font-size: var(--text-sm);
  margin-top: var(--space-xs);
}

/* Video.js integration overrides */
.vjs-default-skin {
  font-family: inherit;
}

.vjs-big-play-button {
  background-color: rgba(var(--primary-blue-rgb), 0.8) !important;
  border-color: var(--primary-blue) !important;
}

.vjs-control-bar {
  background-color: rgba(0, 0, 0, 0.8) !important;
}

.vjs-play-progress {
  background-color: var(--primary-blue) !important;
}

.fc-event {
  background-color: var(--primary-blue) !important;
  border-color: var(--primary-blue) !important;
  color: var(--text-white) !important;
  font-size: var(--text-sm) !important;
  border-radius: var(--radius-sm) !important;
}

/* Responsive helpers */
@media (max-width: 47.9375rem) {
  main {
    padding: var(--space-md);
  }

  .tt-main-content {
    padding: var(--space-lg);
    margin: var(--space-md) var(--space-sm);
    border-radius: var(--radius-md);
  }

  .tt-page-header {
    flex-direction: column;
    gap: var(--space-md);
    align-items: stretch;
  }

  .tt-page-actions {
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
  }
  /* Without this, 2-3 buttons share the narrow row and each shrinks to
     ~100px wide; .btn's `white-space: normal` then wraps the German
     label vertically, and the pill border-radius turns the result into
     circular balloons (e.g. /videos/ on mobile: "Hinzufügen" wrapped
     across 4 lines inside a circle). Force each button to a full row so
     the natural label width is respected. */
  .tt-page-actions > .btn {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* Dark mode preparation (future enhancement) */
@media (prefers-color-scheme: dark) {
  /* Variables will be overridden in future dark mode implementation */
}

/* High contrast mode */
@media (prefers-contrast: high) {
  * {
    border-color: currentColor !important;
  }

  .btn,
  .form-control {
    border-width: 2px !important;
  }
}

/* Reduced motion - Now handled by animations.css */