/* flash */
.flash-message {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease, margin 0.3s ease;
    max-height: 100px;
}
.flash-message.flash-hide {
    opacity: 0;
    transform: translateY(-20px);
    max-height: 0;
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border: none !important;
}

/* top loader bar */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa, #1d4ed8);
    z-index: 9999;
    transition: width 0.2s ease-out, opacity 0.4s ease-out;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.7);
}

/* sidebar */
.sidebar-collapsed {
    width: 4.5rem !important;
}
.sidebar-collapsed .sidebar-text,
.sidebar-collapsed .sidebar-header-text,
.sidebar-collapsed .sidebar-footer-text,
.sidebar-collapsed .mascot-text-box {
    display: none !important;
}
.sidebar-collapsed .sidebar-nav-item {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.sidebar-collapsed .sidebar-section-title {
    display: none !important;
}
.sidebar-collapsed .mascot-wrapper {
    justify-content: center !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

/* scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.3);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.5);
}

/* bot */
@keyframes legLeftWalk {
    0%, 100% { transform: rotate(-18deg); }
    50% { transform: rotate(18deg); }
}
@keyframes legRightWalk {
    0%, 100% { transform: rotate(18deg); }
    50% { transform: rotate(-18deg); }
}
@keyframes bodyBob {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-2px); }
}
@keyframes zzzFloat {
    0% { opacity: 0; transform: translate(0, 0) scale(0.6); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translate(8px, -12px) scale(1.1); }
}
.bot-walking #bot-leg-left {
    animation: legLeftWalk 0.5s infinite ease-in-out;
    transform-origin: 10px 17px;
}
.bot-walking #bot-leg-right {
    animation: legRightWalk 0.5s infinite ease-in-out;
    transform-origin: 14px 17px;
}
.bot-walking #bot-body {
    animation: bodyBob 0.5s infinite ease-in-out;
}
.bot-sleeping #bot-eye-open {
    display: none;
}
.bot-sleeping #bot-eye-closed {
    display: block !important;
}
.bot-sleeping #bot-antenna-light {
    fill: #94a3b8 !important;
}
.bot-sleeping #bot-zzz {
    display: block !important;
    animation: zzzFloat 2s infinite ease-in-out;
}

/* dark/light theme */
html.dark, html.dark body {
    background-color: #020617 !important; /* zodpovedá slate-950 */
    color: #f8fafc !important;
}
html.dark aside {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}
html.dark .bg-white {
    background-color: #1e293b !important;
    color: #f8fafc !important;
}
html.dark .text-gray-900,
html.dark .text-gray-800,
html.dark .text-gray-700 {
    color: #f1f5f9 !important;
}
html.dark .border-gray-200,
html.dark .border-gray-700 {
    border-color: #334155 !important;
}
html.dark input, 
html.dark select, 
html.dark textarea {
    background-color: #334155 !important;
    color: #f8fafc !important;
    border-color: #475569 !important;
}
html.dark button:not(.bg-blue-600):not(.bg-red-500):not(.bg-amber-500):not(.bg-rose-600) {
    color: #f1f5f9;
}
html.dark .bg-slate-100, 
html.dark .bg-gray-100 {
    background-color: #334155 !important;
    color: #f8fafc !important;
}
html.dark .text-slate-600, 
html.dark .text-gray-600,
html.dark .text-slate-700,
html.dark .text-gray-700 {
    color: #cbd5e1 !important;
}

/* backgrund */
.bg-grid-pattern {
    position: relative;
}
.bg-grid-pattern::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    background-image: radial-gradient(rgba(59, 130, 246, 0.05) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
}

html.dark .bg-grid-pattern::before {
    background-image: radial-gradient(rgba(147, 197, 253, 0.05) 1.5px, transparent 1.5px) !important;
    background-size: 24px 24px !important;
}

.cell-interactive {
    cursor: pointer;
    position: relative;
}
.cell-interactive:hover::after {
    content: '+';
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    inset: 2px;
    background-color: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    font-weight: bold;
    border-radius: 0.25rem;
}

/* CSS štýly pre prepínač */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  vertical-align: middle;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #007bff;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.switch-label {
  margin-left: 8px;
  font-weight: 500;
  vertical-align: middle;
}