.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dates-list {
  display: grid;
  gap: 12px;
}
.date-card {
  padding: 14px;
  border-radius: 12px;
  background: var(--card, #131826);
  cursor: pointer;
  transition: transform 0.08s ease;
}
.date-card:hover {
  transform: translateY(-1px);
}
.date-card h3 {
  margin: 0 0 6px;
  font-size: 22px;
}
.date-card h3 small {
  font-weight: normal;
  opacity: 0.8;
}
.date-note {
  margin: 0 0 8px;
  opacity: 0.9;
  display: flex;
  justify-content: center;
}

.date-note::before {
  content: "📝";
  margin-right: 6px;
}

.date-card .actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.fc-h-event .fc-event-main {
  color: var(--fc-event-text-color);
  justify-content: center;
  display: flex;
}

.logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  color: var(--text);
}

.tri-forms {
  --logo-s: 14px; /* FIGŪRAS MALAS pamata izmērs */
  --logo-g: 4px;
  position: relative;
  width: calc(var(--logo-s) * 2 + var(--logo-g));
  height: calc(var(--logo-s) * 2 + var(--logo-g));
  display: inline-block;
}

.tri-forms i {
  position: absolute;
  display: block;
  width: var(--logo-s);
  height: var(--logo-s);
  background: currentColor;
  transition: transform 0.15s ease;
}

.tri-forms .sq {
  left: 0;
  bottom: 0;
  border-radius: 0px;
  background: currentColor;
  background: color-mix(in srgb, currentColor 88%, white 12%);
}

.tri-forms .circ {
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: currentColor;
}

.tri-forms .tri {
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  background: currentColor;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.logo:hover .tri-forms i {
  transform: translateY(-1px);
}
.topbar .logo {
  color: var(--accent);
}

body.light-theme .topbar .logo {
  color: black;
}

:root {
  --bg: #121212;
  --surface: #1e1e1e;
  --card: #2a2a2a;
  --primary: #90caf9;
  --accent: #bb86fc;
  --text: #ffffff;
  --text-muted: #cccccc;
  --border: #333;
}

body.light-theme {
  --bg: #f4f4f4;
  --surface: #ffffff;
  --card: #ffffff;
  --primary: #1976d2;
  --accent: #7b1fa2;
  --text: #000000;
  --text-muted: #555555;
  --border: #cccccc;
}

#calendar {
  margin-top: 2rem;
  background-color: var(--surface, #1e1e1e);
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

#calendar
  > div.fc-view-harness.fc-view-harness-passive
  > div
  > table
  > thead
  > tr
  > th {
  background-color: var(--surface, #1e1e1e);
}

.fc-h-event .fc-event-title-container {
  flex-grow: 1;
  flex-shrink: 1;
  min-width: 0px;
  cursor: pointer;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", sans-serif;
  margin: 0 auto !important;
  padding: 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.topbar {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #1e1e1e;
  padding: 1rem 2rem;
  border-bottom: 1px solid #333;
  border-radius: 10px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  margin-bottom: 0px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links button {
  background-color: transparent;
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s ease;
  border: none;
}

.nav-links button:hover {
  background-color: var(--primary);
  color: #000;
}

h1,
h3 {
  color: var(--primary);
  text-align: center;
}

nav {
  margin-bottom: 1rem;
}

nav a {
  color: var(--accent);
  text-decoration: none;
  margin-right: 1rem;
  margin-left: 1rem;
  font-weight: bold;
}

.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.2s ease, transform 0.1s ease;
}

.card:hover {
  background-color: var(--surface);
  transform: translateY(-2px);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#form-section {
  scroll-margin-top: 80px;
  background-color: var(--surface);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 2rem;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

form label {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 4px;
  margin-top: 10px;
}

input,
textarea {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background-color: var(--card);
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 12px;
  box-sizing: border-box;
  resize: vertical;
}

button {
  background-color: var(--primary);
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  color: #000;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
button:hover {
  background-color: #64b5f6;
}

button[type="button"] {
  background-color: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
button[type="button"]:hover {
  background-color: var(--card);
}

.hidden {
  display: none;
}

.nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.burger {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--primary);
}

.dots-loader {
  text-align: center;
  font-size: 4rem;
  letter-spacing: 0.3rem;
  color: var(--text, #fff);
}

.dots-loader span {
  animation: blink 1.4s infinite;
}

.dots-loader span:nth-child(2) {
  animation-delay: 0.2s;
}

.dots-loader span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0% {
    opacity: 0.2;
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0.2;
  }
}

.hidden {
  display: none;
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  bottom: 50% !important;
  transform: translateX(-50%);
  background-color: var(--card);
  color: var(--text);
  padding: 1rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, bottom 0.4s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  bottom: 50px;
  pointer-events: auto;
}

body.light-theme .toast {
  background-color: #ffffff;
  color: #000000;
  border: 1px solid #ccc;
}

@media (max-width: 568px) {
  body {
    padding: 1rem;
  }
  .nav-links {
    position: absolute;
    top: 70px;
    background-color: var(--surface);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: none;
    z-index: 100;
    gap: 10px;
  }

  .nav-links.show {
    display: flex;
  }

  .burger {
    display: block;
  }
  .nav-container {
    display: flex;
    justify-content: start;
    align-items: center;
    width: 100%;
  }

  .buttonwrapper {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: space-between;
  }

  body {
    padding: 10px;
    font-size: 14px;
  }

  h1 {
    font-size: 1.5rem;
    text-align: center;
    margin: 1rem 0;
  }

  #calendar {
    width: 100%;
    overflow-x: auto;
  }

  .fc {
    font-size: 12px !important;
  }

  .fc-toolbar-title {
    font-size: 1.1rem !important;
  }

  .fc-button {
    font-size: 12px !important;
    padding: 4px 8px !important;
  }

  .fc-daygrid-event {
    font-size: 10px !important;
    padding: 2px 3px !important;
    white-space: normal;
    word-break: break-word;
  }

  .fc-daygrid-day-number {
    font-size: 10px !important;
    padding: 2px;
  }

  .fc .fc-scrollgrid {
    min-width: 100% !important;
  }

  /* Formas sadaļa */
  #form-section {
    margin-top: 20px;
    padding: 1rem;
  }

  #form-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 14px;
  }

  #form-section input,
  #form-section textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 1rem;
    font-size: 14px;
    box-sizing: border-box;
  }

  .buttonwrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .buttonwrapper button {
    font-size: 14px;
    padding: 10px;
  }

  /* Navigācija */
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
  }

  .nav-links {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .burger {
    font-size: 24px;
    margin-bottom: 10px;
  }
}
