@import url('https://fonts.googleapis.com/css?family=Montserrat:400,500,600,700,800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@700&display=swap');

/* --- Desktop & Global styles --- */
html, body {
  font-family: 'Montserrat', Arial, sans-serif !important;
  margin: 0;
  padding: 0;
  background: #f4f7fa;
}

#navbar {
  background: #fff;
  box-shadow: 0 2px 16px #1976d214;
  border-bottom: 1.5px solid #e2e5ef;
  width: 100vw;
  min-height: 82px;
  display: flex;
  align-items: center;
  position: relative;
  font-family: 'Montserrat', Arial, sans-serif !important;
}

/* PROFIL/LOGIN SKELETON (pro loading) */
.profile-skeleton {
  width: 110px;
  height: 38px;
  border-radius: 999px;
  background: #e2e6f0;
  opacity: 0.7;
  margin-left: auto;
  margin-right: 0;
  animation: skeletonPulse 1.2s infinite;
}
@keyframes skeletonPulse {
  0% { opacity: 0.7; }
  50% { opacity: 0.35; }
  100% { opacity: 0.7; }
}

#navbar-profile-or-login {
  min-width: 110px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  transition: opacity 0.18s;
}

.navbar-logo {
  font-family: 'Baloo 2', 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  font-size: 2.1em;
  color: #1664f6;
  letter-spacing: -2px;
  user-select: none;
  margin-left: 2vw;
  margin-right: 38px;
  line-height: 1;
  display: flex;
  align-items: center;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}

.navbar-center-outer {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}

.navbar-center-inner {
  display: flex;
  gap: 28px;
  white-space: nowrap;
  align-items: center;
  pointer-events: auto;
  background: transparent;
}

.navbar-link,
.navbar-btn--primary {
  text-decoration: none !important;
  color: #888 !important;
  font-size: 0.98em;
  font-weight: 500 !important;
  letter-spacing: -0.01em;
  border-radius: 8px;
  padding: 6px 18px;
  background: transparent !important;
  border: none !important;
  transition:
    background 0.18s cubic-bezier(.4,1,.7,1),
    color 0.18s cubic-bezier(.4,1,.7,1),
    box-shadow 0.16s;
  box-shadow: none !important;
  position: relative;
  display: flex;
  align-items: center;
  line-height: 1.1;
  cursor: pointer;
  font-family: 'Montserrat', Arial, sans-serif !important;
}

/* === ÚPRAVA pro tlačítko Přihlásit se === */
.navbar-btn--primary {
  background: #1664f6 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 999px;
  font-weight: 700 !important;
  padding: 9px 28px;
  box-shadow: none !important;
  cursor: pointer;
  font-size: 1em;
  transition: background 0.18s, color 0.18s;
}

.navbar-btn--primary:hover,
.navbar-btn--primary:focus {
  background: #1352c9 !important;
  color: #fff !important;
}

button.navbar-link {
  background: none;
  border: none;
  font: inherit;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-family: 'Montserrat', Arial, sans-serif !important;
  padding: 6px 18px;
  border-radius: 8px;
  color: #888 !important;
  font-size: 0.98em;
  font-weight: 500 !important;
  letter-spacing: -0.01em;
  transition:
    background 0.18s cubic-bezier(.4,1,.7,1),
    color 0.18s cubic-bezier(.4,1,.7,1),
    box-shadow 0.16s;
  box-shadow: none !important;
  line-height: 1.1;
}

.navbar-link:hover,
.navbar-link:focus,
.navbar-btn--primary:hover,
.navbar-btn--primary:focus,
button.navbar-link:hover,
button.navbar-link:focus {
  color: #1664f6 !important;
  background: #f4f7ff !important;
  box-shadow: 0 2px 8px #1976d222;
  text-decoration: none !important;
}

.navbar-link--active {
  color: #1664f6 !important;
  font-weight: 700 !important;
  background: transparent !important;
}

.navbar-right {
  position: absolute;
  right: 2vw;
  top: 0;
  bottom: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 35px;
  z-index: 2;
  white-space: nowrap;
}

.navbar-notification-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  margin-right: 0px;
  overflow: visible;
}

