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


/* Global: pointer cursor for all interactive elements */
button,
[type="button"],
[type="submit"],
[type="reset"],
[role="button"],
a {
  cursor: pointer;
}

/* Sortable.js styles for photo drag & drop */
.sortable-ghost {
  opacity: 0.4;
}

.sortable-chosen {
  cursor: grabbing;
}

.sortable-drag {
  opacity: 0.8;
}

.drag-handle {
  cursor: grab;
  transition: opacity 0.2s ease;
}

.drag-handle:hover {
  opacity: 0.8;
}

.drag-handle:active {
  cursor: grabbing;
}

/* Mobile Navigation Styles */
@media (max-width: 767px) {
  /* Ensure mobile menu appears above other content */
  #mobile-menu {
    position: relative;
    z-index: 50;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  }

  /* Smooth transitions for mobile menu */
  #mobile-menu {
    transition: all 0.2s ease-in-out;
  }

  /* Better touch targets for mobile */
  #mobile-menu a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Mobile menu button hover state */
  #mobile-menu-button:hover {
    background-color: rgba(248, 250, 252, 0.8);
  }

  /* Improve mobile form experience */
  trix-editor {
    min-height: 180px !important;
    padding: 0.5rem !important;
    font-size: 1rem !important;
  }

  /* Better mobile table experience */
  .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
  }

  /* Mobile-friendly buttons (exclude toggle switches) */
  button.inline-flex,
  a.inline-flex {
    min-height: 44px;
  }

  /* Mobile-friendly form fields (Mission Control) */
  .mission-control input[type="text"],
  .mission-control input[type="email"],
  .mission-control input[type="password"],
  .mission-control input[type="url"],
  .mission-control input[type="tel"],
  .mission-control input[type="number"],
  .mission-control textarea,
  .mission-control select {
    font-size: 16px !important; /* Prevents zoom on iOS */
    min-height: 44px !important;
  }
}

/* Tablet styles */
@media (min-width: 768px) and (max-width: 1023px) {
  /* Adjust spacing for tablet */
  .max-w-7xl {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Fix Lexxy link button missing data-command sizing */
lexxy-toolbar button[data-dialog-target] {
  aspect-ratio: 1;
  block-size: 2lh;
  color: currentColor;
  display: grid;
  place-items: center;
}

lexxy-toolbar button[data-dialog-target] svg {
  block-size: 0.85em;
  fill: currentColor;
  inline-size: auto;
}

/* ActionText / Trix Editor Styles - Clean & Minimal */
trix-editor {
  border: 1px solid rgb(203 213 225) !important;
  border-radius: 0.375rem !important;
  padding: 0.75rem !important;
  min-height: 200px !important;
  font-size: 0.875rem !important;
  line-height: 1.5rem !important;
  color: rgb(15 23 42) !important;
  background-color: white !important;
  box-shadow: none !important;
  transition: border-color 0.2s ease !important;
}

trix-editor:focus {
  outline: none !important;
  border-color: rgb(37 99 235) !important;
  box-shadow: 0 0 0 1px rgb(37 99 235) !important;
}

trix-toolbar .trix-button-group {
  border-color: rgb(203 213 225) !important;
  background-color: rgb(248 250 252) !important;
}

trix-toolbar .trix-button {
  background-color: transparent !important;
  border: none !important;
  color: rgb(71 85 105) !important;
  padding: 0.375rem !important;
  border-radius: 0.25rem !important;
}

trix-toolbar .trix-button:hover {
  background-color: rgb(226 232 240) !important;
  color: rgb(15 23 42) !important;
}

trix-toolbar .trix-button.trix-active {
  background-color: rgb(37 99 235) !important;
  color: white !important;
}

/* Clean error states */
.field_with_errors input,
.field_with_errors textarea,
.field_with_errors select {
  border-color: rgb(239 68 68) !important;
  box-shadow: 0 0 0 1px rgb(239 68 68) !important;
}

.field_with_errors 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='%23ef4444' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
}

.field_with_errors label {
  color: rgb(185 28 28) !important;
}

/* Mission Control form field styling */
.mission-control input[type="text"],
.mission-control input[type="email"],
.mission-control input[type="password"],
.mission-control input[type="url"],
.mission-control input[type="tel"],
.mission-control input[type="number"],
.mission-control textarea,
.mission-control select {
  appearance: none !important;
  background-color: white !important;
  border: 1px solid rgb(203 213 225) !important;
  border-radius: 0.375rem !important;
  color: rgb(15 23 42) !important;
  font-size: 0.875rem !important;
  line-height: 1.5rem !important;
  padding: 0.75rem !important;
  min-height: 2.75rem !important; /* 44px equivalent */
  box-shadow: none !important;
  transition: border-color 0.2s ease !important;
}

/* Select-specific styling */
.mission-control 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 8 4 4 4-4'/%3e%3c/svg%3e") !important;
  background-position: right 0.75rem center !important;
  background-repeat: no-repeat !important;
  background-size: 1.25em 1.25em !important;
  padding-right: 2.5rem !important;
}

