/*
 * 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 the 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.
 */

/* Planner drag/drop visual feedback - assignee sections (purple) */
.drop-zone-active {
  background-color: color-mix(in oklch, var(--color-primary) 10%, transparent) !important;
  box-shadow: inset 0 0 0 3px var(--color-primary), inset 0 0 30px color-mix(in oklch, var(--color-primary) 15%, transparent) !important;
  border-radius: 1rem;
}

/* Backlog drop zone - highlight the full sidebar panel, not just the inner list */
#unscheduled-jobs.drop-zone-active {
  background-color: transparent !important;
  box-shadow: none !important;
}

#unscheduled-sidebar:has(.drop-zone-active) {
  box-shadow: inset 0 0 0 3px var(--color-warning);
}

/* Subtle tooltip - off white background with grey text */
.tooltip-subtle::before {
  background-color: #f8f9fa;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 4px rgb(0 0 0 / 10%);
}

.tooltip-subtle::after {
  border-color: #f8f9fa transparent transparent;
}

.tooltip-subtle.tooltip-left::after {
  border-color: transparent transparent transparent #f8f9fa;
}

.tooltip-subtle.tooltip-bottom::after {
  border-color: transparent transparent #f8f9fa;
}

.tooltip-subtle.tooltip-right::after {
  border-color: transparent #f8f9fa transparent transparent;
}

/* Thicker error borders for better visibility */
.input-error,
.select-error {
  border-width: 2px !important;
}

/* Fix date input placeholder visibility in dark mode on iOS Safari */
input[type="date"] {
  color: var(--color-base-content);
}

/* Mobile button tap feedback */
@media (hover: none) {
  .btn:active {
    transform: scale(0.92);
    filter: brightness(0.85);
    transition: transform 0.1s, filter 0.1s;
  }
}

/* Hide dock and sticky top bars on scroll down */
html.scrolled-down .dock {
  transform: translateY(100%);
}

@media (width <= 639px) {
  html.scrolled-down [data-sticky-top] {
    transform: translateY(-100%);
  }
}

/* Turbo navigation progress bar */
.turbo-progress-bar {
  height: 3px;
  background-color: var(--color-primary);
}

/* Override DaisyUI modal to hide closed dialogs properly (prevents drag image issues) */
dialog.modal:not([open]) {
  display: none;
}

/* Strip outer card wrapper on mobile index pages */
@media (width <= 1023px) {
  .card-borderless-mobile {
    border: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
  }

  .card-borderless-mobile > .card-body {
    padding: 0 !important;
  }
}

/* GitHub-style card border for dark mode index cards */
@media (prefers-color-scheme: dark) {
  .card-border-prominent {
    border: 2px solid #30363d !important;
  }

  .kebab-popover,
  .filter-dropdown-popover,
  .action-dropdown-popover {
    background-color: #161b22 !important;
    border-width: 2px !important;
    border-color: #444c56 !important;
  }
}

/* Shepherd.js product tour - DaisyUI theme overrides */
.shepherd-element {
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 25%);
  max-width: 400px;
  z-index: 10000;
}

.shepherd-text {
  font-size: 0.9375rem;
  line-height: 1.6;
  padding: 1rem 1.25rem;
  color: var(--color-base-content);
}

.shepherd-header {
  padding: 1rem 1.25rem 0;
  background: transparent;
}

.shepherd-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-base-content);
}

.shepherd-footer {
  padding: 0.75rem 1.25rem 1rem;
  border-top: none;
}

.shepherd-button {
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.shepherd-button:not(.shepherd-button-secondary) {
  background: var(--color-primary);
  color: var(--color-primary-content);
}

.shepherd-button:not(.shepherd-button-secondary):hover {
  opacity: 0.9;
}

.shepherd-button-secondary {
  background: transparent;
  color: var(--color-base-content);
  opacity: 0.6;
}

.shepherd-button-secondary:hover {
  opacity: 1;
}

.shepherd-cancel-icon {
  color: var(--color-base-content);
  opacity: 0.4;
}

.shepherd-cancel-icon:hover {
  opacity: 0.8;
}

.shepherd-modal-overlay-container {
  z-index: 9999;
}

@media (width <= 1023px) {
  .shepherd-element {
    max-width: calc(100vw - 2rem);
    margin: 0 1rem;
  }
}

/* Landing page layout - desktop: body is fixed, snap container scrolls */
@media (width >= 1024px) {
  html:has(.landing-body) {
    height: 100%;
    overflow: hidden;
  }

  .landing-body {
    height: 100%;
    overflow: hidden;
  }

  .landing-body > nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }

  .landing-snap-container {
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
  }

  .landing-snap-container > section {
    scroll-snap-align: start;
    height: 100vh;
  }

}

/* Bouncing scroll indicator */
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

.scroll-indicator {
  animation: scroll-bounce 2s ease-in-out infinite;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
  opacity: 0.7;
}

/* Landing section centering - desktop only (unlayered flex would override Tailwind's hidden on mobile) */
@media (width >= 1024px) {
  .landing-section {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Hero load animation */
@keyframes hero-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-animate {
  opacity: 0;
  animation: hero-fade-in-up 0.8s ease-out forwards;
}

.hero-animate-delay-1 { animation-delay: 0.15s; }
.hero-animate-delay-2 { animation-delay: 0.3s; }
.hero-animate-delay-3 { animation-delay: 0.5s; }

/* Scroll reveal animations */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Accessibility: disable all landing animations for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-animate {
    opacity: 1;
    animation: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .landing-snap-container {
    scroll-behavior: auto;
  }
}
