
/* Critical CSS - Load First */
[x-cloak] {
  display: none !important;
}

/* Header Styles */
/* Update the variable colors to match the website's theme */
:root {
  --color-primary: #6E52E3;
  --color-primary-light: #8369e8;
  --color-primary-lighter: #f0ebff;
  --color-primary-dark: #5d42d3;
  --color-secondary: #4ade80;
  --color-secondary-light: #6fe79a;
  --color-secondary-dark: #2ebb62;
  --color-text: #334155;
  --color-text-light: #64748b;
  --color-text-dark: #1e293b;
  --color-background: #ffffff;
  --color-background-light: #f8faff;
  --color-border: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mb-header {
  position: relative;
  width: 100%;
  background: linear-gradient(to right, var(--color-background), #ffffff, var(--color-background));
  border-bottom: 1px solid rgba(115, 87, 235, 0.1);
  z-index: 50;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  transition: all var(--transition);
}

.mb-header--fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  animation: slideDown 0.3s ease-out;
  background: #fff;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.mb-header__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.mb-header__logo-wrapper {
  display: flex;
  align-items: center;
  position: relative;
}

.mb-header__logo-wrapper::after {
  content: '';
  position: absolute;
  right: -1.5rem;
  height: 2rem;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--color-primary-lighter), transparent);
  display: none;
}

@media (min-width: 1024px) {
  .mb-header__logo-wrapper::after {
    display: block;
  }
}

.mb-header__logo-link {
  display: block;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
}

.mb-header__logo {
  height: 2.5rem;
  width: auto;
  object-fit: contain;
  transition: transform var(--transition);
}


/* Desktop Navigation */
.mb-header__nav {
  display: none;
}

@media (min-width: 1024px) {
  .mb-header__nav {
    display: block;
    margin-left: auto;
    margin-right: 2rem;
  }
}

.mb-header__nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.75rem;
}

.mb-header__nav-item {
  position: relative;
}

/* User Actions */
/* Make sure the mobile header doesn't show any action buttons */
@media (max-width: 1023px) {
  .mb-header__actions {
    display: none;
  }
}

/* But keep the desktop header actions visible */
@media (min-width: 1024px) {
  .mb-header__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
}

.mb-header__button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #6E52E3;
  color: white;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(110, 82, 227, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.mb-header__button-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.5rem; /* Add proper spacing between icon and text */
}


@keyframes shine {
  0% {
    left: -100%;
    transition-property: left;
  }
  20%, 100% {
    left: 100%;
    transition-property: left;
  }
}

/* User Dropdown */
.mb-header__user-dropdown {
  position: relative;
}

.mb-header__user-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--color-primary-lighter);
  border: 1px solid rgba(110, 82, 227, 0.2);
  color: var(--color-primary);
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.mb-header__user-button::after {
  content: '';
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  width: 0.625rem;
  height: 0.625rem;
  background-color: var(--color-secondary);
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: var(--shadow-sm);
}


.mb-header__user-name {
  display: none;
}

@media (min-width: 640px) {
  .mb-header__user-name {
    display: block;
  }
}

.mb-header__dropdown-icon {
  font-size: 0.75rem;
  color: var(--color-primary);
  transition: transform var(--transition);
}

.mb-header__dropdown {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  width: 16rem;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(115, 87, 235, 0.1);
  overflow: hidden;
  z-index: 50;
}

.mb-header__dropdown-enter {
  transition: all var(--transition-bounce);
}

.mb-header__dropdown-enter-start {
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  transform-origin: top right;
}

.mb-header__dropdown-enter-end {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.mb-header__dropdown-leave {
  transition: all var(--transition);
}

.mb-header__dropdown-leave-start {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.mb-header__dropdown-leave-end {
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
}

.mb-header__dropdown-content {
  padding: 0.75rem;
}

.mb-header__dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.9375rem;
  border-radius: 0.5rem;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  position: relative;
  overflow: hidden;
}


.mb-header__dropdown-icon {
  font-size: 1rem;
  color: var(--color-text-light);
  width: 1.25rem;
  text-align: center;
  transition: all var(--transition);
}

.mb-header__dropdown-item:hover .mb-header__dropdown-icon {
  color: var(--color-primary);
  transform: scale(1.1);
}

.mb-header__dropdown-item--logout:hover .mb-header__dropdown-icon {
  color: #b91c1c;
}

/* Mobile Toggle Button */
/* Update the mobile toggle button styles to ensure it doesn't have any action buttons */
.mb-header__mobile-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 1.75rem;
  height: 1.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 20;
}

