/* Navigation Styles */

/* Main Navbar */
.navbar {
  background-color: var(--main-a-color);
  box-shadow: var(--shadow-sm);
  z-index: var(--z-navbar);
  height: var(--navbar-min-height);
  padding: 0;
  position: sticky;
  top: 0;
  width: var(--width-full);
  max-width: 100vw;
  overflow: visible;
  display: flex;
  align-items: center;
}

.navbar-expand-lg {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

/* Container */
.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-md);
  width: var(--width-full);
  max-width: 100vw;
  box-sizing: border-box;
  height: 100%;
  overflow: visible;
  position: relative;
}


/* Brand */
.brand {
  font-family: "Audiowide", sans-serif;
  font-weight: 400;
  font-size: var(--font-size-xl);
  font-style: normal;
  color: var(--color-white);
  text-decoration: none;
  display: flex;
  align-items: center;
}

.brand:hover {
  color: var(--main-dark-hover-color);
}

/* Project Title Brand */
.project-title-brand {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-weight: 500;
  font-size: var(--font-size-xl);
  font-style: normal;
  color: var(--color-white);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Back Arrow */
.back-arrow {
  color: var(--color-white);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.back-arrow:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--color-white);
  text-decoration: none;
  transform: translateX(-2px);
}

.back-arrow i {
  font-size: 16px;
}

/* Navbar Toggle Button */
.navbar-toggler {
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: var(--font-size-lg);
  line-height: 1;
  background-color: transparent;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-base);
  cursor: pointer;
  display: none;
}

.navbar-toggler-icon {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
}

/* Navbar Collapse */
.navbar-collapse {
  display: flex;
  flex-basis: auto;
  flex-grow: 1;
  align-items: center;
  justify-content: center;
  overflow: visible;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  min-width: 0;
}

/* Navigation List */
.navbar-nav {
  display: flex;
  flex-direction: row;
  padding: 0;
  margin: 0;
  list-style: none;
  align-items: center;
}

.navbar-nav.ms-auto {
  margin-left: auto;
}

.navbar-nav .nav-item {
  margin: 0 0.5rem;
}

.navbar-nav .nav-link {
  display: block;
  padding: 0.5rem 1rem;
  color: white;
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}

.navbar-nav .nav-link.white {
  color: white !important;
}

.navbar-nav .nav-link:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* User Section */
.navbar-user-section {
  display: flex;
  align-items: center;
  margin-left: auto;
  position: relative;
  z-index: 10000;
}

.navbar-user-section .navbar-toggler {
  margin-right: var(--spacing-md);
}

/* Profile Dropdown */
.profile-dropdown-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease-in-out;
}

.profile-dropdown-toggle:hover {
  opacity: 0.8;
}

/* User Dropdown */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
}

.dropdown-toggle::after {
  display: none;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 10001;
  display: none;
  min-width: 10rem;
  padding: var(--spacing-sm) 0;
  margin: var(--spacing-sm) 0 0;
  background-color: var(--color-white);
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-lg);
}

.dropdown-menu-end {
  right: 0;
  left: auto;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 16px 20px;
  clear: both;
  color: #333;
  text-align: inherit;
  text-decoration: none;
  white-space: nowrap;
  background-color: transparent;
  border: 0;
  cursor: pointer;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
  color: #1e2125;
}

.dropdown-divider {
  height: 0;
  margin: 0.5rem 0;
  overflow: hidden;
  border-top: 1px solid #e9ecef;
}

/* Utility Classes */
.d-flex {
  display: flex;
}

.align-items-center {
  align-items: center;
}

.justify-content-center {
  justify-content: center;
}

.me-2 {
  margin-right: 0.5rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-lg-0 {
  margin-bottom: 0;
}

/* Profile Dropdown Menu */
.profile-dropdown-menu {
  z-index: 10001;
  min-width: 250px;
  right: 0;
  left: auto;
}

.dropdown-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
}

.dropdown-header .user-name {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.dropdown-header .user-email {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.dropdown-icon {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  color: var(--color-text-secondary);
}

.dropdown-chevron {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: var(--color-text-secondary);
  transition: transform 0.2s ease;
}

/* Rotate chevron for left-opening submenus */
.profile-dropdown-menu .dropdown-chevron {
  transform: rotate(180deg);
}

/* Dropdown Submenu */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu-menu {
  display: none;
  position: absolute;
  right: 100%;
  top: 0;
  margin-right: 0.125rem;
  background-color: var(--color-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-lg);
  min-width: 150px;
  padding: var(--spacing-sm) 0;
  list-style: none;
  z-index: 10000;
}

/* For dropdowns that might go off-screen, position on the left */
.profile-dropdown-menu .dropdown-submenu-menu {
  right: 100%;
  left: auto;
  margin-right: 0.125rem;
  margin-left: 0;
}

.dropdown-submenu:hover .dropdown-submenu-menu,
.dropdown-submenu-menu.show {
  display: block;
}

.dropdown-toggle-submenu {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Theme Selector Styles */
.theme-option {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 12px 20px;
}

.theme-option input[type="radio"] {
  display: none;
}

.theme-option .theme-icon {
  width: 20px;
  height: 20px;
  color: var(--color-text-secondary);
}

.theme-option:hover {
  background-color: var(--bg-light-gray);
}

.theme-option input[type="radio"]:checked + .theme-icon {
  color: var(--color-primary);
}

.theme-option input[type="radio"]:checked ~ * {
  color: var(--color-primary);
  font-weight: 500;
}


/* Project Settings Navigation */
.project-settings-nav {
  background-color: rgba(248, 249, 250, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem 0;
  position: fixed;
  top: var(--navbar-min-height);
  width: 100%;
  z-index: calc(var(--z-navbar) - 1);
}

.project-settings-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--spacing-md);
  max-width: 100vw;
  box-sizing: border-box;
}

.project-nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 5px;
  color: var(--color-text-secondary);
  font-size: 0.8rem;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 32px;
  box-sizing: border-box;
}

.project-nav-link:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.25);
  color: var(--color-text);
  text-decoration: none;
}

