/* Custom styles для Bank Reviews */

/* htmx transitions */
.htmx-swapping {
  opacity: 0;
  transition: opacity 200ms ease-out;
}

.htmx-settling {
  opacity: 1;
  transition: opacity 200ms ease-in;
}

/* Card hover effects */
.hover-shadow {
  transition: all 0.3s ease;
}

.hover-shadow:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Transition utility */
.transition {
  transition: all 0.3s ease;
}

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

/* Alpine x-show transitions */
[x-show] {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Review card AI summary animations */
.alert-info {
  transition: all 0.3s ease;
}

.alert-info:hover {
  box-shadow: 0 0.125rem 0.5rem rgba(13, 110, 253, 0.15);
}

.hover-bg-light:hover {
  background-color: #f8f9fa;
}

/* Search spinner */
.htmx-request .spinner {
  display: inline-block !important;
}

/* Like button animation */
button[hx-post]:active {
  transform: scale(0.95);
}

button[hx-post]:hover {
  transform: scale(1.05);
  transition: transform 0.2s ease;
}

/* Loading states */
.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: inline-block;
}

.htmx-request.htmx-indicator {
  display: inline-block;
}

/* Mobile touch feedback */
@media (hover: none) {
  .btn:active {
    background-color: rgba(0, 0, 0, 0.05);
  }
}

/* Smooth scroll для infinite scroll */
html {
  scroll-behavior: smooth;
}

/* Rating stars animation */
.bi-star-fill,
.bi-star-half {
  animation: star-pop 0.3s ease;
}

@keyframes star-pop {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* Filter panel slide */
[x-show] {
  transition: all 0.3s ease;
}

/* Quick modal fade */
.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
}

/* Share dropdown */
[x-transition] {
  transition: all 0.2s ease;
}

/* Mobile: Full screen modals */
@media (max-width: 767.98px) {
  .modal-fullscreen-md-down .modal-dialog {
    max-width: 100%;
    margin: 0;
    height: 100vh;
  }
  
  .modal-fullscreen-md-down .modal-content {
    height: 100%;
    border: 0;
    border-radius: 0;
  }
}

/* Skeleton loading (для htmx) */
.skeleton {
  animation: skeleton-loading 1s linear infinite alternate;
}

@keyframes skeleton-loading {
  0% {
    background-color: hsl(200, 20%, 80%);
  }
  100% {
    background-color: hsl(200, 20%, 95%);
  }
}

/* htmx progress bar */
.htmx-request.htmx-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, #0d6efd, #0dcaf0);
  z-index: 9999;
  animation: progress 1s ease-in-out infinite;
}

@keyframes progress {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Accessibility */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* PWA Install prompt */
.pwa-install-prompt {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 1050;
  animation: slideUp 0.3s ease;
}

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

@media (min-width: 768px) {
  .pwa-install-prompt {
    max-width: 400px;
    right: auto;
  }
}
