/* ================================
   Vendelo - Custom Styles
   ================================ */

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #d4c9b8;
  border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
  background: #b8a994;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Safe area for mobile bottom nav */
.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Alpine.js cloak */
[x-cloak] {
  display: none !important;
}

/* Alpine.js collapse transition */
[x-collapse] {
  overflow: hidden;
}

/* ================================
   Card Hover Effects
   ================================ */
.listing-card {
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.listing-card:hover {
  transform: translateY(-2px);
}

/* ================================
   Chat Bubble Styles
   ================================ */
.chat-bubble-sent {
  border-bottom-right-radius: 4px;
}

.chat-bubble-received {
  border-bottom-left-radius: 4px;
}

/* ================================
   Badge Styles
   ================================ */
.badge-promoted {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  animation: badge-pulse 2s ease-in-out infinite;
}

.badge-urgent {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
}

@keyframes badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* ================================
   Animations
   ================================ */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-in-up {
  animation: fade-in-up 0.4s ease-out;
}

.animate-fade-in {
  animation: fade-in 0.3s ease-out;
}

.animate-slide-in-right {
  animation: slide-in-right 0.3s ease-out;
}

.animate-scale-in {
  animation: scale-in 0.2s ease-out;
}

/* ================================
   Image Gallery
   ================================ */
.gallery-image {
  transition: opacity 0.3s ease;
}

/* ================================
   Form Focus Styles
   ================================ */
input:focus,
textarea:focus,
select:focus {
  outline: none;
}

/* File input styling */
input[type="file"]::file-selector-button {
  display: none;
}

/* Number input - remove spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* ================================
   Toast Notifications
   ================================ */
.toast-enter {
  animation: slide-in-right 0.3s ease-out;
}

.toast-exit {
  animation: fade-out-right 0.2s ease-in forwards;
}

@keyframes fade-out-right {
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

/* ================================
   Loading Spinner
   ================================ */
.spinner {
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ================================
   Image Upload Drag State
   ================================ */
.upload-zone-active {
  border-color: #2A7B88 !important;
  background-color: rgba(42, 123, 136, 0.05) !important;
}

/* ================================
   Mobile Bottom Nav
   ================================ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  nav.fixed.bottom-0 {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ================================
   Line Clamp Utilities
   ================================ */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ================================
   Print Styles
   ================================ */
@media print {
  nav, footer, .fixed {
    display: none !important;
  }

  main {
    padding-bottom: 0 !important;
  }
}