/* Sdílený základ pro zvonek a mail button */
.navbar-notification-btn,
.navbar-mail-btn {
  background: none !important;
  border: none !important;
  color: #babec7;
  font-size: 0.97em;
  font-family: 'Montserrat', Arial, sans-serif !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  height: auto;
  min-width: 0;
  min-height: 0;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition: none;
  position: relative;
  outline: none;
  user-select: none;
  box-shadow: none !important;
}

.notification-bell,
.mail-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
}

/* Ikony: tmavá šedá, 28×28, bez změny barvy na hover/active */
.notification-bell svg,
.mail-icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: #666666; /* tmavá šedá */
  stroke-width: 1.6 !important;
  transition: none;
}

.navbar-notification-btn:hover .notification-bell svg,
.navbar-notification-btn:focus .notification-bell svg,
.navbar-mail-btn:hover .mail-icon svg,
.navbar-mail-btn:focus .mail-icon svg {
  stroke: #3A3A3A; /* beze změny – drž tmavou šedou */
}

.navbar-notification-btn:active .notification-bell svg,
.navbar-notification-btn[aria-expanded="true"] .notification-bell svg,
.navbar-mail-btn:active .mail-icon svg {
  stroke: #3A3A3A; /* beze změny – drž tmavou šedou */
}

/* Odznak (tečka) skrytý */
.notification-badge {
  display: none !important;
}

/* Dropdown menu pro notifikace - pevná velikost (prostor na 5 notifikací) */
.notification-dropdown-menu,
.profile-dropdown-menu,
.navbar-dropdown-menu {
  display: none;
}

.notification-dropdown-menu.open,
.profile-dropdown-menu.open,
.navbar-dropdown-menu.open {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.notification-dropdown-menu {
  position: absolute;
  top: 110%;
  right: 0;
  min-width: 240px;
  max-width: 420px;
  background: #fff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 8px 32px #1976d224;
  z-index: 60;
  padding: 0;
  animation: fadeIn 0.17s cubic-bezier(.4,1,.7,1);
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px) scale(0.98);
  transition:
    opacity 0.22s cubic-bezier(.4,1,.7,1),
    transform 0.17s cubic-bezier(.4,1,.7,1);
  height: 320px;
  min-height: 320px;
  max-height: 320px;
  overflow-y: auto;
}

.notification-dropdown-menu .notification-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 18px 8px 18px;
  background: #fff;
  border: none;
  font-family: 'Montserrat', Arial, sans-serif !important;
}

/* Ikona v hlavičce – stejné tmavé ladění */
.notification-dropdown-menu .notification-header svg {
  width: 22px;
  height: 22px;
  stroke: #3A3A3A;
  fill: none;
  stroke-width: 2;
}

.notification-dropdown-menu .notification-header span {
  font-size: 1.12em;
  font-weight: 700;
  color: #222;
  letter-spacing: 0.01em;
}

.notification-divider {
  border: none;
  border-top: 1.5px solid #f0f0f0;
  margin: 10px 0 0 0;
}

.notification-item {
  background: none;
  border: none;
  text-align: left;
  color: #181818;
  font-size: 1em;
  font-family: 'Montserrat', Arial, sans-serif !important;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
  font-weight: 500;
  outline: none;
  display: block;
  box-sizing: border-box;
  white-space: normal;
  word-break: break-word;
  min-width: 240px;
  max-width: 420px;
  min-height: 56px;
  width: 100%;
  position: relative;
}

.notification-item:hover,
.notification-item:focus {
  background: #f4f7ff;
  color: #1664f6;
}

.notification-item:hover .notification-date,
.notification-item:focus .notification-date {
  color: #1664f6;
}

.notification-item:hover div,
.notification-item:focus div {
  color: #1664f6;
}

.notification-item.logout {
  color: #e04d4d;
  font-weight: 700;
}

.notification-item.logout:hover,
.notification-item.logout:focus {
  background: #ffeaea;
  color: #e04d4d;
}

.notification-filler {
  pointer-events: none;
  background: transparent !important;
  cursor: default !important;
  min-height: 56px;
  height: 56px;
}

