/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */
@import "actiontext.css";

* {
  font-family: var(--font-sans);
}

/* Cookbook Show Styles */
.recipe-nav-card {
  position: relative;
  transition: all 0.3s ease;
}

.recipe-nav-card.active {
  transform: scale(1.02);
}

.recipe-nav-card.active .border-orange-500 {
  border-color: rgb(249 115 22);
}

/* Smooth transitions for recipe display */
.recipe-item {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hide scrollbar but keep functionality */
.overflow-y-auto::-webkit-scrollbar {
  width: 6px;
}

/* Avatar decorative ring animation */
.animate-spin-slow {
  animation: spin 20s linear infinite;
}

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

.overflow-y-auto::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.overflow-y-auto::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.overflow-y-auto::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Pagy pagination */
.pagy-nav {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.pagy-nav a,
.pagy-nav span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.15s;
  border: 1px solid transparent;
}

.pagy-nav a {
  color: #374151;
  background: #fff;
  border-color: #e5e7eb;
}

.pagy-nav a:hover {
  border-color: #ea580c;
  color: #ea580c;
  background: #fff7ed;
}

.pagy-nav span.current {
  background: #ea580c;
  color: #fff;
  border-color: #ea580c;
}

.pagy-nav span.disabled {
  color: #d1d5db;
  background: #f9fafb;
  border-color: #f3f4f6;
  cursor: not-allowed;
}

/* Mobile: sticky Lexxy toolbar so photo/formatting buttons stay reachable while scrolling */
@media (max-width: 1023px) {
  lexxy-editor {
    overflow: visible !important;
  }

  lexxy-editor lexxy-toolbar {
    position: sticky;
    /* header (64px) + mobile ingredients toggle bar (~46px) */
    top: 110px;
    z-index: 20;
    border-radius: 1rem 1rem 0 0 !important;
  }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .flex.h-screen {
    flex-direction: column;
  }

  .flex.h-screen > div:first-child {
    min-height: 100vh;
  }

  .flex.h-screen > div:last-child {
    width: 100%;
    max-height: 300px;
    border-left: none;
    border-top: 1px solid #e5e7eb;
  }
}
