.szkoly-logo {
  height: 100px !important;
  width: auto !important;
  max-width: 90% !important;
  margin-left: 5.5rem !important;
  margin-top: 0.2rem !important;
  margin-bottom: 0.2rem !important;
}
.szkoly-header-inner {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 1rem;
  overflow: hidden;
}
.szkoly-button-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  margin-left: auto;
  margin-right: 20px !important;
  gap: 0.25rem;
}

.szkoly-login-button {
  background: rgba(23, 123, 254, 0.15);
  border: 1px solid rgba(23, 123, 254, 0.4);
  color: rgb(23, 123, 254);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.3s ease, border 0.3s ease;
  cursor: pointer;
}

.szkoly-login-button:hover {
  background: rgba(23, 123, 254, 0.3);
  border-color: rgba(23, 123, 254, 0.6);
}
/* Ukryj modal domyślnie */
#loginModal.hidden {
  display: none !important;
}

/* Styl dla warstwy modala */
#loginModal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Styl kontenera modala */
#loginModal .modal-content, 
#loginModal .bg-white {
  background-color: white;
  border-radius: 0.75rem;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
/#region .logged-user-info styles
.logged-user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.logged-user-info img {
  height: 3rem;
  margin-bottom: 0.2rem;
}
.logged-user-link {
  display: flex;
  align-items: center;
  height: 100%;
}
#endregion

.logged-user-menu {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  margin-top: 0.5rem;
  transform: scaleY(0);
  transform-origin: top;
  background-color: #ffffff;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  width: max-content;
  min-width: 200px;
  padding: 0.5rem;
  gap: 0.5rem;
  z-index: 1004;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.logged-user-container.open .logged-user-menu {
  transform: scaleY(1);
  opacity: 1;
  visibility: visible;
}

.logged-user-menu a {
  display: block;
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  text-align: center;
  transition: background-color 0.3s ease;
}

.logged-user-menu a:hover {
  background-color: #e2e6ea;
}

.logged-user-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 0.75rem;
  transition: border 0.3s ease, box-shadow 0.3s ease;
  max-height: none;
  overflow: visible;
  text-align: center;
  z-index: 1000;
  margin-top: 0 !important;
}

.logged-user-trigger:focus {
  outline: none;
}

.logged-user-trigger span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: #555;
  font-weight: 500;
}

.logged-user-trigger:hover {
  box-shadow: 0 0 6px rgba(26, 115, 232, 0.4);
  border: none;
}

.logged-user-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  margin-top: 0 !important;
}

/* Center the role icon above the menu when open */
.logged-user-container.open .logged-user-trigger {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  margin-bottom: 0.5rem;
}

@media (max-width: 500px) {
  .logged-user-menu {
    position: fixed;
    top: 4.5rem;
    left: 50%;
    transform: scaleY(0) translateX(-50%);
    width: 95vw;
    border-radius: 0.75rem;
  }

  .logged-user-container.open .logged-user-menu {
    transform: scaleY(1) translateX(-50%);
  }
  
  .logged-user-trigger {
    max-height: none;
  }
}
#user-profile-container {
  margin-top: 2rem;
  padding: 2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

#header-profile-flyout {
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-top: 1rem;
  z-index: 1004;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0;
  transform: translateY(-10px);
  display: none;
}

#header-profile-flyout.open {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Added logged user container styles for header-szkoly.php */
.szkoly-header-inner > .logged-user-container {
  margin-left: auto;
  margin-right: 20px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
