* {
  box-sizing: border-box;
}

body {
       font-family: 'Inter', sans-serif;
}

:root {
  --color-principal: #087021;
  --color-secundario: #994500;
}

.chatbutton-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
}

.chatbutton {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  width: auto;
  height: auto;
  padding: 0;
}

.chatbutton:hover {
  transform: scale(1.03);
  box-shadow: none;
}

.chatbutton span {
  display: none;
}

.chatbutton-img {
  display: block;
  max-width: 160px;
  height: auto;
  cursor: pointer;
  transition: transform 0.25s ease-out; /* transición suave */
  transform-origin: center center;
}

.chatbutton:hover .chatbutton-img {
  transform: scale(1.06);   /* prueba 1.06–1.1 según lo que veas mejor */
}

.chatbutton-chatopened-js {
  transform: scale(0);
  opacity: 0;
}

.chat-js {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 450px;
  max-width: calc(100vw - 40px);
  height: 800px;
  max-height: calc(100vh - 100px);
  background: #2f3772;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  transform: scale(0);
  opacity: 0;
  transform-origin: bottom right;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  overflow: hidden;
}

.chat-opened-js {
  transform: scale(1);
  opacity: 1;
}

.chat-header {
  /* background: linear-gradient(135deg, var(--color-principal) 0%, var(--color-secundario) 100%); */
  background-color: var(--color-principal);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  border-radius: 20px 20px 0 0;
}

.close-icon-js {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.close-icon-js:hover {
  background: rgba(255, 255, 255, 0.2);
}

.close-icon-js::before,
.close-icon-js::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 2px;
  background: white;
  border-radius: 2px;
}

.close-icon-js::before {
  transform: rotate(45deg);
}

.close-icon-js::after {
  transform: rotate(-45deg);
}

.header-logo {
  width: 48px;
  height: 48px;
  background: white;
  border-radius: 12px;
  padding: 8px;
}

.header-text h5 {
  color: white;
  margin: 0;
  font-weight: 400;
  font-size: 20px;
}

/* Contenedor del formulario */
.webchat-container-js {
  flex: 1;
  overflow-y: auto;
  padding: 24px 24px 32px;
  background: #fafafa;
}

.webchat-container-js::-webkit-scrollbar {
  width: 6px;
}

.webchat-container-js::-webkit-scrollbar-track {
  background: transparent;
}

.webchat-container-js::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.webchat-container-js::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

.form-label {
  font-weight: 500 !important;
  font-size: 14px !important;
  color: #374151 !important;
  margin-bottom: 3px !important;
  display: block !important;
}

.form-control,
.form-select {
  border: 2px solid #e5e7eb !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  font-size: 14px !important;
  transition: all 0.2s !important;
  background: white !important;
}

.form-control:focus,
.form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  outline: none;
}

.form-control::placeholder {
  color: #9ca3af !important;
}

/* .mb-2 {
  margin-bottom: 20px;
}

.mb-3 {
  margin-bottom: 24px;
} */

/* Checkbox personalizado */
.form-check {
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  padding: 16px !important;
  background: white;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  margin-top: 20px !important;
}

.form-check-input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: -0.3em !important;
}

.form-check-input:checked {
  background-color: #667eea;
  border-color: #667eea;
}

.form-check-label {
  font-size: 12px !important;
  color: #6b7280 !important;
  line-height: 1.5 !important;
  cursor: pointer !important;
}

input[type="radio"] {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  cursor: pointer;
  accent-color: #667eea;
}

#ver-detalle {
  color: var(--color-principal);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: inline-block;
  margin-top: 5px;
  margin-bottom: 0;
  /* margin-bottom: 12px; */
  cursor: pointer;
  transition: color 0.2s;
}

#ver-detalle:hover {
  text-decoration: underline;
}

#detalle {
  color: #6b7280;
  background: white;
  padding: 16px;
  border-radius: 12px;
  border-left: 4px solid var(--color-principal);
  margin-top: 5px;
  margin-bottom: 12px;
}

#detalle a {
  color: #2e50e7;
  text-decoration: none;
  font-weight: 500;
}

#detalle a:hover {
  text-decoration: underline;
}

.boton-enviar {
  width: 100%;
  padding: 12px 24px !important;
  background: var(--color-secundario) !important;
  border-color: var(--color-secundario) !important;
  border: none;
  border-radius: 12px;
  color: white;
  /* font-size: 17px;
  font-weight: 400 !important; */
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.boton-enviar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  background-color: var(--color-secundario) !important;
  border-color: var(--color-secundario) !important;
  opacity: 90%;
}

.boton-enviar:active {
  transform: translateY(0);
}

/* Segundo formulario */
#divform2 {
  text-align: center;
}

#divform2 .mb-1 {
  font-size: 24px;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 8px;
}

#divform2 .mb-4 {
  font-size: 16px;
  color: #6b7280;
  margin-bottom: 32px;
}

#divform2 .mb-3 {
  text-align: left;
}

/* Responsive */
@media (max-width: 768px) {
  .chat-js {
    width: calc(100vw - 20px);
    height: calc(100vh - 80px);
    bottom: 10px;
    right: 20px;
  }

  .chatbutton-container {
    bottom: 20px;
    right: 20px;
  }

  .webchat-container-js {
    padding: 24px 16px;
  }
  .chatbutton-img {
        max-width: 120px; /* tamaño móvil */
    }
}

/* Animación de entrada */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container {
  animation: fadeInUp 0.4s ease-out !important;
}

form label {
    display:block !important;
}