/* ===== FONTS ===== */
@font-face {
  font-family: arkhip;
  font-style: normal;
  font-weight: 400;
  src: local("Arkhip"), url("/assets/fonts/arkhip.woff") format("woff");
  font-display: swap;
}

/* ===== VARIABLES ===== */
:root {
  /* Core palette */
  /* Primary Colors */
  --color1: #2f1d6d; /* Deep Purple */
  --color2: #3caf2f; /* Vibrant Green */
  --color3: #1392db; /* Bright Blue */
  --color4: #f3b23f; /* Warm Yellow */

  /* Secondary & Complementary Colors */
  --color5: #d72638; /* Bold Red */
  --color6: #ff5700; /* Vivid Orange */
  --color7: #ffcc00; /* Bright Gold */
  --color8: #7d3cff; /* Electric Violet */

  /* Darker Tones */
  --color9: #1b123d; /* Midnight Purple */
  --color10: #245021; /* Forest Green */
  --color11: #0b5a88; /* Deep Ocean Blue */
  --color12: #9c6500; /* Burnt Amber */

  /* Pastel & Softer Shades */
  --color13: #f4a6d7; /* Soft Pink */
  --color14: #a1e8af; /* Mint Green */
  --color15: #89c2d9; /* Sky Blue */
  --color16: #f8e16c; /* Soft Lemon */

  /* Grayscale */
  --gray-100: #f9f9f9;
  --gray-200: #ebebeb;
  --gray-300: #d9d9d9;
  --gray-400: #c4c4c4;
  --gray-500: #a0a0a0;
  --gray-600: #7d7d7d;
  --gray-700: #555555;
  --gray-800: #373737;
  --gray-900: #1a1a1a;

  /* Semantic colors */
  --color-primary: var(--color3);
  --color-secondary: var(--color4);
  --color-tertiary: var(--color2);
  --color-primary-dark: var(--color11);
  --color-secondary-dark: var(--color12);
  --color-tertiary-dark: var(--color10);
  --error: var(--color6);

  /* UI Elements */
  --progress-width: 0;
  --progress-opacity: 0;
  --show-back-button: none;
  --show-drawer-button: flex;
  --show-link-button: flex;

  --bg: url(/assets/img/bg/waves.webp);
  --bg-primary: var(--gray-100);
  --bg-secondary: var(--gray-200);
  --bg-tertiary: var(--gray-300);
  --text-primary: var(--gray-900);
  --border-color: var(--gray-500);
  --text-secondary: var(--gray-700);
  --bg-transparent-primary: rgba(249, 249, 249, 0.6);
  --bg-transparent-secondary: rgba(249, 249, 249, 0.5);
  --invert: invert(100%);
}

/* ===== THEMES ===== */
* {
  min-width: 0;
  -webkit-tap-highlight-color: transparent;
}

/* ===== BASE ELEMENTS ===== */
body {
  padding: 0;
  margin: 0;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  font-family: "Dosis", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  min-height: calc(100vh);
}

h1 {
  font-size: 2.5rem;
  line-height: 1;
  color: var(--text-primary);
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
  transform: translateY(0.5rem);
  text-align: center;
}
h2 {
  font-family: "Bebas Neue", sans-serif;
  font-weight: 400;
  width: 100%;
  font-size: 2rem;
  color: var(--text-primary);
  max-width: 36rem;
  margin: 0;
}

h3 {
  font-family: "Dosis", sans-serif;
  font-weight: 700;
  width: 100%;
  font-size: 1rem;
  color: var(--text-primary);
  max-width: 36rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.fineprint {
  font-family: "Dosis", sans-serif;
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--text-secondary);
  max-width: 36rem;
  width: 100%;
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

a[hx-get] {
  color: inherit;
  text-decoration: none;
  text-decoration-line: underline;
  font-weight: 400;
  font-family: "Dosis", sans-serif;
}

a[hx-get]:hover {
  cursor: pointer;
}

.small-error-text {
  color: var(--error, red);
  font-size: 0.875rem;
}

.big-error-text {
  color: var(--error, red);
  font-size: 1rem;
  text-align: center;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* ===== LAYOUT & CONTAINERS ===== */
#content {
  min-height: calc(100vh);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  gap: 0.5rem;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: background 0.3s ease;
}

#background {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
  transition: background 0.3s ease;
  height: 100vh;
  width: 100vw;
  z-index: -1;
}

