/* style.css - moderný glassmorphism + gradient dizajn */
:root { 
  --header-bg: rgba(32, 32, 56, 0.9); 
  --accent-color: #7a3652; /* matching the gradient end color */
  --accent-bg-start: #202038; /* dark gray-blue gradient start color */
  --accent-bg-end: #7a3652; /* dark pink gradient end color */
  --glass-bg: rgba(255, 255, 255, 0.1); /* glass background for contrast */
}

body {
  min-height: 100vh;
  background: #3a3a5a; /* Fallback color */
  background: linear-gradient(160deg, #4a4a6a 0%, #3a3a5a 30%, #5a3a4a 70%, #6a4a5a 100%);
  background-attachment: fixed;
  background-size: cover;
  font-family: 'Poppins', sans-serif;
  color: #f5f5f5;
}

/* Pozadie pre editačný režim na dashboarde */
body.edit-mode-bg {
  background: 
    repeating-linear-gradient(
      -45deg,
      rgba(0, 0, 0, 0),
      rgba(0, 0, 0, 0) 5px,
      rgba(0, 0, 0, 0.03) 5px,
      rgba(0, 0, 0, 0.03) 10px
    ),
    linear-gradient(160deg, #4a4a6a 0%, #3a3a5a 30%, #5a3a4a 70%, #6a4a5a 100%);
  background-attachment: fixed;
  background-size: cover;
}
.glass {
  background: var(--glass-bg);
  box-shadow: 0 8px 32px 0 rgba(31,38,135,0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.25);
  position: relative;
  z-index: 1; /* glassmorphism prvky majú nižší z-index */
}

/* Navbar a dropdown menu fixy pre z-index */
.navbar {
  z-index: 1050 !important;
  position: relative;
}
.dropdown-menu {
  z-index: 2000 !important;
  position: absolute;
  /* Pre moderný vzhľad a správne vrstvenie */
  box-shadow: 0 8px 32px 0 rgba(31,38,135,0.18);
  border-radius: 16px;
}

/* Rieši problém, že .glass alebo iné overlay môžu byť nad dropdownom */

/* Remove any lingering table backgrounds */
table, tr, td, tbody, thead, th {
  background-color: transparent !important;
}

/* Fix for any individual table cells that might have white background */
.table>tbody>tr>td,
.table>tbody>tr>th,
.table>tfoot>tr>td,
.table>tfoot>tr>th,
.table>thead>tr>td,
.table>thead>tr>th {
  background: transparent !important;
  backdrop-filter: none !important;
}

/* Modern glassmorphism table styles */
table.glass {
  overflow: hidden;
  margin-bottom: 2rem;
  background: rgba(255,255,255,0.18) !important;
}

/* Override Bootstrap's table background */
.table {
  --bs-table-bg: transparent !important;
  --bs-table-accent-bg: transparent !important;
  background-color: transparent !important;
  border-collapse: separate !important;
  border-spacing: 0 4px !important;
}

.table>:not(caption)>*>* {
  background-color: transparent !important;
  box-shadow: none !important;
}

/* Explicit badge color fixes for glass table */
.table .badge.bg-danger {
  background-color: #dc3545 !important;
  color: #fff !important;
}
.table .badge.bg-warning {
  background-color: #ffc107 !important;
  color: #212529 !important;
}
.table .badge.bg-success {
  background-color: #198754 !important;
  color: #fff !important;
}
.table .badge.bg-primary {
  background-color: #0d6efd !important;
  color: #fff !important;
}
.table .badge.bg-secondary {
  background-color: #6c757d !important;
  color: #fff !important;
}
.table .badge.text-dark {
  color: #212529 !important;
}

.table-hover>tbody>tr:hover>* {
  background-color: rgba(255,255,255,0.25) !important;
  --bs-table-accent-bg: transparent !important;
}

/* Make sure all tables in the app use the glassmorphism effect */
.table-responsive {
  background: rgba(255,255,255,0.12);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 32px 0 rgba(31,38,135,0.2);
}

table.glass thead th {
  background: rgba(255,255,255,0.25);
  color: #2c3e50;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  padding: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

table.glass tbody tr {
  transition: all 0.2s ease;
}

table.glass tbody tr:hover {
  background: rgba(255,255,255,0.25) !important;
  transform: scale(1.005);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  box-shadow: 0 4px 12px rgba(31,38,135,0.1);
}

table.glass tbody tr {
  background: rgba(255,255,255,0.10) !important;
  margin-bottom: 5px;
  border-radius: 8px;
}

table.glass td {
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  color: #334155;
}

table.glass tbody tr:last-child td {
  border-bottom: none;
}

/* Buttons in tables */
table.glass .btn-sm {
  font-size: 0.78rem;
  padding: 0.25rem 0.75rem;
  margin: 0.15rem;
  border-radius: 6px;
  transition: all 0.2s;
}

/* Collapsed content styling */
table.glass .collapse {
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 8px;
  margin-top: 8px;
  border: 1px solid rgba(255,255,255,0.1);
}

table.glass .collapse .bg-light {
  background: rgba(255,255,255,0.25) !important;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  color: #2c3e50;
}
.navbar, .sidebar {
  background: rgba(255,255,255,0.30)!important;
  backdrop-filter: blur(6px);
}
.card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(31,38,135,0.10);
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-primary {
  background: linear-gradient(90deg, #6a82fb 0%, #fc5c7d 100%);
  border: none;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(31,38,135,0.10);
}
.btn-primary:hover {
  background: linear-gradient(90deg, #fc5c7d 0%, #6a82fb 100%);
}
::-webkit-scrollbar {
  width: 8px;
  background: rgba(255,255,255,0.10);
}
::-webkit-scrollbar-thumb {
  background: rgba(31,38,135,0.12);
  border-radius: 8px;
}

/* Glassmorphism card for hardware/pc */
.glass-card {
  background: rgba(255,255,255,0.18);
  box-shadow: 0 8px 32px 0 rgba(31,38,135,0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.3);
  color: #222;
  transition: box-shadow 0.2s;
}
.glass-card:hover {
  box-shadow: 0 12px 32px 0 rgba(31,38,135,0.22);
}

.material-icons {
  font-family: 'Material Icons', Arial, sans-serif;
  font-size: 1.3em;
  vertical-align: middle;
}

/* Filter styling */
form.d-flex.gap-2.align-items-center {
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 0.5em 1em;
  box-shadow: 0 2px 8px 0 rgba(31,38,135,0.07);
}

/* Animation for login form container */
@keyframes loginFadeIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-animate {
  opacity: 0;
  animation: loginFadeIn 0.6s ease-out forwards;
}

/* Footer styling */
footer .glass {
  padding: 0.8rem 1.5rem;
  font-size: 0.9rem;
}

footer .border-start {
  border-color: rgba(255, 255, 255, 0.3) !important;
}

footer a.fw-bold {
  text-decoration: none;
  transition: color 0.2s;
}

footer a.fw-bold:hover {
  color: var(--accent-color) !important;
}

/* Changelog Modal styling */
#changelogModal .modal-content.glass {
    color: #f5f5f5; /* Light text for dark glass modal */
}
#changelogModal .modal-header {
    border-bottom: 1px solid rgba(255,255,255,0.2);
}
#changelogModal .modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}
#changelogModal .modal-body {
    color: #e9ecef;
}
#changelogModal .modal-footer {
    border-top: 1px solid rgba(255,255,255,0.2);
}



/* Floating Edit Mode Bar */
.edit-mode-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 100%);
  width: calc(100% - 4rem);
  max-width: 600px;
  background: rgba(25, 28, 36, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
  z-index: 1050;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255,255,255,0.1);
  border-bottom: none;
}

