/*
 * Application-wide CSS styles
 *
 * IMPORTANT: This project uses Propshaft (not Sprockets).
 * Propshaft does NOT support Sprockets directives like require_tree or require_self.
 * All CSS files must be explicitly linked in app/views/layouts/application.html.erb
 * using stylesheet_link_tag.
 */

html {
  font-size: 13px;
}

/* PDF Generation Loading State */
.btn.loading {
  position: relative;
  pointer-events: none;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  margin: auto;
  border: 2px solid transparent;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}

@keyframes spin {
  0% {
    transform: translateY(-50%) rotate(0deg);
  }
  100% {
    transform: translateY(-50%) rotate(360deg);
  }
}

/* Pagination */

.pagy {
  display: flex;
  column-gap: 0.25rem; /* space-x-1 */
  font-weight: 600; /* font-semibold */
  font-size: 0.875rem; /* text-sm */
  color: rgb(107, 114, 128); /* text-gray-500 */
}

.pagy a:not(.gap) {
  display: block;
  border-radius: 0.5rem; /* rounded-lg */
  padding-left: 0.75rem; /* px-3 */
  padding-right: 0.75rem; /* px-3 */
  padding-top: 0.25rem; /* py-1 */
  padding-bottom: 0.25rem; /* py-1 */
  background-color: rgb(229, 231, 235); /* bg-gray-200 */
}

.pagy a:not(.gap):hover {
  background-color: rgb(209, 213, 219); /* bg-gray-300 */
}

.pagy a:not([href]) {
  color: rgb(209, 213, 219); /* text-gray-300 */
  background-color: rgb(243, 244, 246); /* bg-gray-100 */
  cursor: default;
}

.pagy a.current {
  color: rgb(255, 255, 255); /* text-white */
  background-color: rgb(156, 163, 175); /* bg-gray-400 */
}

.pagy label {
  display: inline-block;
  white-space: nowrap;
  background-color: rgb(229, 231, 235); /* bg-gray-200 */
  border-radius: 0.5rem; /* rounded-lg */
  padding-left: 0.75rem; /* px-3 */
  padding-right: 0.75rem; /* px-3 */
  padding-top: 0.125rem; /* py-0.5 */
  padding-bottom: 0.125rem; /* py-0.5 */
}

.pagy label input {
  background-color: rgb(243, 244, 246); /* bg-gray-100 */
  border: none;
  border-radius: 0.375rem; /* rounded-md */
}

/* QR Code */

.qr-code {
  aspect-ratio: 1;
  block-size: 12dvh;
}

/* Sign In Page Styles */
.sign-in_carousel-slide {
  transition: opacity 0.5s ease-in-out;
}
.sign-in_carousel-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 9999px;
}
.sign-in_carousel-dot-active {
  width: 1.5rem;
  border-radius: 9999px;
}

.sign-in_btn-loading {
  display: inline-block;
  height: 1.25rem;
  width: 1.25rem;
  border-width: 2px;
  border-color: #ffffff;
  border-top-color: transparent;
  border-radius: 9999px;
  animation: sign-in_btn-loading 1s linear infinite;
}

@keyframes sign-in_btn-loading {
  to {
    transform: rotate(360deg);
  }
}

/* Chat Message Comment Box Width */
.comment-box-width {
  width: 250%;
  max-width: 650px;
  min-width: 200px;
  overflow-wrap: break-word;
}
