/* VocaVoca Custom Styles */

/* Smooth scrolling for chat */
#messages {
  scroll-behavior: smooth;
}

/* Hide scrollbar but keep functionality */
#messages::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

/* Safe area padding for iOS */
@supports (padding: env(safe-area-inset-bottom)) {
  .pb-safe {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Loading spinner for HTMX requests */
.htmx-request .htmx-indicator {
  display: inline-block;
}

.htmx-indicator {
  display: none;
}

/* Smooth transitions */
* {
  transition-property: background-color, border-color, color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* Focus ring styles */
*:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
}

/* Prevent text selection on buttons */
button {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

/* Custom animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Message bubble animations */
.message-enter {
  animation: fadeIn 0.3s ease-out;
}

/* iOS-style input focus */
input:focus,
textarea:focus,
select:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Disable tap highlight on mobile */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Custom checkbox styles */
input[type="checkbox"] {
  accent-color: #10b981;
}

/* Select dropdown arrow */
select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Prevent zoom on iOS inputs */
@media screen and (max-width: 768px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

/* PWA splash screen */
@media (display-mode: standalone) {
  body {
    -webkit-user-select: none;
    -webkit-touch-callout: none;
  }
}
