/* Navbar Styles for FırsatGo - Matching the Design */

/* CSS Variables */
:root {
  --primary-orange: #FF6B35;
  --primary-red: #F7463A;
  --primary-dark: #E63946;
  --secondary-orange: #FFB562;
  --gradient-bg: linear-gradient(135deg, #FF6B35 0%, #F7463A 50%, #E63946 100%);
  --gradient-soft: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(247, 70, 58, 0.1) 100%);
  --card-shadow: 0 8px 32px rgba(255, 107, 53, 0.15);
  --card-hover-shadow: 0 12px 40px rgba(255, 107, 53, 0.25);
  --text-primary: #2C3E50;
  --text-secondary: #7F8C8D;
  --background-soft: #FAFBFC;
  --white: #FFFFFF;
  --border-radius: 16px;
  --border-radius-lg: 24px;
}

/* Header Styles */
.app-header {
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 999;
  border-bottom: 1px solid #f0f0f0;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  height: 70px;
}

/* Logo Section */
.navbar-brand {
  flex-shrink: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  height: 45px;
  width: auto;
  object-fit: contain;
}

/* Navigation Menu */
.navbar-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  margin-left: 48px;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 14px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link i {
  font-size: 14px;
}

.nav-link.router-link-active i {
  color: var(--white);
}

.nav-link:hover {
  background: var(--gradient-soft);
  color: var(--primary-orange);
}

.nav-link.router-link-active {
  background: var(--gradient-bg);
  color: var(--white);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* Remove the default ::after underline for active nav links */
.nav-link.router-link-active::after {
  display: none;
}

/* User Actions Section */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Search Box - Hidden in navbar, only in hero */
.navbar .search-box {
  display: none;
}

/* Auth Buttons */
.auth-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  white-space: nowrap;
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid #f1f1f1;
}

.btn-ghost:hover {
  background: var(--gradient-soft);
  color: var(--primary-orange);
  border-color: var(--primary-orange);
}

.btn-primary {
  background: var(--gradient-bg);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
  background: #f8f9fa;
  color: #2d3436;
  border: 2px solid #e9ecef;
}

.btn-secondary:hover {
  background: #e9ecef;
  border-color: #dee2e6;
}

/* User Dropdown */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: #f8f9fa;
  border: 2px solid transparent;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropdown-toggle:hover {
  background: #e9ecef;
  border-color: #dee2e6;
}

.dropdown-toggle span {
  color: #2d3436;
  font-size: 14px;
  font-weight: 500;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-bg);
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.avatar-icon {
  color: #fff;
  font-size: 16px;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 8px;
  min-width: 240px;
  z-index: 1000;
  border: 1px solid #f0f0f0;
}

.dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 4px;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-name {
  font-size: 15px;
  font-weight: 600;
  color: #2d3436;
}

.user-phone {
  font-size: 13px;
  color: #7f8c8d;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  text-align: left;
  text-decoration: none;
  color: #2d3436;
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.dropdown-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  color: #7f8c8d;
}

.dropdown-item:hover {
  background: #f8f9fa;
  color: var(--primary-orange);
}

.dropdown-item:hover i {
  color: var(--primary-orange);
}

.dropdown-divider {
  height: 1px;
  background: #e9ecef;
  margin: 8px 0;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 1001;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: #2d3436;
  border-radius: 2px;
  transition: all 0.3s ease;
  display: block;
}

.mobile-menu-toggle span:not(:last-child) {
  margin-bottom: 6px;
}

.mobile-menu-toggle.is-active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.is-active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.loading-spinner {
  text-align: center;
}

.loading {
  display: inline-block;
  width: 48px;
  height: 48px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #ff6347;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-spinner p {
  margin-top: 16px;
  color: #2d3436;
  font-weight: 500;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 85px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
}

.toast {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 16px 20px;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: slideInRight 0.3s ease;
  border-left: 4px solid var(--primary-orange);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast p {
  margin: 0;
  color: #2d3436;
  font-size: 14px;
  font-weight: 500;
  flex: 1;
}

.toast-close {
  background: none;
  border: none;
  color: #95a5a6;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.toast-close:hover {
  color: #2d3436;
  background: #f8f9fa;
  border-radius: 50%;
}

.toast-success {
  border-left-color: #00b894;
}

.toast-error {
  border-left-color: #d63031;
}

.toast-warning {
  border-left-color: #fdcb6e;
}

.toast-info {
  border-left-color: #0984e3;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .navbar-menu {
    margin-left: 20px;
  }

  .navbar-nav {
    gap: 4px;
  }

  .nav-link {
    padding: 8px 12px;
    font-size: 14px;
  }

  .search-box {
    min-width: 250px;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
  
  .mobile-menu-toggle span {
    background: var(--text-primary);
  }

  .navbar-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 20px;
    margin: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .navbar-menu.is-active {
    transform: translateX(0);
  }

  .navbar-nav {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .nav-link {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    color: var(--text-primary);
  }
  
  .nav-link:hover {
    background: var(--gradient-soft);
    color: var(--primary-orange);
  }
  
  .nav-link.router-link-active {
    background: var(--gradient-bg);
    color: var(--white);
  }

  .navbar-actions {
    flex-direction: column;
    width: 100%;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
  }

  .search-box {
    width: 100%;
    min-width: unset;
  }

  .auth-buttons {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: 1px solid #e9ecef;
    margin-top: 8px;
  }

  .toast-container {
    left: 20px;
    right: 20px;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .brand-logo {
    height: 35px;
  }

  .navbar {
    padding: 8px 0;
    height: 60px;
  }

  .navbar-menu {
    top: 60px;
  }

  .toast-container {
    left: 12px;
    right: 12px;
    top: 70px;
  }

  .toast {
    padding: 12px 16px;
  }
}