.edit-mode-bar.show {
  transform: translate(-50%, 0);
}

.edit-mode-bar-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.edit-mode-bar-info .icon {
  font-size: 1.25rem;
  color: #ffc107; /* warning color */
}

.edit-mode-bar-actions {
  display: flex;
  gap: 0.75rem;
}

/* Skeleton Loader Styles */
@keyframes skeletonShimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.12) 25%, rgba(255,255,255,0.24) 37%, rgba(255,255,255,0.12) 63%);
  background-size: 400% 100%;
  animation: skeletonShimmer 1.2s ease-in-out infinite;
  border-radius: 8px;
}
.skeleton-card {
  width: 100%;
  height: 250px;
  border-radius: 16px;
}
.skeleton-title {
  width: 60%;
  height: 22px;
  margin-bottom: 10px;
}
.skeleton-text {
  width: 90%;
  height: 14px;
  margin-bottom: 8px;
}
.skeleton-avatar,
.skeleton-img {
  width: 100%;
  height: 140px;
  border-radius: 12px;
}

/* Nastavenia - Verzie aplikácie - Taby */
.glass-nav {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.5rem;
  border-radius: 16px 16px 0 0;
  background: rgba(255, 255, 255, 0.1);
}

.glass-nav .nav-link {
  color: #e0e0e0;
  font-weight: 500;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  background: transparent;
}