@media (min-width: 1024px) {
  .mb-header__mobile-toggle {
    display: none;
  }
}

.mb-header__mobile-toggle-line {
  width: 100%;
  height: 2px;
  background-color: var(--color-text);
  transition: all var(--transition);
  transform-origin: center;
  border-radius: 9999px;
}

.mb-header__mobile-toggle--active .mb-header__mobile-toggle-line:nth-child(1) {
  transform: translateY(0.5625rem) rotate(45deg);
  background-color: var(--color-primary);
}

.mb-header__mobile-toggle--active .mb-header__mobile-toggle-line:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.mb-header__mobile-toggle--active .mb-header__mobile-toggle-line:nth-child(3) {
  transform: translateY(-0.5625rem) rotate(-45deg);
  background-color: var(--color-primary);
}

/* Mobile Menu */
.mb-header__mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(115, 87, 235, 0.1);
  z-index: 40;
}

/* Ensure mobile menu is hidden on desktop */
@media (min-width: 1024px) {
  .mb-header__mobile-menu {
    display: none !important;
  }
}

.mb-header__mobile-menu-enter {
  transition: all 0.3s ease-out;
}

.mb-header__mobile-menu-enter-start {
  opacity: 0;
  transform: translateY(-10px);
}

.mb-header__mobile-menu-enter-end {
  opacity: 1;
  transform: translateY(0);
}

.mb-header__mobile-menu-leave {
  transition: all 0.2s ease-in;
}

.mb-header__mobile-menu-leave-start {
  opacity: 1;
  transform: translateY(0);
}

.mb-header__mobile-menu-leave-end {
  opacity: 0;
  transform: translateY(-10px);
}

.mb-header__mobile-nav {
  margin-bottom: 1.5rem;
}

.mb-header__mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.875rem;
}

.mb-header__mobile-nav-item {
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all var(--transition);
  border: 1px solid transparent;
}


.mb-header__mobile-nav-item--active {
  background-color: var(--color-primary-lighter);
  border-color: rgba(115, 87, 235, 0.2);
}

.mb-header__mobile-nav-item--active .mb-header__mobile-nav-link {
  color: var(--color-primary);
}

.mb-header__mobile-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  transition: all var(--transition);
  padding: 10px;
}

.mb-header__mobile-nav-link:hover {
  color: var(--color-primary);
}

.mb-header__mobile-nav-icon {
  font-size: 1.5rem;
  color: var(--color-text-light);
  transition: all var(--transition);
}

.mb-header__mobile-nav-link:hover .mb-header__mobile-nav-icon,
.mb-header__mobile-nav-item--active .mb-header__mobile-nav-icon {
  color: var(--color-primary);
  transform: translateY(-3px);
}

/* Mobile Actions */
.mb-header__mobile-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(115, 87, 235, 0.1);
}

.mb-header__mobile-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: #6E52E3;
  color: white;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.875rem 1.5rem;
  border-radius: 0.75rem;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: 0 4px 10px rgba(110, 82, 227, 0.3);
  position: relative;
  overflow: hidden;
}


.mb-header__mobile-button:hover {
  background: #5d42d3;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(110, 82, 227, 0.4);
}

/* Mobile User */
.mb-header__mobile-user {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(115, 87, 235, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.mb-header__mobile-user-link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1.25rem;
  background-color: var(--color-primary-lighter);
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 0.75rem;
  transition: all var(--transition);
  border: 1px solid rgba(115, 87, 235, 0.2);
}

.mb-header__mobile-user-link:hover {
  background-color: var(--color-primary-light);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(115, 87, 235, 0.2);
}

.mb-header__mobile-user-icon {
  font-size: 1.25rem;
}

.mb-header__mobile-logout {
  width: 100%;
}

.mb-header__mobile-logout-button {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  width: 100%;
  padding: 0.875rem 1.25rem;
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}

.mb-header__mobile-logout-button:hover {
  background-color: #fecaca;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(185, 28, 28, 0.1);
}

.mb-header__mobile-logout-icon {
  font-size: 1.25rem;
}

/* Utility for Alpine.js */
[x-cloak] {
  display: none !important;
}

/* Mobile Login Button */
.mb-header__mobile-button--login {
  background: linear-gradient(135deg, var(--color-text-dark), var(--color-text));
  box-shadow: 0 4px 10px rgba(30, 41, 59, 0.3);
}

.mb-header__mobile-button--login:hover {
  box-shadow: 0 6px 15px rgba(30, 41, 59, 0.4);
  background: linear-gradient(135deg, var(--color-text), var(--color-text-dark));
}

.mb-header__mobile-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(115, 87, 235, 0.1);
}
