/* Design tokens - single source of truth for the palette used across
   base.css, calendar.css, forms.css and settings.css. Change a value here
   and it applies everywhere the token is referenced. */
:root {
  /* Brand */
  --color-primary: #669bea;
  --color-accent: #0f1175;
  --gradient-brand: linear-gradient(135deg, #669bea 0%, #0f1175 100%);

  /* Neutral scale (slate) - text, borders, surfaces */
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;

  /* Legacy neutral gray scale - older components (calendar grid, forms)
     predate the slate scale above and use plain grays, not blue-grays.
     Kept as a separate scale to avoid a visual shift; consolidate into
     slate-* later if/when that's a deliberate design decision. */
  --gray-900: #333;
  --gray-600: #666;
  --gray-200: #ddd;

  /* Semantic feedback - one color per meaning, reused everywhere instead of
     several near-duplicate greens/blues/reds accumulated over time.
     --color-info was folded into --color-primary (same meaning: brand blue).
     --color-share(-dark) was folded into --color-success(-dark) (same
     meaning: positive/accept action). */
  --color-danger: #ef4444;
  --color-danger-dark: #d32f2f;
  --color-success: #10b981;
  --color-success-dark: #059669;

  /* Shape */
  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 5px 15px rgba(102, 126, 234, 0.4);
  --gradient-danger: linear-gradient(135deg, #ef4444 0%, #d32f2f 100%);
  --shadow-danger-hover: 0 5px 15px rgba(239, 68, 68, 0.4);
}

/* Base reset and shared utilities */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

a {
  text-decoration: none;
}

.button-container {
  display: flex;
  /* Aktivuje Flexbox */
  flex-direction: row;
  /* Položky budou vedle sebe (výchozí nastavení) */
  gap: 5px;
  /* Moderní způsob, jak vytvořit mezeru mezi tlačítky */
  justify-content: flex-start;
  /* Zarovná tlačítka doleva (lze použít center nebo space-between) */
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.btn-secondary {
  background: var(--color-primary);
  color: white;
  display: flex;
  justify-content: center;
  /* Horizontální vycentrování */
  align-items: center;
  /* Vertikální vycentrování */
  padding: 10px 20px;
  /* Vnitřní okraj pro velikost */
}

/* Zvýraznění aktuální stránky v hlavní navigaci */
.btn-secondary.active {
  background: var(--color-accent);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
  cursor: default;
}

.btn-secondary.active:hover {
  transform: none;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}


.btn-primary {
  background: var(--gradient-brand);
  color: white;
  display: flex;
  justify-content: center;
  /* Horizontální vycentrování */
  align-items: center;
  /* Vertikální vycentrování */
  padding: 10px 20px;
  /* Vnitřní okraj pro velikost */
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-logout {
  background: var(--gradient-danger);
  color: white;
  width: 100%;
}

.btn-logout:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-danger-hover);
}

.delete-button {
  background: var(--color-danger);
  color: white;
  border: none;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.8em;
}

/* Utilities */
.mt-10 {
  display: inline-block;
  margin-top: 10px;
}

.flex-1 {
  flex-grow: 1;
}

.error {
  color: var(--color-danger-dark);
  margin-top: 5px;
  font-size: 14px;
}

.errorlist {
  color: var(--color-danger-dark);
  font-size: 13px;
  margin-top: -10px;
  margin-bottom: 10px;
}

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #222;
  color: #fff;
  padding: 15px 20px;
  display: none;
  /* Skryté, dokud JS nerozhodne jinak */
  justify-content: center;
  align-items: center;
  gap: 20px;
  z-index: 10000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  font-family: sans-serif;
  font-size: 14px;
}

#cookie-banner p {
  margin: 0;
}

.cookie-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.cookie-btn-accept {
  background-color: var(--color-success);
  color: white;
}

.cookie-btn-deny {
  background-color: var(--color-danger);
  color: white;
}

@media (max-width: 600px) {
  #cookie-banner {
    flex-direction: column;
    text-align: center;
  }
}

/* Toast Notifications Styling */
#notification-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 320px;
  pointer-events: none;
}

.notification-toast {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-left: 4px solid var(--color-primary);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  pointer-events: auto;
  cursor: pointer;
  transform: translateX(360px);
  animation: toast-slide-in 0.3s forwards cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.3s;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.notification-toast:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.notification-toast.hide {
  animation: toast-slide-out 0.3s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  position: relative;
}

.toast-icon {
  font-size: 1.1rem;
}

.toast-title {
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--slate-800);
  margin-right: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast-close {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--slate-400);
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  line-height: 1;
}

.toast-close:hover {
  color: var(--slate-600);
}

.toast-body {
  font-size: 0.85rem;
  color: var(--slate-600);
  line-height: 1.4;
}

@keyframes toast-slide-in {
  to {
    transform: translateX(0);
  }
}

@keyframes toast-slide-out {
  to {
    transform: translateX(360px);
    opacity: 0;
  }
}

/* Responsive adjustments for mobile devices */
@media (max-width: 768px) {
  .header {
    padding: 15px;
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .button-container {
    flex-direction: column;
    width: 100%;
  }

  .button-container .btn {
    width: 100%;
    justify-content: center;
  }

  .header>div:first-child {
    text-align: center;
  }

  .header h1 {
    font-size: 20px;
  }

  .hamburger-btn {
    display: block !important;
  }

  .user-info {
    display: none !important;
    flex-direction: column;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    padding-bottom: 8px;
    width: 100%;
    gap: 8px;
  }

  .user-info.show-menu {
    display: flex !important;
  }

  /* .user-info::-webkit-scrollbar {
    height: 4px;
  }

  .user-info::-webkit-scrollbar-thumb {
    background: var(--slate-300);
    border-radius: 4px;
  } */

  .btn,
  .btn-secondary,
  .btn-primary,
  .btn-logout {
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
    height: auto;
  }

  .user-info .btn-secondary,
  .user-info form .btn-logout {
    justify-content: center;
    width: 100%;
    text-align: center;
  }

  #notification-toast-container {
    width: calc(100% - 40px);
    left: 20px;
    right: 20px;
    top: 10px;
  }
}