.notification-filler:hover,
.notification-filler:focus {
  background: transparent !important;
  color: inherit !important;
}

.notification-dropdown-menu {
  flex-direction: column;
  justify-content: flex-start;
}

.notification-dropdown-filler {
  flex: 1 1 auto;
}

.notification-empty {
  padding: 18px 22px;
  color: #888;
  text-align: center;
  font-size: 1.07em;
  border: none;
  background: none;
  min-width: 240px;
  max-width: 420px;
  white-space: normal;
  word-break: break-word;
  box-sizing: border-box;
}

.notification-date {
  font-size: 0.91em;
  color: #888;
  margin-top: 2px;
  font-weight: 500;
  display: block;
  letter-spacing: 0.01em;
  width: 100%;
}

.navbar-profile-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.navbar-profile {
  font-weight: 500;
  color: #1664f6;
  margin-right: 0;
  text-decoration: none;
  font-size: 0.97em;
  font-family: 'Montserrat', Arial, sans-serif !important;
  line-height: 1.1;
  display: flex;
  align-items: center;
  padding: 7px 16px;
  border: 2px solid #1664f6;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  transition: border 0.15s, background 0.13s, color 0.13s;
  user-select: none;
  cursor: pointer;
  position: relative;
}

.navbar-profile:hover,
.navbar-profile:focus,
.navbar-profile[aria-expanded="true"] {
  background: #f4f7ff;
  border-color: #1664f6;
  color: #1664f6;
}

.navbar-profile .chevron {
  display: inline-block;
  margin-left: 8px;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  transition: transform 0.18s cubic-bezier(.4,1,.7,1);
}

.navbar-profile .chevron svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: #1664f6;
}

.navbar-profile[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.profile-dropdown-menu {
  position: absolute;
  top: 110%;
  right: 0;
  min-width: 190px;
  max-width: 250px;
  background: #fff;
  border: 1.5px solid #e2e5ef;
  border-radius: 12px;
  box-shadow: 0 8px 32px #1976d224;
  z-index: 60;
  padding: 8px 0;
  animation: fadeIn 0.17s cubic-bezier(.4,1,.7,1);
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px) scale(0.98);
  transition:
    opacity 0.22s cubic-bezier(.4,1,.7,1),
    transform 0.17s cubic-bezier(.4,1,.7,1);
}

.profile-dropdown-menu.open {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-dropdown-item {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  color: #181818;
  font-size: 1em;
  font-family: 'Montserrat', Arial, sans-serif !important;
  padding: 11px 22px 11px 22px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
  font-weight: 500;
  outline: none;
  display: block;
  box-sizing: border-box;
}

.profile-dropdown-item:hover,
.profile-dropdown-item:focus {
  background: #f4f7ff;
  color: #1664f6;
}

.profile-dropdown-item.logout {
  color: #e04d4d;
  font-weight: 700;
}

.profile-dropdown-item.logout:hover,
.profile-dropdown-item.logout:focus {
  background: #ffeaea;
  color: #e04d4d;
}

.navbar-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.navbar-dropdown-toggle {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: #888 !important;
  font-size: 0.98em;
  font-weight: 500 !important;
  border-radius: 8px;
  padding: 6px 18px;
  background: transparent !important;
  border: none !important;
  transition:
    background 0.18s cubic-bezier(.4,1,.7,1),
    color 0.18s cubic-bezier(.4,1,.7,1),
    box-shadow 0.16s;
  box-shadow: none !important;
  position: relative;
  text-decoration: none !important;
  line-height: 1.1;
  user-select: none;
  font-family: 'Montserrat', Arial, sans-serif !important;
}

.navbar-dropdown-toggle .chevron {
  display: inline-block;
  margin-left: 8px;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  transition: transform 0.18s cubic-bezier(.4,1,.7,1);
}

.navbar-dropdown-toggle .chevron svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: #1664f6;
}