.glass-nav .nav-link:hover,
.glass-nav .nav-link:focus {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.glass-nav .nav-link.active {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Changelog v tabuľke */
.changelog-cell {
  max-height: 150px; 
  overflow-y: auto;
  padding-right: 10px; 
  font-size: 0.9rem;
  line-height: 1.6;
}

.changelog-cell::-webkit-scrollbar {
  width: 6px;
}

.changelog-cell::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.changelog-cell::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

/* ==================================================================
   POJD redesign inspired by /kalendar
   ================================================================== */
:root {
  --pojd-primary: rgba(255, 255, 255, 0.92);
  --pojd-secondary: rgba(255, 255, 255, 0.65);
  --pojd-muted: rgba(255, 255, 255, 0.45);
  --pojd-glass: rgba(255, 255, 255, 0.08);
  --pojd-glass-strong: rgba(255, 255, 255, 0.14);
  --pojd-border: rgba(255, 255, 255, 0.18);
  --pojd-dark: #1a1a2e;
  --pojd-red: #ff4e50;
  --pojd-yellow: #f9d423;
  --pojd-green: #1d976c;
  --pojd-blue: #4e54c8;
  --pojd-violet: #8f94fb;
  --pojd-cyan: #4facfe;
  --pojd-shadow: 0 18px 60px rgba(0, 0, 0, .35);
  --pojd-glow: 0 0 25px rgba(255, 255, 255, .30);
}

body {
  background: #1a1a2e !important;
  color: var(--pojd-primary);
  -webkit-font-smoothing: antialiased;
}

body > .container,
body > .container-fluid {
  max-width: 1500px;
  padding: 1.2rem 1.5rem 2rem;
  color: var(--pojd-primary);
  animation: pojdFadeIn .6s ease;
}

@keyframes pojdFadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

body > .container h1,
body > .container h2,
body > .container h3,
body > .container h4,
body > .container h5,
body > .container h6,
body > .container-fluid h1,
body > .container-fluid h2,
body > .container-fluid h3,
body > .container-fluid h4,
body > .container-fluid h5,
body > .container-fluid h6 {
  color: var(--pojd-primary);
  letter-spacing: .2px;
}

body > .container p,
body > .container .text-muted,
body > .container-fluid p,
body > .container-fluid .text-muted {
  color: var(--pojd-secondary) !important;
}

.glass,
.glass-card,
body .card,
body .modal-content,
body .dropdown-menu,
body .list-group-item,
body .accordion-item,
body .toast:not(.pojd-toast),
body .alert,
body .table-responsive,
body .bg-light,
body .bg-white {
  background: var(--pojd-glass) !important;
  border: 1px solid var(--pojd-border) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .18) !important;
  color: var(--pojd-primary) !important;
  border-radius: 18px !important;
}

body .card {
  overflow: hidden;
  transition: transform .2s ease, box-shadow .3s ease, border-color .3s ease;
}

body .card:hover {
  transform: translateY(-2px);
  box-shadow: var(--pojd-shadow) !important;
  border-color: rgba(255,255,255,.28) !important;
}

body .card-header,
body .card-footer,
body .modal-header,
body .modal-footer,
body .accordion-header {
  background: rgba(255,255,255,.06) !important;
  border-color: rgba(255,255,255,.12) !important;
  color: var(--pojd-primary) !important;
}

body .card-title,
body .modal-title,
body .accordion-button {
  color: var(--pojd-primary) !important;
}

body .accordion-button {
  background: transparent !important;
  box-shadow: none !important;
}

body .accordion-button:not(.collapsed) {
  background: var(--pojd-glass-strong) !important;
}

body .accordion-button::after,
body .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

body a {
  color: var(--pojd-yellow);
}

body a:hover {
  color: #fff1a6;
}

body .btn {
  border-radius: 10px;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .3s ease, background .3s ease, border-color .3s ease;
}

body .btn:hover {
  transform: translateY(-2px);
}

body .btn-primary,
body .btn-outline-primary:hover {
  background: linear-gradient(135deg, var(--pojd-red), var(--pojd-yellow)) !important;
  border-color: transparent !important;
  color: var(--pojd-dark) !important;
  box-shadow: 0 0 25px rgba(255, 255, 255, .20);
}

body .btn-outline-primary {
  color: var(--pojd-yellow) !important;
  border-color: rgba(249,212,35,.45) !important;
  background: transparent !important;
}

body .btn-success,
body .btn-outline-success:hover {
  background: linear-gradient(135deg, var(--pojd-green), #93f9b9) !important;
  border-color: transparent !important;
  color: var(--pojd-dark) !important;
}

body .btn-danger,
body .btn-outline-danger:hover {
  background: linear-gradient(135deg, #ff4e50, #c31432) !important;
  border-color: transparent !important;
  color: #fff !important;
}

body .btn-info,
body .btn-outline-info:hover {
  background: linear-gradient(135deg, var(--pojd-cyan), var(--pojd-violet)) !important;
  border-color: transparent !important;
  color: #fff !important;
}

body .btn-secondary,
body .btn-outline-secondary:hover {
  background: var(--pojd-glass-strong) !important;
  border-color: var(--pojd-border) !important;
  color: var(--pojd-primary) !important;
}

body .btn-warning {
  background: linear-gradient(135deg, var(--pojd-yellow), #ffb347) !important;
  border-color: transparent !important;
  color: var(--pojd-dark) !important;
}

body .btn-outline-light,
body .btn-outline-secondary,
body .btn-outline-info,
body .btn-outline-success,
body .btn-outline-danger,
body .btn-outline-warning {
  background: rgba(255,255,255,.06) !important;
  border-color: var(--pojd-border) !important;
  color: var(--pojd-primary) !important;
}

body .form-control,
body .form-select,
body textarea.form-control,
body .input-group-text,
body .ts-control {
  background: rgba(255,255,255,.08) !important;
  border: 1px solid var(--pojd-border) !important;
  color: var(--pojd-primary) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

body .form-control:focus,
body .form-select:focus,
body textarea.form-control:focus,
body .ts-control.focus {
  background: rgba(255,255,255,.12) !important;
  border-color: rgba(249,212,35,.65) !important;
  box-shadow: 0 0 0 .25rem rgba(249,212,35,.12) !important;
  color: var(--pojd-primary) !important;
}

body .form-control::placeholder,
body textarea.form-control::placeholder {
  color: var(--pojd-muted) !important;
}

body .form-label,
body label,
body .col-form-label {
  color: var(--pojd-secondary);
}

body select option {
  background: var(--pojd-dark);
  color: var(--pojd-primary);
}

body .table-responsive {
  padding: 1rem !important;
  overflow: auto;
}

body .table,
body table {
  color: var(--pojd-primary) !important;
  border-collapse: separate !important;
  border-spacing: 0 4px !important;
  --bs-table-color: var(--pojd-primary);
  --bs-table-bg: transparent !important;
  --bs-table-striped-bg: rgba(255,255,255,.04) !important;
  --bs-table-hover-bg: rgba(255,255,255,.12) !important;
}

body .table thead th,
body table thead th,
body table.glass thead th {
  background: rgba(255,255,255,.92) !important;
  color: var(--pojd-dark) !important;
  border: 0 !important;
  font-weight: 700;
  text-transform: uppercase;
  font-size: .78rem;
  letter-spacing: .04em;
}

body .table tbody tr,
body table.glass tbody tr {
  background: rgba(255,255,255,.06) !important;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

body .table tbody tr:hover,
body table.glass tbody tr:hover {
  background: rgba(255,255,255,.13) !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}

body .table td,
body .table th,
body table.glass td {
  color: var(--pojd-primary) !important;
  border-color: rgba(255,255,255,.10) !important;
  vertical-align: middle;
}

body .badge {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .01em;
}

body .badge.bg-primary {
  background: var(--pojd-blue) !important;
}

body .badge.bg-info {
  background: var(--pojd-cyan) !important;
  color: var(--pojd-dark) !important;
}

body .badge.bg-warning {
  background: var(--pojd-yellow) !important;
  color: var(--pojd-dark) !important;
}

body .pagination .page-link {
  background: var(--pojd-glass) !important;
  border-color: var(--pojd-border) !important;
  color: var(--pojd-primary) !important;
}

body .pagination .active .page-link,
body .pagination .page-link:hover {
  background: rgba(255,255,255,.92) !important;
  color: var(--pojd-dark) !important;
}

body .nav-tabs,
body .nav-pills,
.glass-nav {
  border-color: rgba(255,255,255,.16) !important;
}

body .nav-tabs .nav-link,
body .nav-pills .nav-link,
.glass-nav .nav-link {
  color: var(--pojd-secondary) !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
}

body .nav-tabs .nav-link.active,
body .nav-pills .nav-link.active,
.glass-nav .nav-link.active {
  background: rgba(255,255,255,.92) !important;
  color: var(--pojd-dark) !important;
  border-color: transparent !important;
  font-weight: 700;
}

body .dropdown-item:hover,
body .dropdown-item:focus {
  background: var(--pojd-glass-strong) !important;
  color: var(--pojd-yellow) !important;
}

footer .glass {
  background: var(--pojd-glass) !important;
  border: 1px solid var(--pojd-border) !important;
  color: var(--pojd-primary) !important;
}

.back-to-top {
  background: linear-gradient(135deg, var(--pojd-red), var(--pojd-yellow)) !important;
  color: var(--pojd-dark) !important;
}

@media (max-width: 767.98px) {
  body > .container,
  body > .container-fluid {
    padding: 1rem .85rem 1.5rem;
  }

  body .card,
  .glass,
  .glass-card,
  body .table-responsive {
    border-radius: 14px !important;
  }
}