/* Focus states - clean and minimal */
.mission-control input[type="text"]:focus,
.mission-control input[type="email"]:focus,
.mission-control input[type="password"]:focus,
.mission-control input[type="url"]:focus,
.mission-control input[type="tel"]:focus,
.mission-control input[type="number"]:focus,
.mission-control textarea:focus,
.mission-control select:focus {
  border-color: rgb(37 99 235) !important;
  box-shadow: 0 0 0 1px rgb(37 99 235) !important;
  outline: none !important;
}

/* Disabled states */
.mission-control input[type="text"]:disabled,
.mission-control input[type="email"]:disabled,
.mission-control input[type="password"]:disabled,
.mission-control input[type="url"]:disabled,
.mission-control input[type="tel"]:disabled,
.mission-control input[type="number"]:disabled,
.mission-control textarea:disabled,
.mission-control select:disabled {
  background-color: rgb(249 250 251) !important;
  color: rgb(107 114 128) !important;
  cursor: not-allowed !important;
  border-color: rgb(229 231 235) !important;
}

/* Form row styling for clean layout */
.form-row {
  padding: 1rem 0;
}

.form-row:first-child {
  padding-top: 0;
}

.form-row:last-child {
  padding-bottom: 0;
}

/* Section headers within forms */
.form-row h3 {
  color: rgb(71 85 105);
  font-weight: 500;
  margin-bottom: 1rem;
}

/* Enhanced drag and drop for photos */
[data-photo-id] {
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

[data-photo-id]:hover {
  cursor: move;
}

[data-photo-id].dragging {
  opacity: 0.5;
  transform: rotate(5deg);
  z-index: 1000;
}

[data-photo-id].drag-over {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

/* Drag ghost image styling */
[data-photo-id] img {
  pointer-events: none;
}

/* Visual feedback for draggable photos */
[data-photo-id]:active {
  cursor: grabbing;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Rich text content display styles */
.prose {
  color: rgb(71 85 105);
  max-width: none;
}

.prose h1, .prose h2, .prose h3 {
  color: rgb(15 23 42);
  font-weight: 600;
}

.prose a {
  color: rgb(37 99 235);
  text-decoration: underline;
}

.prose a:hover {
  color: rgb(29 78 216);
}

.prose strong {
  font-weight: 600;
  color: rgb(15 23 42);
}

.prose ul, .prose ol {
  padding-left: 1.5rem;
}

.prose blockquote {
  border-left: 4px solid rgb(203 213 225);
  padding-left: 1rem;
  font-style: italic;
  color: rgb(100 116 139);
}

/* Accessibility Improvements */
/* Focus indicators */
.focus-visible:focus {
  outline: 2px solid rgb(37 99 235);
  outline-offset: 2px;
}

/* Skip link for keyboard navigation */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: rgb(37 99 235);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
}

.skip-link:focus {
  top: 6px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .text-slate-500 {
    color: rgb(0 0 0) !important;
  }

  .border-slate-300 {
    border-color: rgb(0 0 0) !important;
  }
}

/* Homepage Styles */

/* Smooth scroll offset for fixed header */
:target {
  scroll-margin-top: 5rem;
}

/* Newsletter form specific styling on dark background */
.bg-slate-900 input[type="email"] {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-color: rgb(71 85 105) !important;
  color: white !important;
}

.bg-slate-900 input[type="email"]::placeholder {
  color: rgb(148 163 184) !important;
}

.bg-slate-900 input[type="email"]:focus {
  border-color: rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1) !important;
}

/* Animate elements on scroll */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Stagger animation delays */
.animation-delay-100 { animation-delay: 0.1s; }
.animation-delay-200 { animation-delay: 0.2s; }
.animation-delay-300 { animation-delay: 0.3s; }

/* Image hover effects */
.image-hover-zoom {
  overflow: hidden;
}

.image-hover-zoom img {
  transition: transform 0.5s ease;
}

.image-hover-zoom:hover img {
  transform: scale(1.05);
}

/* Card hover effects */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Button hover animations */
.btn-animate {
  transition: all 0.3s ease;
}

.btn-animate:hover {
  transform: translateY(-2px);
}

.btn-animate:active {
  transform: translateY(0);
}

/* Gradient text effect (optional, for special headlines) */
.text-gradient {
  background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Decorative dot pattern animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

/* Mobile menu animation */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[data-mobile-menu-target="menu"]:not(.hidden) {
  animation: slideDown 0.2s ease-out;
}

/* Link underline animation */
.link-underline {
  position: relative;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: currentColor;
  transition: width 0.3s ease;
}

.link-underline:hover::after {
  width: 100%;
}

/* Hide scrollbar but keep functionality */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Line clamp utilities */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
