/* Component Styles - Reusable UI Elements */

/* Buttons */
.btn {
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--primary-color);
  color: #fff;
  border-radius: 10px;
  padding: 10px 10px;
}

.btn-primary:hover {
  background: #ff7a33;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-secondary);
  color: #aaa;
}

.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}




.btn-lg {
  background: var(--primary-color);
  color: #fff;
  border-radius: 10px;
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}




.btn-lg:hover {
  background: #ff7a33;
}

.btn-lg-ghost {
  background: transparent;
  border: 1px solid #333;
  color: #ccc;
  border-radius: 10px;
  padding: 13px 28px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}



.btn-lg-ghost:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* Navigation */
.nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-primary);
  padding: 0 48px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}




.nav-left {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-link {
  font-size: 13px;
  color: #888;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease;
  padding: 8px 16px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.active {
  color: var(--primary-color);
}

/* Special styling for sign-in button */
.nav-link.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-link.btn-secondary:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 92, 0, 0.15);
}

/* User Menu */
.user-menu {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.user-menu:hover .user-avatar {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  margin-top: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: none;
  z-index: 1000;
  padding: 8px 0;
  animation: fadeInUp 0.2s ease;
}

.user-dropdown::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 0;
  right: 0;
  height: 15px;
  background: transparent;
}

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

.user-info {
  padding: 12px 16px;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.user-email {
  font-size: 12px;
  color: var(--text-muted);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--primary-color);
}

.sign-out-btn {
  color: #ff4d4d;
}

.sign-out-btn:hover {
  background: rgba(255, 77, 77, 0.1);
  color: #ff4d4d;
}

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

/* Hero Actions */
.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.btn-large {
  padding: 18px 36px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 14px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
}

.btn-large::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.btn-large:hover::before {
  left: 100%;
}

.btn-large:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.btn-large:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.btn-large svg {
  transition: transform 0.3s ease;
}

.btn-large:hover svg {
  transform: rotate(15deg) scale(1.1);
}

/* Special styling for hero post ride button */
#heroPostRideBtn {
  background: linear-gradient(135deg, #FF5C00 0%, #ff7730 50%, #ff9a6c 100%);
  color: white;
  border: none;
  box-shadow: 
    0 6px 24px rgba(255, 92, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  position: relative;
}

#heroPostRideBtn::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, #FF5C00, #ff8c00, #ffb347);
  border-radius: 16px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  filter: blur(8px);
}

#heroPostRideBtn:hover::after {
  opacity: 0.6;
}

#heroPostRideBtn:hover {
  background: linear-gradient(135deg, #ff6a1a 0%, #ff8533 50%, #ffa97a 100%);
  box-shadow: 
    0 10px 40px rgba(255, 92, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

#heroPostRideBtn:active {
  transform: translateY(-1px) scale(0.98);
}

/* Secondary button styling */
.btn-secondary.btn-large {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.15);
  color: #ccc;
}

.btn-secondary.btn-large:hover {
  border-color: rgba(255, 92, 0, 0.5);
  color: #fff;
  background: rgba(255, 92, 0, 0.05);
}

/* Loading state for buttons */
.btn-large.loading {
  opacity: 0.7;
  transform: scale(0.95);
  pointer-events: none;
}

.btn-large.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@media (max-width: 768px) {
  .nav {
    padding: 0 12px;
    height: 56px;
    position: relative;
  }
  
  .nav-left {
    gap: 12px;
    flex: 1;
    min-width: 0;
  }
  
  .logo-text {
    font-size: 14px;
    letter-spacing: 1px;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-primary);
    z-index: 1001;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }
  
  .nav-links.mobile-open {
    display: flex;
  }
  
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
    min-width: 40px;
    min-height: 40px;
  }
  
  .mobile-menu-btn:hover,
  .mobile-menu-btn:active {
    background: var(--bg-tertiary);
  }
  
  .nav-right {
    gap: 8px;
    flex-shrink: 0;
  }
  
  /* Touch-friendly buttons */
  .nav-right .sign-in-btn,
  .nav-right .btn-primary,
  .nav-link {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Hide the Sign-in text button on mobile, keep only the icon/behavior */
  .nav-right .sign-in-btn {
    padding: 8px 14px;
    font-size: 12px;
  }
  
  .nav-right .btn-primary {
    padding: 8px 14px;
    font-size: 12px;
    white-space: nowrap;
  }

  /* Hero action buttons */
  .hero-actions {
    flex-direction: column;
    gap: 12px;
  }

  .btn-large {
    width: 100%;
    min-width: unset;
    padding: 16px 24px;
    font-size: 15px;
    justify-content: center;
    min-height: 52px; /* Touch-friendly */
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255, 92, 0, 0.2);
    cursor: pointer;
  }

  .btn-secondary.btn-large {
    background: transparent;
    border: 1.5px solid #333;
    color: #ccc;
  }
  
  /* User avatar touch target */
  .user-avatar {
    width: 40px;
    height: 40px;
    font-size: 15px;
  }
}