.navbar-dropdown-toggle[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.navbar-dropdown-toggle:hover,
.navbar-dropdown-toggle:focus,
.navbar-dropdown-toggle[aria-expanded="true"] {
  color: #1664f6 !important;
  background: #f4f7ff !important;
  box-shadow: 0 2px 8px #1976d222;
  text-decoration: none !important;
}

.navbar-dropdown-menu {
  position: absolute;
  top: 110%;
  left: 0;
  min-width: 190px;
  max-width: 250px;
  background: #fff;
  border: 1.5px solid #e2e5ef;
  border-radius: 12px;
  box-shadow: 0 8px 32px #1976d224;
  z-index: 60;
  padding: 8px 0;
  animation: fadeIn 0.17s cubic-bezier(.4,1,.7,1);
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px) scale(0.98);
  transition:
    opacity 0.22s cubic-bezier(.4,1,.7,1),
    transform 0.17s cubic-bezier(.4,1,.7,1);
}

.navbar-dropdown-menu.open {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.navbar-dropdown-item {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  color: #181818;
  font-size: 1em;
  font-family: 'Montserrat', Arial, sans-serif !important;
  padding: 11px 22px 11px 22px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
  font-weight: 500;
  outline: none;
  display: block;
  text-decoration: none;
  box-sizing: border-box;
}

.navbar-dropdown-item:hover,
.navbar-dropdown-item:focus {
  background: #f4f7ff;
  color: #1664f6;
}

/* --- MOBILE BOTTOM NAVBAR --- */
@media (max-width: 700px) {
  #navbar {
    display: none !important;
  }
  .mobile-navbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    height: 64px;
    background: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
    border-top: 1.5px solid #e2e5ef;
    padding: 0;
    box-shadow: none !important;
    font-family: 'Montserrat', Arial, sans-serif !important;
  }
  .mobile-navbar-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    color: #888 !important;
    font-weight: 700;
    font-size: 0.94em;
    background: none;
    border: none;
    outline: none;
    border-radius: 0;
    padding: 0;
    transition: background 0.13s, color 0.13s;
    position: relative;
    font-family: 'Montserrat', Arial, sans-serif !important;
  }
  /* --- AKTIVNÍ POLOŽKA - svítí modře, včetně Vyhledat --- */
  .mobile-navbar-item.active,
  .mobile-navbar-item[aria-current="page"] {
    background: none !important;
    color: #1664f6 !important;
  }
  .mobile-navbar-item.active .mobile-navbar-label,
  .mobile-navbar-item[aria-current="page"] .mobile-navbar-label {
    color: #1664f6 !important;
    font-weight: 700;
  }
  .mobile-navbar-item.active .mobile-navbar-icon svg,
  .mobile-navbar-item[aria-current="page"] .mobile-navbar-icon svg {
    stroke: #1664f6 !important;
  }
  .mobile-navbar-item.active.create-listing-btn .mobile-navbar-icon,
  .mobile-navbar-item[aria-current="page"].create-listing-btn .mobile-navbar-icon {
    background: none !important;
  }
  /* --- OSTATNÍ STAVY - při kliknutí (active) nebo hoveru nebarvit pozadí --- */
  .mobile-navbar-item:active,
  .mobile-navbar-item:hover {
    background: none !important;
    color: #1664f6 !important;
  }
  .mobile-navbar-item:active .mobile-navbar-label,
  .mobile-navbar-item:hover .mobile-navbar-label {
    color: #1664f6 !important;
  }
  .mobile-navbar-item:active .mobile-navbar-icon svg,
  .mobile-navbar-item:hover .mobile-navbar-icon svg {
    stroke: #1664f6 !important;
  }
  .mobile-navbar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    width: 28px;
    margin-bottom: 3px;
  }
  .mobile-navbar-icon svg {
    display: block;
    width: 28px;
    height: 28px;
    stroke: #888 !important;
    transition: stroke 0.18s;
  }
  .mobile-navbar-label {
    font-size: 0.77em;
    color: #888 !important;
    letter-spacing: 0.01em;
    font-weight: 600;
    text-align: center;
    line-height: 1.1;
    margin-top: 0;
    margin-bottom: 0;
    user-select: none;
    pointer-events: none;
    transition: color 0.18s;
    font-family: 'Montserrat', Arial, sans-serif !important;
  }

  /* --- MOBILE LOGIN BANNER --- */
  .mobile-login-banner {
    position: fixed;
    bottom: 64px; /* nad mobile-navbar */
    left: 0;
    width: 100vw;
    background: #1664f6;
    color: #fff;
    text-align: center;
    z-index: 10000;
    box-shadow: 0 2px 12px #1664f655;
    padding: 10px 0;
    animation: floatin 0.7s cubic-bezier(.42,1.32,.12,.98);
    display: none;
  }
  .mobile-login-btn {
    background: none;
    border: none;
    color: #fff;
    font-weight: 700;
    font-size: 1.1em;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .mobile-login-btn:hover {
    text-decoration: underline;
  }
  @keyframes floatin {
    0% {
      transform: translateY(32px) scale(0.96);
      opacity: 0;
    }
    100% {
      transform: none;
      opacity: 1;
    }
  }

  /* --- MOBILE BLUR OVERLAY FOR SUBMENU --- */
  .mobile-navbar-blur {
    display: none;
    position: fixed;
    left: 0; right: 0; top: 0; bottom: 0;
    z-index: 9998;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: opacity 0.18s;
  }

  /* --- MOBILE SUBMENU FOR NABÍDKY --- */
  .mobile-navbar-submenu {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 64px; /* výška mobile-navbar */
    background: #fff;
    box-shadow: 0 -2px 16px #1976d214;
    border-top: 1.5px solid #e2e5ef;
    z-index: 10001;
    display: none;
    flex-direction: column;
    align-items: stretch;
    animation: fadeIn 0.17s cubic-bezier(.4,1,.7,1);
    font-family: 'Montserrat', Arial, sans-serif !important;
  }
  .mobile-navbar-subitem {
    padding: 16px 0;
    text-align: center;
    color: #111 !important;
    font-weight: 500 !important;
    font-size: 1.07em;
    font-family: 'Montserrat', Arial, sans-serif !important;
    text-decoration: none;
    background: none;
    border: none;
    outline: none;
    transition: background 0.13s, color 0.13s;
    cursor: pointer;
    border-bottom: 1px solid #eef2f7;
  }
  .mobile-navbar-subitem:last-child {
    border-bottom: none;
  }
  .mobile-navbar-close-btn {
    color: #d32f2f !important;
    font-weight: 600 !important;
  }
  .mobile-navbar-subitem:active,
  .mobile-navbar-subitem:hover {
    background: #f4f7ff;
  }
}

