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

/* Flatpickr Neon Theme */
.flatpickr-calendar {
  background: #0a0a0a !important;
  border: 1px solid #00ff88 !important;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.2), 0 10px 40px rgba(0, 0, 0, 0.5) !important;
  border-radius: 12px !important;
  font-family: 'Rajdhani', sans-serif !important;
}

.flatpickr-months {
  background: linear-gradient(180deg, rgba(0, 255, 136, 0.1) 0%, transparent 100%) !important;
  border-radius: 12px 12px 0 0 !important;
  padding: 8px 0 !important;
}

.flatpickr-months .flatpickr-month {
  color: #00ff88 !important;
  fill: #00ff88 !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  color: #00ff88 !important;
  font-family: 'Orbitron', sans-serif !important;
  font-weight: 600 !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
  background: rgba(0, 255, 136, 0.1) !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  fill: #00ff88 !important;
  color: #00ff88 !important;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
  fill: #00cc6a !important;
  color: #00cc6a !important;
}

.flatpickr-weekdays {
  background: transparent !important;
}

.flatpickr-weekday {
  color: #6b7280 !important;
  font-weight: 600 !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
}

.flatpickr-day {
  color: #e5e7eb !important;
  border-radius: 6px !important;
  font-weight: 500 !important;
}

.flatpickr-day:hover {
  background: rgba(0, 255, 136, 0.2) !important;
  border-color: #00ff88 !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: #00ff88 !important;
  border-color: #00ff88 !important;
  color: #000 !important;
  font-weight: 700 !important;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.4) !important;
}

.flatpickr-day.inRange {
  background: rgba(0, 255, 136, 0.15) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.flatpickr-day.today {
  border-color: #00f0ff !important;
  color: #00f0ff !important;
}

.flatpickr-day.today:hover {
  background: rgba(0, 240, 255, 0.2) !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: #374151 !important;
}

.flatpickr-innerContainer {
  border-bottom: none !important;
}

.numInputWrapper:hover {
  background: rgba(0, 255, 136, 0.1) !important;
}

.numInputWrapper span {
  border: none !important;
}

.numInputWrapper span:hover {
  background: rgba(0, 255, 136, 0.2) !important;
}

.numInputWrapper span:after {
  border-color: #00ff88 transparent transparent transparent !important;
}

.numInputWrapper span.arrowUp:after {
  border-color: transparent transparent #00ff88 transparent !important;
}

.flatpickr-time {
  border-top: 1px solid #1f2937 !important;
}

.flatpickr-time input {
  color: #e5e7eb !important;
}

.flatpickr-time .flatpickr-am-pm {
  color: #00ff88 !important;
}

/* ====================================
   Estilo Reddit para comentários - Linhas guia hierárquicas
   ==================================== */

.comment-thread {
  position: relative;
}

/* Container de respostas com linha vertical à esquerda */
.reddit-replies {
  margin-left: 1rem !important;
  padding-left: 1rem !important;
  border-left: 2px solid #4b5563 !important;
  /* gray-600 - mais visível */
  margin-top: 0.25rem;
  position: relative;
}

/* Hover effect nas linhas - acende quando passa o mouse */
.reddit-replies:hover {
  border-left-color: #00ff88 !important;
  /* verde neon */
  transition: border-color 0.2s ease;
}

/* Efeito de destaque ao passar o mouse na thread inteira */
.comment-thread:hover>.reddit-replies {
  border-left-color: rgba(0, 255, 136, 0.5) !important;
  /* verde neon suave */
}

/* Espaçamento entre comentários na mesma thread */
.reddit-replies>.comment-thread {
  margin-bottom: 0.25rem;
}

.reddit-replies>.comment-thread:last-child {
  margin-bottom: 0;
}

/* Limite de profundidade - após 5 níveis, reduz padding */
.reddit-replies .reddit-replies .reddit-replies .reddit-replies .reddit-replies {
  margin-left: 0.5rem !important;
  padding-left: 0.5rem !important;
}

/* Animação suave ao abrir formulário de resposta */
[id^="reply_form_"] {
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

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

/* Responsivo - em telas pequenas, reduz ainda mais a indentação */
@media (max-width: 640px) {
  .reddit-replies {
    margin-left: 1.5rem;
    /* 24px */
    padding-left: 0.5rem;
    /* 8px */
  }

  .reddit-replies .reddit-replies .reddit-replies {
    margin-left: 1rem;
    /* 16px - muito compacto após 3 níveis */
  }

  /* Reduce inline margin-left for comment depth on mobile */
  .comment-item[style*="margin-left"] {
    margin-left: 12px !important;
  }

  .comment-children[style*="margin-left"] {
    margin-left: 12px !important;
  }

  /* Cap thread lines on mobile */
  .thread-line,
  .thread-curve {
    left: -8px !important;
  }

  .thread-curve {
    width: 8px !important;
  }
}

/* ====================================
   Comment anchor highlight - quando navega via link
   ==================================== */
.comment-item:target {
  animation: commentHighlight 2s ease-out;
}

.comment-item {
  margin-left: 0;
  overflow: visible;
  z-index: 0;
}

.comment-children {
  margin-top: 8px;
}

.comment-content {
  overflow: visible;
}

.comment-menu {
  z-index: 9999;
}

.comment-item.comment-menu-open {
  z-index: 50;
}

@keyframes commentHighlight {

  0%,
  30% {
    background: rgba(0, 255, 170, 0.15);
    box-shadow: 0 0 0 2px rgba(0, 255, 170, 0.4);
    border-radius: 12px;
  }

  100% {
    background: transparent;
    box-shadow: none;
  }
}

/* Toast notification animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}
