/* Estilos customizados para o Startup Summit 2025 */

/* Scroll suave */
html {
  scroll-behavior: smooth;
}

/* Utilitárias compatíveis quando o Tailwind não está em modo JIT */
.font-roboto-condensed {
  font-family: 'Roboto Condensed', sans-serif !important;
}

.leading-105 {
  line-height: 1.05 !important;
}

.bg-white-90 {
  background-color: rgba(255, 255, 255, 0.9) !important;
}

/* Overrides imediatos para classes utilitárias customizadas */
.bg-summit-cyan {
  background-color: #A5090C !important;
}

.text-summit-cyan {
  color: #A5090C !important;
}

.border-summit-cyan {
  border-color: #A5090C !important;
}

.hover\:bg-summit-cyan\/80:hover {
  background-color: rgba(165, 9, 12, 0.8) !important;
}

/* Blocos claros (cards/seções) */
.bg-summit-dark {
  background-color: #FAFAFA !important;
}

.bg-summit-black {
  background-color: #FFFFFF !important;
}

/* Resumo do Pedido em fundo leve também */
.summary-panel {
  background-color: #FAFAFA !important;
}

/* Estados dos cards de portal */
.portal-card input:checked+div {
  border-color: #A5090C !important;
  background: linear-gradient(135deg, rgba(165, 9, 12, 0.1), rgba(165, 9, 12, 0.05)) !important;
  box-shadow: 0 0 20px rgba(165, 9, 12, 0.3) !important;
}

/* Estados dos cards de mantenedor */
.mantenedor-card input:checked+div {
  border-color: #A5090C !important;
  background: linear-gradient(135deg, rgba(165, 9, 12, 0.1), rgba(165, 9, 12, 0.05)) !important;
  box-shadow: 0 0 20px rgba(165, 9, 12, 0.3) !important;
}

/* Animações para botões */
button:hover {
  transform: translateY(-2px);
}

/* Estilos para inputs focados */
input:focus {
  outline: none !important;
  border-color: #A5090C !important;
  box-shadow: 0 0 0 3px rgba(165, 9, 12, 0.15) !important;
}

/* Checkbox customizado */
input[type="checkbox"]:checked {
  background-color: #A5090C !important;
  border-color: #A5090C !important;
}

/* Radio customizado */
input[type="radio"]:checked {
  background-color: #A5090C !important;
  border-color: #A5090C !important;
}

/* Estilo para o fundo diagonal */
.diagonal-bg {
  background: linear-gradient(135deg, transparent 30%, rgba(165, 9, 12, 0.08) 50%, transparent 70%);
}

/* Loading spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #121212;
  border-top: 2px solid #A5090C;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Toast notifications */
.toast {
  padding: 16px 24px;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transform: translateX(100%);
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  /* sem verde/azul -> tons neutros escuros */
  background: linear-gradient(135deg, #111827, #4b5563);
}

.toast.error {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

/* Máscara para WhatsApp */
.phone-mask {
  mask: (00) 00000-0000;
}

/* Responsividade */
@media (max-width: 768px) {
  .sticky {
    position: relative !important;
    top: auto !important;
  }
}

/* Esconder logos do topo em telas pequenas para evitar overflow horizontal */
@media (max-width: 640px) {
  .header-logos {
    display: none !important;
  }

  header {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  /* Stack card content vertically on small screens to avoid encavalamento */
  /* Targets common card inner rows that use Tailwind's flex utilities */
  .bg-summit-dark .flex.justify-between,
  .bg-summit-dark .flex.justify-between.items-center,
  .bg-summit-dark .flex.justify-between.items-start {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
    /* ~12px vertical gap between blocks */
  }

  /* Make left/content area take full width so prices and descriptions wrap naturally */
  .bg-summit-dark .flex.justify-between>div:first-child {
    width: 100% !important;
  }

  /* Convert horizontal spacing utilities (space-x-3) to vertical spacing */
  .bg-summit-dark .space-x-3>* {
    margin-left: 0 !important;
    margin-top: 0.5rem !important;
  }

  /* Ensure number inputs don't overflow; make them full width but keep a sane max */
  .bg-summit-dark input[type="number"],
  .bg-summit-dark input[type="tel"],
  .bg-summit-dark input[type="email"] {
    width: 100% !important;
    max-width: none !important;
  }

  /* Specific handling for banner list labels which use a flex label element */
  .bg-summit-dark label.flex.items-center.justify-between {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }

  .bg-summit-dark label.flex.items-center.justify-between input[type="number"] {
    width: 100% !important;
    margin-top: 0 !important;
  }
}

/* Animação de entrada para os cards */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* Customização da scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f3f4f6;
  /* gray-100 */
}

::-webkit-scrollbar-thumb {
  background: #A5090C;
  border-radius: 4px;
}

/* Estados disabled para inputs */
input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Transições suaves */
input,
button,
.portal-card,
.mantenedor-card {
  transition: all 0.3s ease;
}

/* Light theme readability fixes for texts that previously assumed dark bg */
.bg-summit-dark .text-gray-300,
.bg-summit-black .text-gray-300 {
  color: #4b5563 !important;
  /* gray-600 */
}

.bg-summit-dark .text-gray-400,
.bg-summit-black .text-gray-400 {
  color: #6b7280 !important;
  /* gray-500 */
}

/* Lighten borders that were tuned for dark backgrounds */
.bg-summit-dark .border-gray-600,
.bg-summit-black .border-gray-600,
.bg-summit-dark .border-gray-700,
.bg-summit-black .border-gray-700 {
  border-color: #e5e7eb !important;
  /* gray-200 */
}

/* Same-element combos (element has both classes) */
.bg-summit-dark.border-gray-600,
.bg-summit-dark.border-gray-700,
.bg-summit-black.border-gray-600,
.bg-summit-black.border-gray-700 {
  border-color: #e5e7eb !important;
  /* gray-200 */
}

/* Light theme: soften default card borders on selectable cards */
.portal-card>div,
.mantenedor-card>div {
  border-color: #e5e7eb !important;
  /* gray-200 */
}

/* If custom border color class is used, adapt it for light theme */
.border-summit-dark {
  border-color: #e5e7eb !important;
  /* gray-200 */
}

/* Efeito de foco visível para acessibilidade */
*:focus-visible {
  outline: 2px solid #A5090C !important;
  outline-offset: 2px;
}