.small-container {
  background-color: var(--bg-transparent-primary);
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  max-width: 36rem;
}

.big-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--bg-transparent-primary);
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 0.5rem;
  min-height: calc(100vh - 2rem - 4px);
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  width: calc(100% - 1.5rem);
}

.big-container > * {
  width: 100%;
  max-width: 36rem;
}

.transparent-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 36rem;
}

/* ===== UI COMPONENTS ===== */
.separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
  width: 100%;
  color: var(--text-secondary) !important;
  max-width: 36rem;
}

.separator > * {
  color: var(--text-secondary) !important;
}

.separator::before,
.separator::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--text-secondary);
}

.separator span {
  padding: 0 10px;
  color: #888;
}

.icon {
  margin-right: 10px;
}

/* ===== FORM ELEMENTS ===== */
input,
select {
  width: 100%;
  max-width: 36rem;
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
  box-sizing: border-box;
  border-radius: 0.375rem;
  border-width: 2px;
  border-style: solid;
  outline: 2px solid transparent;
  outline-offset: 2px;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  background-color: var(--bg-secondary, white);
  color: var(--text-primary, black);
  border-color: var(--border-color, black);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-shadow: none;
  font-family: inherit;
  font-size: inherit;
}

input[type="password"] {
  padding-right: 2.5rem;
}

input:focus,
select:focus {
  border-style: dashed;
}

button[type="submit"],
button[hx-get] {
  max-width: 36rem;
  position: relative;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  width: 100%;
  color: var(--gray-100, white);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.375rem;
  height: 40px;
  padding: 0 12px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.primary {
  background: linear-gradient(
    to right,
    var(--color-primary, black),
    var(--color-primary-dark, black)
  );
  border: 2px solid var(--color-primary-dark, white);
}
button.secondary {
  background: linear-gradient(
    to right,
    var(--color-secondary, black),
    var(--color-secondary-dark, black)
  );
  border: 2px solid var(--color-secondary-dark, white);
}
button.tertiary {
  background: linear-gradient(
    to right,
    var(--color-tertiary, black),
    var(--color-tertiary-dark, black)
  );
  border: 2px solid var(--color-tertiary-dark, white);
}

button.big-button {
  width: 100%;
  max-width: 36rem;
  border: none;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* ===== UTILITY CLASSES ===== */
[x-cloak] {
  display: none !important;
}

/* ===== E-POSTER STYLES ===== */
.search-bar {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border-color, #ccc);
  border-radius: 0.5rem;
  background-color: var(--bg-primary, #fff);
  color: var(--text-primary, #333);
  font-family: "Dosis", sans-serif;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-bar:focus {
  outline: none;
  border-color: var(--color1, #007bff); /* Use your theme's accent color */
  box-shadow: 0 0 0 3px var(--accent-color-transparent, rgba(0, 123, 255, 0.25)); /* Softer focus ring */
}

.eposter-pill {
  display: block;
  width: 100%;
  padding: 1rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border-color, #ddd); /* Slightly lighter border */
  border-radius: 0.5rem;
  background-color: var(--bg-secondary, #f8f9fa);
  color: var(--text-primary, #333);
  font-weight: 400; /* Kept from original */
  font-size: 1rem; /* Kept from original */
  text-align: left;
  text-decoration: none;
  box-sizing: border-box;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.eposter-pill:hover {
  background-color: var(--bg-secondary-hover, #eef2f7); /* A slightly different hover color */
  border-color: var(--color3, #007bff);
  color: var(--color3, #007bff); /* Text color changes to accent on hover */
  box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* Softer, more spread shadow */
  text-decoration: none; /* Ensure no underline from browser defaults */
}

.eposter-pill:active {
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.no-results {
  text-align: center;
  padding: 1.5rem 1rem; /* More padding */
  margin-top: 1rem;
  color: var(--text-secondary, #6c757d);
  border-radius: 0.5rem;
  font-style: italic;
}

.eposter-pill h3 {
  margin: 0;
}