/* Desktop: Hide mobile menu button */
@media (min-width: 769px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--primary-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-text {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: var(--text-primary);
}

/* Cards */
.card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
}

.card:hover {
  border-color: var(--border-hover);
}

/* Badges and Tags */
.badge {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap;
}

.diff-tag {
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 8px;
  white-space: nowrap;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid;
  transition: all 0.3s ease;
}

.t-easy {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(76, 175, 80, 0.05) 100%);
  color: #4CAF50;
  border-color: rgba(76, 175, 80, 0.3);
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

.t-mod {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, rgba(255, 193, 7, 0.05) 100%);
  color: #FFC107;
  border-color: rgba(255, 193, 7, 0.3);
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.1);
}

.t-hard {
  background: linear-gradient(135deg, rgba(244, 67, 54, 0.15) 0%, rgba(244, 67, 54, 0.05) 100%);
  color: #F44336;
  border-color: rgba(244, 67, 54, 0.3);
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.1);
}

.t-extreme {
  background: linear-gradient(135deg, rgba(156, 39, 176, 0.15) 0%, rgba(156, 39, 176, 0.05) 100%);
  color: #9C27B0;
  border-color: rgba(156, 39, 176, 0.3);
  box-shadow: 0 2px 8px rgba(156, 39, 176, 0.1);
}

/* Chips - Modern Filter Style */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 8px 18px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  color: #aaa;
  position: relative;
  overflow: hidden;
}

.chip::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: left 0.5s ease;
}

.chip:hover::before {
  left: 100%;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: translateY(-2px);
}

.chip.on {
  background: linear-gradient(135deg, rgba(255, 92, 0, 0.15) 0%, rgba(255, 119, 48, 0.1) 100%);
  color: #FF5C00;
  border-color: rgba(255, 92, 0, 0.4);
  box-shadow: 
    0 4px 15px rgba(255, 92, 0, 0.15),
    0 0 20px rgba(255, 92, 0, 0.05) inset;
}

.chip.on:hover {
  background: linear-gradient(135deg, rgba(255, 92, 0, 0.2) 0%, rgba(255, 119, 48, 0.15) 100%);
  box-shadow: 
    0 6px 20px rgba(255, 92, 0, 0.2),
    0 0 25px rgba(255, 92, 0, 0.08) inset;
}

.chip.blue-on {
  background: linear-gradient(135deg, rgba(30, 144, 255, 0.15) 0%, rgba(79, 172, 254, 0.1) 100%);
  color: #1E90FF;
  border-color: rgba(30, 144, 255, 0.4);
  box-shadow: 
    0 4px 15px rgba(30, 144, 255, 0.15),
    0 0 20px rgba(30, 144, 255, 0.05) inset;
}

.weather-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #1a2a1a;
  border: 1px solid #2a3a2a;
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 10px;
  color: var(--success-color);
}

.verified-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--secondary-color);
}

/* Form Elements */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: #aaa;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-secondary);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--bg-card);
}

.form-group input::placeholder {
  color: var(--text-disabled);
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #aaa;
  cursor:pointer;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 16px;
  height: 16px;
  border: 1px solid var(--border-secondary);
  border-radius: 4px;
  background: var(--bg-primary);
  position: relative;
  transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
}