.project-nav-link.active {
  background: rgba(74, 143, 255, 0.2);
  border-color: rgba(74, 143, 255, 0.4);
  color: white;
}

.project-nav-link i {
  font-size: 0.75rem;
}

/* Ensure button and link elements with project-nav-link class have proper styling */
button.project-nav-link,
a.project-nav-link {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: var(--color-text-secondary);
  font-family: inherit;
}

/* Reset link-specific styles for project-nav-link */
a.project-nav-link {
  text-decoration: none;
}

a.project-nav-link:visited {
  color: var(--color-text-secondary);
}

/* Project Navigation Styles */
.project-nav-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex: 1;
  padding: 0 1rem;
  width: 100%;
}


.project-main-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-decoration: none;
  min-height: 40px;
  box-sizing: border-box;
  font-family: inherit;
  line-height: 1.2;
}

.project-action-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
  text-decoration: none;
}

/* Ensure button and link elements have the same base styling */
button.project-action-btn,
a.project-action-btn {
  margin: 0;
  vertical-align: baseline;
}

/* Reset button-specific styles */
button.project-action-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

/* Reset link-specific styles */
a.project-action-btn {
  color: white;
  text-decoration: none;
}

a.project-action-btn:visited {
  color: white;
}

/* Active state for project action buttons */
.project-action-btn.active {
  background: rgba(74, 143, 255, 0.2);
  border-color: rgba(74, 143, 255, 0.4);
  color: white;
}


.action-icon {
  width: 16px;
  height: 16px;
}

.action-icon.bi {
  font-size: 16px;
  width: auto;
  height: auto;
}

.new-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  background: #4a8fff;
  color: white;
  font-size: 0.6rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.project-settings {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.project-setting-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 32px;
  box-sizing: border-box;
}

.project-setting-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
  color: white;
}

.setting-icon {
  width: 14px;
  height: 14px;
}


/* Dark theme adjustments for project nav */

[data-theme="dark"] .project-settings-nav {
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top-color: rgba(255, 255, 255, 0.15);
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .project-nav-link,
[data-theme="dark"] button.project-nav-link,
[data-theme="dark"] a.project-nav-link {
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .project-nav-link:hover,
[data-theme="dark"] button.project-nav-link:hover,
[data-theme="dark"] a.project-nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
  color: white;
}

[data-theme="dark"] a.project-nav-link:visited {
  color: rgba(255, 255, 255, 0.8);
}

/* Generate button styling */
.project-nav-link.generate-btn {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--color-success);
  font-weight: 500;
}

.project-nav-link.generate-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--color-success);
}

[data-theme="dark"] .project-nav-link.generate-btn {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #10b981;
}

[data-theme="dark"] .project-nav-link.generate-btn:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.5);
  color: #10b981;
}

/* Disabled project nav link styles */
.project-nav-link.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.project-nav-link.disabled:hover {
  background: transparent;
  border-color: rgba(0, 0, 0, 0.15);
  color: var(--color-text-secondary);
}

[data-theme="dark"] .project-nav-link.disabled:hover {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
}

/* Responsive project navigation */
@media (max-width: 1200px) {
  .project-nav-section {
    gap: 1rem;
  }
  
  .project-setting-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
  }
  
  .project-action-btn {
    padding: 0.45rem 0.8rem;
    font-size: 0.8rem;
    min-height: 36px;
  }
  
  .project-settings-nav {
    padding: 0.5rem 0;
  }
  
  .project-nav-links {
    gap: 0.4rem;
  }
  
  .project-nav-link {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
    min-height: 30px;
  }
  
  .project-setting-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
    min-height: 30px;
  }
}

@media (max-width: 992px) {
  .project-nav-section {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .project-settings {
    gap: 0.2rem;
  }
  
  .project-setting-btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
  }
  
  .project-settings-nav {
    padding: 0.4rem 0;
  }
  
  .project-settings-container .project-nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;
  }
  
  .project-nav-link {
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
    min-height: 28px;
  }
  
  .project-setting-btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
    min-height: 28px;
  }
  
  .project-nav-link i {
    font-size: 0.65rem;
  }
}

/* Responsive Styles */
@media (max-width: 991px) {
  .navbar-toggler {
    display: block;
  }
  
  .navbar-collapse {
    display: none;
    flex-basis: 100%;
    flex-grow: 1;
    align-items: flex-start;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    transform: none;
    z-index: 1000;
  }
  
  .navbar-collapse.show {
    display: block;
    background-color: var(--main-a-color);
    padding: 1rem;
    border-radius: 0.25rem;
    box-shadow: var(--shadow-lg);
  }
  
  .project-nav-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .project-main-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
  }
  
  .project-action-btn {
    justify-content: flex-start;
    width: 100%;
  }
  
  .navbar-nav {
    flex-direction: column;
    text-align: center;
  }
  
  .navbar-nav .nav-item {
    margin: 0.5rem 0;
  }
  
  .navbar .dropdown-menu {
    position: static;
    width: 100%;
    margin-top: 0.5rem;
    box-shadow: none;
    border: 1px solid rgba(255,255,255,0.2);
  }
  
  .mb-lg-0 {
    margin-bottom: 0.5rem;
  }
}