/* Hide mobile nav on desktop */
@media (min-width: 701px) {
  .mobile-navbar {
    display: none !important;
  }
  .mobile-navbar-submenu {
    display: none !important;
  }
  .mobile-navbar-blur {
    display: none !important;
  }
  .mobile-login-banner {
    display: none !important;
  }
}

@media (max-width: 900px) {
  #navbar {
    min-height: 64px;
  }
  .navbar-logo {
    font-size: 1.3em;
    margin-left: 0.5vw;
    margin-right: 10px;
  }
  .navbar-center-inner {
    gap: 10px;
  }
  .navbar-link,
  .navbar-btn--primary {
    font-size: 0.92em;
    padding: 5px 8px;
  }
  button.navbar-link {
    font-size: 0.92em;
    padding: 5px 8px;
  }
  .navbar-profile {
    font-size: 0.92em;
    padding: 5px 8px;
  }
  .navbar-right {
    gap: 10px;
    right: 1vw;
  }
  .profile-dropdown-menu {
    min-width: 140px;
  }
  .navbar-dropdown-menu {
    min-width: 140px;
  }
  .notification-dropdown-menu {
    min-width: 140px;
  }
}

.kyc-alert {
  background: #ffc5c5;
  color: #a26262;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 1.07rem;
  text-align: center;
  z-index: 1000;
}

.kyc-verify-btn {
  display: inline-block;
  margin-left: 12px;
  padding: 7px 18px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #a26262;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 2px 8px rgba(22, 100, 246, 0.07);
}

.kyc-verify-btn:hover,
.kyc-verify-btn:focus {
  background: #a26262;
  outline: none;
}