/* Custom styles for motorcycle rental platform */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Card hover effects */
.motorcycle-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.motorcycle-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Image aspect ratio */
.motorcycle-image {
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* Badge styles */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
}

/* Admin mode indicators */
.admin-edit-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(251, 191, 36, 0.9);
  color: #1f2937;
  padding: 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.admin-edit-btn:hover {
  background: rgba(251, 191, 36, 1);
  transform: scale(1.05);
}

/* Toast notification animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(400px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-notification {
  animation: slideIn 0.3s ease-out;
  transition: opacity 0.3s, transform 0.3s;
}

.animate-slide-in {
  animation: slideIn 0.3s ease-out;
}

/* Loading animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.fa-spin {
  animation: spin 1s linear infinite;
}

/* View Switcher active state */
.mode-btn.active {
  background: #3b82f6 !important;
  color: white !important;
  font-weight: 600;
}

/* Primary buttons - Force dark blue visibility */
button[id*="search-btn"],
button[id*="add-motorcycle-btn"],
button[id*="add-brand-btn"],
button[class*="search-btn"],
.btn-primary,
.bg-primary {
  background-color: #003366 !important;
  color: #FFFFFF !important;
  border: none !important;
}

button[id*="search-btn"]:hover,
button[id*="add-motorcycle-btn"]:hover,
button[id*="add-brand-btn"]:hover,
button[class*="search-btn"]:hover,
.btn-primary:hover {
  background-color: #002244 !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2) !important;
}

/* Ensure button text is always white */
button[id*="search-btn"] *,
button[id*="add-motorcycle-btn"] *,
button[id*="add-brand-btn"] *,
.btn-primary * {
  color: #FFFFFF !important;
}

/* Admin table image hover zoom effect */
.admin-table-image-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  overflow: hidden;
  border-radius: 0.5rem;
  cursor: pointer;
}

.admin-table-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.admin-table-image-wrapper:hover img {
  transform: scale(2.5);
  z-index: 50;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #view-switcher {
    top: auto;
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: 100%;
  }
  
  #view-switcher .flex {
    flex-direction: row;
    justify-content: space-between;
  }
  
  #view-switcher button {
    flex: 1;
  }
}

/* Brand Tabs - Mobile First Design */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.brand-tab {
  white-space: nowrap;
  min-width: fit-content;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  border: 2px solid #e5e7eb;
  background: white;
  color: #374151;
  transition: all 0.2s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.brand-tab:hover {
  border-color: #3b82f6;
  background: #eff6ff;
  transform: translateY(-1px);
}

.brand-tab:active {
  transform: translateY(0);
}

.brand-tab.active {
  background: #003366;
  color: white;
  border-color: #003366;
  font-weight: 600;
  box-shadow: 0 4px 6px -1px rgba(0, 51, 102, 0.3);
}

.brand-tab .count {
  display: inline-block;
  margin-left: 0.375rem;
  padding: 0.125rem 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.brand-tab.active .count {
  background: rgba(255, 255, 255, 0.3);
}

/* Touch-friendly spacing */
@media (max-width: 768px) {
  .brand-tab {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
  }
}
