/* Widget funcional de WhatsApp — Triton Desarrollos */
.triton-wa {
  --wa-white: #FFFFFF;
  --wa-gray: #6E6969;
  --wa-yellow: #F9AF1B;
  --wa-green: #25D366;
  --wa-border: rgba(110,105,105,.22);
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 6000;
  font-family: 'RegularQanelas', sans-serif;
}

.triton-wa-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--wa-green);
  box-shadow: 0 14px 32px rgba(37,211,102,.34);
  cursor: pointer;
}

.triton-wa-toggle svg {
  width: 31px;
  height: 31px;
}

.triton-wa-toggle-label {
  position: absolute;
  right: 74px;
  padding: 9px 14px;
  border-radius: 18px;
  color: var(--wa-gray);
  background: var(--wa-white);
  box-shadow: 0 8px 24px rgba(110,105,105,.18);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.triton-wa-panel {
  position: absolute;
  right: 0;
  bottom: 76px;
  width: min(410px, calc(100vw - 28px));
  max-height: calc(100vh - 115px);
  overflow: hidden;
  border: 1px solid var(--wa-border);
  border-radius: 15px;
  background: var(--wa-white);
  box-shadow: 0 22px 70px rgba(110,105,105,.30);
}

.triton-wa-panel[hidden] {
  display: none !important;
}

.triton-wa-header {
  position: relative !important;
  display: grid;
  grid-template-columns: 58px minmax(0,1fr) 32px;
  gap: 13px;
  align-items: center;
  padding: 20px;
  color: #fff;
  background: var(--wa-gray);
}

.triton-wa-brand {
  width: 58px;
  height: 58px;
  padding: 7px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
}

.triton-wa-online {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
  color: rgba(255,255,255,.78);
  font-size: 11px;
  font-weight: 700;
}

.triton-wa-online i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wa-green);
}

.triton-wa-header h2 {
  margin: 0 0 4px;
  color: #fff;
  font-size: 21px;
  line-height: 1.15;
}

.triton-wa-header p {
  margin: 0;
  color: rgba(255,255,255,.82);
  font-size: 11px;
  line-height: 1.4;
}

.triton-wa-close {
  align-self: start;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 28px;
  line-height: 28px;
  cursor: pointer;
}

.triton-wa-form {
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  padding: 20px;
}

.triton-wa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.triton-wa-field {
  margin-bottom: 13px;
}

.triton-wa-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--wa-gray);
  font-size: 12px;
  font-weight: 700;
}

.triton-wa-field input,
.triton-wa-field select,
.triton-wa-field textarea {
  width: 100% !important;
  margin: 0 !important;
  padding: 12px 13px !important;
  border: 1px solid var(--wa-border) !important;
  border-radius: 7px !important;
  color: var(--wa-gray) !important;
  background: #fff !important;
  font-size: 14px !important;
  box-shadow: none !important;
}

.triton-wa-field textarea {
  min-height: 78px;
  resize: vertical;
}

.triton-wa-field input:focus,
.triton-wa-field select:focus,
.triton-wa-field textarea:focus {
  border-color: var(--wa-yellow) !important;
  box-shadow: 0 0 0 3px rgba(249,175,27,.14) !important;
}

.triton-wa-consent {
  display: grid;
  grid-template-columns: 18px minmax(0,1fr);
  gap: 8px;
  align-items: start;
  margin: 3px 0 14px;
  color: var(--wa-gray);
  font-size: 11px;
  line-height: 1.45;
}

.triton-wa-consent input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--wa-yellow);
}

.triton-wa-consent a {
  color: var(--wa-gray);
  font-weight: 700;
  text-decoration: underline !important;
}

.triton-wa-feedback {
  min-height: 0;
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.4;
}

.triton-wa-feedback.is-error {
  color: #b52d2d;
}

.triton-wa-feedback.is-success {
  color: #197a42;
}

.triton-wa-submit {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: var(--wa-green);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.triton-wa-submit:disabled {
  opacity: .65;
  cursor: wait;
}

.triton-wa-small {
  margin: 9px 0 0;
  color: var(--wa-gray);
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}

@media (max-width: 560px) {
  .triton-wa {
    right: 12px;
    bottom: 12px;
  }

  .triton-wa-toggle {
    width: 56px;
    height: 56px;
  }

  .triton-wa-toggle-label {
    display: none;
  }

  .triton-wa-panel {
    position: fixed;
    right: 10px;
    bottom: 78px;
    left: 10px;
    width: auto;
    max-height: calc(100vh - 96px);
  }

  .triton-wa-form {
    max-height: calc(100vh - 260px);
  }

  .triton-wa-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
