/* Cool Forms Plugin Styles - Ton Araujo */
/* Prefixed with 'tcf-' to avoid conflicts */
/* VERSÃO COM ALTA ESPECIFICIDADE PARA SOBRESCREVER TEMAS */

:root {
  /* Define color variables for easier management */
  --tcf-color-dark-bg-main: #13111f; /* Main very dark background */
  --tcf-color-dark-bg-form: #1a1a2e; /* Form container background */
  --tcf-color-dark-bg-input: #202030; /* Input/textarea background */
  --tcf-color-dark-border-input: #3a3a4c; /* Input/textarea subtle border */
  --tcf-color-text-light: #e0e0e0; /* Main light text */
  --tcf-color-text-placeholder: #6a6a7a; /* Placeholder text color */
  --tcf-color-blue-highlight-border: #4a90e2; /* Lighter blue for focus border */
  --tcf-color-purple-btn: #5b5bbf; /* Send button purple */
  --tcf-color-btn-inactive: #2e2e4e; /* Inactive Intra/Inter button */
  --tcf-color-btn-active: #404060; /* Active Intra/Inter button */
  --tcf-color-validation-error: #e74c3c; /* Cor para erro de validação (vermelho) */
}

/* ALTA ESPECIFICIDADE: Usando body para aumentar peso do seletor */
body .tcf-form-container,
.tcf-form-container {
  font-family: "Inter", sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif !important;

  padding: 10px 0 !important;
  width: 100% !important;
  max-width: 850px !important;
  margin: 0 auto !important;
  color: var(--tcf-color-text-light) !important;
  font-size: 16px !important;
  box-sizing: border-box !important;
}

body .tcf-form-container .tcf-form-title,
.tcf-form-container .tcf-form-title {
  text-align: center !important;
  margin-bottom: 30px !important;
  color: var(--tcf-color-text-light) !important;
  font-size: 1.5em !important;
  font-weight: 600 !important;
}

body .tcf-form-container .tcf-form-group,
.tcf-form-container .tcf-form-group {
  margin-bottom: 35px !important;
}

body .tcf-form-container .tcf-form-group label,
.tcf-form-container .tcf-form-group label {
  display: block !important;
  margin-bottom: 12px !important;
  font-size: 1.05em !important;
  font-weight: 500 !important;
  color: var(--tcf-color-text-light) !important;
}

/* Type of service buttons - ALTA ESPECIFICIDADE */
body .tcf-form-container .tcf-button-group,
.tcf-form-container .tcf-button-group {
  display: flex !important;
  gap: 15px !important;
  flex-wrap: wrap !important;
  justify-content: left !important;
}

body .tcf-form-container .tcf-btn,
.tcf-form-container .tcf-btn {
  background-color: var(--tcf-color-btn-inactive) !important;
  color: var(--tcf-color-text-light) !important;
  border: none !important;
  padding: 12px 35px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  font-size: 1em !important;
  font-weight: 500 !important;
  transition: background-color 0.2s ease, box-shadow 0.2s ease,
    border-color 0.2s ease !important;
  flex: 0 0 auto !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  border: 1px solid transparent !important;
  outline: none !important;
  text-decoration: none !important;
}

body .tcf-form-container .tcf-btn:hover,
.tcf-form-container .tcf-btn:hover {
  background-color: #383858 !important;
  color: var(--tcf-color-text-light) !important;
}

body .tcf-form-container .tcf-btn.tcf-active,
.tcf-form-container .tcf-btn.tcf-active {
  background-color: var(--tcf-color-btn-active) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border-color: rgba(0, 123, 255, 0.4) !important;
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.3),
    inset 0 2px 5px rgba(0, 0, 0, 0.5) !important;
}

/* NEW STYLES for the service description */
body .tcf-form-container .tcf-service-description,
.tcf-form-container .tcf-service-description {
  margin-top: 10px;
  min-height: 25px; /* Ensures the element doesn't collapse */
  color: var(--tcf-color-text-placeholder);
  font-size: 0.9em;
  font-style: italic;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  text-align: center; /* Centraliza o texto no desktop */
}

body .tcf-form-container .tcf-button-group:has(.tcf-active) + .tcf-service-description,
.tcf-form-container .tcf-button-group:has(.tcf-active) + .tcf-service-description {
  opacity: 1;
}

/* Textarea and Inputs (common styles) - ALTA ESPECIFICIDADE */
body .tcf-form-container .tcf-form textarea,
body .tcf-form-container .tcf-form input[type="text"],
body .tcf-form-container .tcf-form input[type="email"],
body .tcf-form-container .tcf-form select:not(.tcf-country-code-select),
.tcf-form-container .tcf-form textarea,
.tcf-form-container .tcf-form input[type="text"],
.tcf-form-container .tcf-form input[type="email"],
.tcf-form-container .tcf-form select:not(.tcf-country-code-select) {
  width: 100% !important;
  padding: 15px 20px !important;
  background-color: var(--tcf-color-dark-bg-input) !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  color: var(--tcf-color-text-light) !important;
  font-size: 1em !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease, color 0.2s ease !important;
  outline: none !important;
  box-shadow: none !important;
  font-family: inherit !important;
}

/* Estilo para os campos DDD e Número - sem bordas próprias */
body .tcf-form-container .tcf-phone-segment-input,
.tcf-form-container .tcf-phone-segment-input {
  padding: 15px 15px !important;
  background-color: var(--tcf-color-dark-bg-input) !important;
  border: none !important;
  color: var(--tcf-color-text-light) !important;
  font-size: 1em !important;
  box-sizing: border-box !important;
  outline: none !important;
  box-shadow: none !important;
  font-family: inherit !important;
}

body .tcf-form-container .tcf-form textarea::placeholder,
body .tcf-form-container .tcf-form input::placeholder,
body .tcf-form-container .tcf-phone-segment-input::placeholder,
.tcf-form-container .tcf-form textarea::placeholder,
.tcf-form-container .tcf-form input::placeholder,
.tcf-form-container .tcf-phone-segment-input::placeholder {
  color: var(--tcf-color-text-placeholder) !important;
  opacity: 0.9 !important;
  font-weight: 300 !important;
}

/* Focus styles: no glow, thin border */
body .tcf-form-container .tcf-form textarea:focus,
body .tcf-form-container .tcf-form input[type="text"]:focus,
body .tcf-form-container .tcf-form input[type="email"]:focus,
body .tcf-form-container .tcf-form select:focus,
.tcf-form-container .tcf-form textarea:focus,
.tcf-form-container .tcf-form input[type="text"]:focus,
.tcf-form-container .tcf-form input[type="email"]:focus,
.tcf-form-container .tcf-form select:focus {
  outline: none !important;
  border-color: var(--tcf-color-blue-highlight-border) !important;
  box-shadow: none !important;
  color: #ffffff !important;
}

body .tcf-form-container .tcf-phone-segment-input:focus,
.tcf-form-container .tcf-phone-segment-input:focus {
  outline: none !important;
  box-shadow: none !important;
  color: #ffffff !important;
}

/* --- Validation Styling --- */
body .tcf-form-container .tcf-form textarea:invalid:not(:placeholder-shown),
body .tcf-form-container .tcf-form input:invalid:not(:placeholder-shown),
.tcf-form-container .tcf-form textarea:invalid:not(:placeholder-shown),
.tcf-form-container .tcf-form input:invalid:not(:placeholder-shown) {
  border-color: var(--tcf-color-validation-error) !important;
}

body .tcf-form-container .tcf-form select:not(.tcf-country-code-select):required:invalid:focus,
.tcf-form-container .tcf-form select:not(.tcf-country-code-select):required:invalid:focus {
  border-color: var(--tcf-color-validation-error) !important;
}

body .tcf-form-container .tcf-invalid-field,
.tcf-form-container .tcf-invalid-field {
  border-color: var(--tcf-color-validation-error) !important;
}

/* Input rows for horizontal arrangement */
body .tcf-form-container .tcf-input-row,
.tcf-form-container .tcf-input-row {
  display: flex !important;
  gap: 30px !important;
  flex-wrap: wrap !important;
  margin-top: -12px !important;
}

body .tcf-form-container .tcf-input-wrapper,
.tcf-form-container .tcf-input-wrapper {
  flex: 1 !important;
  min-width: calc(50% - 15px) !important;
  position: relative !important;
}

@media (max-width: 768px) {
  body .tcf-form-container .tcf-input-wrapper,
  .tcf-form-container .tcf-input-wrapper {
    min-width: 100% !important;
  }
}

/* Name input with "..." */
body .tcf-form-container .tcf-input-with-dots,
.tcf-form-container .tcf-input-with-dots {
  position: relative !important;
}

body .tcf-form-container .tcf-input-with-dots input,
.tcf-form-container .tcf-input-with-dots input {
  padding-right: 40px !important;
  border: 1px solid transparent !important;
}

body .tcf-form-container .tcf-input-with-dots .tcf-dots,
.tcf-form-container .tcf-input-with-dots .tcf-dots {
  position: absolute !important;
  right: 15px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: var(--tcf-color-text-placeholder) !important;
  font-size: 1.6em !important;
  pointer-events: none !important;
  line-height: 1 !important;
}

/* CONTAINER PRINCIPAL DOS CAMPOS DE TELEFONE (DESKTOP) */
body .tcf-form-container .tcf-phone-fields-container,
.tcf-form-container .tcf-phone-fields-container {
  display: flex !important;
  align-items: center !important;
  background-color: var(--tcf-color-dark-bg-input) !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease !important;
  overflow: hidden !important;
  width: 100% !important;
}

/* Container para DDD e Número (DESKTOP) */
body .tcf-form-container .tcf-phone-number-segments,
.tcf-form-container .tcf-phone-number-segments {
  display: contents !important;
	width: 95px !important;
}

body .tcf-form-container .tcf-phone-fields-container:focus-within,
.tcf-form-container .tcf-phone-fields-container:focus-within {
  border-color: var(--tcf-color-blue-highlight-border) !important;
}

body .tcf-form-container .tcf-phone-fields-container:has(
    .tcf-phone-segment-input:invalid:not(:placeholder-shown)
  ),
body .tcf-form-container .tcf-phone-fields-container:has(
    .tcf-country-code-select:invalid:not([value=""])
  ),
.tcf-form-container .tcf-phone-fields-container:has(
    .tcf-phone-segment-input:invalid:not(:placeholder-shown)
  ),
.tcf-form-container .tcf-phone-fields-container:has(
    .tcf-country-code-select:invalid:not([value=""])
  ) {
  border-color: var(--tcf-color-validation-error) !important;
}

body .tcf-form-container .tcf-phone-fields-container.tcf-invalid-field,
.tcf-form-container .tcf-phone-fields-container.tcf-invalid-field {
  border-color: var(--tcf-color-validation-error) !important;
}

/* Style for the country code select (DESKTOP) */
body .tcf-form-container .tcf-country-code-select,
.tcf-form-container .tcf-country-code-select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-color: transparent !important;
  border: none !important;
  color: var(--tcf-color-text-light) !important;
  font-size: 1em !important;
  padding: 15px 10px !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  font-weight: 500 !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2212%22%20height%3D%228%22%20viewBox%3D%220%200%2012%208%22%20fill%3D%22%236a6a7a%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M6%207.4L0.6%201.8L1.8%200.6L6%204.8L10.2%200.6L11.4%201.8L6%207.4Z%22%20fill%3D%22%236a6a7a%22%2F%3E%0A%3C%2Fsvg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 5px center !important;
  background-size: 10px 6px !important;
  width: 95px !important;
  border-right: 1px solid var(--tcf-color-dark-border-input) !important;
  text-align: center !important;
  padding-right: 25px !important;
  border-radius: 8px 0 0 8px !important;
  outline: none !important;
  box-shadow: none !important;
}

body .tcf-form-container .tcf-country-code-select option,
.tcf-form-container .tcf-country-code-select option {
  background-color: var(--tcf-color-dark-bg-input) !important;
  color: var(--tcf-color-text-light) !important;
}

body .tcf-form-container #tcf-ddd,
.tcf-form-container #tcf-ddd {
  flex-basis: 60px !important;
  border-right: 1px solid var(--tcf-color-dark-border-input) !important;
  text-align: center !important;
  max-width: 95px !important;
  border-radius: 0 !important;
}

body .tcf-form-container #tcf-phone-number,
.tcf-form-container #tcf-phone-number {
  flex-grow: 1 !important;
  border-radius: 0 8px 8px 0 !important;
}

/* Select dropdown custom arrow (for Business size) */
body .tcf-form-container .tcf-form select:not(.tcf-country-code-select),
.tcf-form-container .tcf-form select:not(.tcf-country-code-select) {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2212%22%20height%3D%228%22%20viewBox%3D%220%200%2012%208%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M6%207.4L0.6%201.8L1.8%200.6L6%204.8L10.2%200.6L11.4%201.8L6%207.4Z%22%20fill%3D%22%236a6a7a%22%2F%3E%0A%3C%2Fsvg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 15px center !important;
  background-size: 12px 8px !important;
  border: 1px solid transparent !important;
}

body .tcf-form-container .tcf-form select option,
.tcf-form-container .tcf-form select option {
  background-color: var(--tcf-color-dark-bg-input) !important;
  color: var(--tcf-color-text-light) !important;
}

body .tcf-form-container .tcf-form select option[value=""][disabled][selected][hidden],
.tcf-form-container .tcf-form select option[value=""][disabled][selected][hidden] {
  color: var(--tcf-color-text-placeholder) !important;
}

body .tcf-form-container .tcf-form select:valid,
.tcf-form-container .tcf-form select:valid {
  color: var(--tcf-color-text-light) !important;
}

/* Send button */
body .tcf-form-container .tcf-send-btn,
.tcf-form-container .tcf-send-btn {
  display: block !important;
  width: 250px !important;
  padding: 18px !important;
  background-color: var(--tcf-color-purple-btn) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 10px !important;
  font-size: 1.25em !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  margin: 50px auto 0 !important;
  transition: background-color 0.2s ease, box-shadow 0.2s ease !important;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3) !important;
  outline: none !important;
  text-decoration: none !important;
  font-family: inherit !important;
}

body .tcf-form-container .tcf-send-btn:hover,
.tcf-form-container .tcf-send-btn:hover {
  background-color: #6d6dc5 !important;
  box-shadow: 0 8px 25px rgba(91, 91, 191, 0.6) !important;
}

body .tcf-form-container .tcf-send-btn:disabled,
.tcf-form-container .tcf-send-btn:disabled {
  background-color: #4a4a6a !important;
  cursor: not-allowed !important;
  opacity: 0.7 !important;
}

/* Form message */
body .tcf-form-container .tcf-form-message,
.tcf-form-container .tcf-form-message {
  margin-top: 20px !important;
  padding: 15px !important;
  border-radius: 8px !important;
  text-align: center !important;
  font-weight: 500 !important;
}

body .tcf-form-container .tcf-form-message.tcf-success,
.tcf-form-container .tcf-form-message.tcf-success {
  background-color: #2ecc71 !important;
  color: #ffffff !important;
  border: 1px solid #27ae60 !important;
}

body .tcf-form-container .tcf-form-message.tcf-error,
.tcf-form-container .tcf-form-message.tcf-error {
  background-color: var(--tcf-color-validation-error) !important;
  color: #ffffff !important;
  border: 1px solid #c0392b !important;
}

/* Modal and Image Styles for Success Message */
.tcf-modal-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9); /* Preto #000000 com 90% de opacidade */
  -webkit-backdrop-filter: none !important; /* Remove o desfoque para navegadores WebKit */
  backdrop-filter: none !important; /* Remove o desfoque para outros navegadores */
  display: flex;
  justify-content: center;
  align-items: center;
}

.tcf-modal-content {
  position: relative;
  background-color: transparent;
  padding: 80px;
  border-radius: 10px;
  max-width: 90%;
  max-height: 90%;
  overflow: hidden;
}

body .tcf-modal-image {
  max-width: 54% !important;
  height: auto !important;
  margin: 0 auto;
  display: block;
}


/* Ajuste para telas menores MODAl obrigado */
@media (max-width: 768px) {
  body .tcf-modal-image {
    max-width: 90 !important;
  }
}

.tcf-modal-close {
  max-width: 50% !important;
  height: auto !important;
  margin: 0 auto;
  display: block;
}

.tcf-modal-close:hover,
.tcf-modal-close:focus {
  color: #999;
  text-decoration: none;
  cursor: pointer;
}

/* Accessibility: Hide label visually but keep for screen readers */
body .tcf-form-container .tcf-sr-only,
.tcf-form-container .tcf-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border-width: 0 !important;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  body .tcf-form-container,
  .tcf-form-container {
    padding: 40px !important;
    max-width: 100% !important;
  }
}

/* Tablet adjustments for service buttons */
@media (max-width: 768px) {
  body .tcf-form-container .tcf-button-group,
  .tcf-form-container .tcf-button-group {
    justify-content: center !important;
    gap: 15px !important;
  }

  body .tcf-form-container .tcf-btn,
  .tcf-form-container .tcf-btn {
    flex: 0 1 calc(33.333% - 10px) !important; /* Mudar para layout de 3 colunas */
    min-width: calc(33.333% - 10px) !important;
    max-width: calc(33.333% - 10px) !important;
    text-align: center !important;
    padding: 12px 20px !important;
    font-size: 0.95em !important;
  }
}

/* --- MOBILE SPECIFIC STYLES (max-width: 600px) --- */
@media (max-width: 600px) {
  body .tcf-form-container,
  .tcf-form-container {
    font-size: 15px !important;
    padding: 30px 0 !important;
  }

  body .tcf-form-container .tcf-input-row,
  .tcf-form-container .tcf-input-row {
    flex-direction: column !important;
    gap: 25px !important;
  }

  body .tcf-form-container .tcf-send-btn,
  .tcf-form-container .tcf-send-btn {
    width: 100% !important;
    font-size: 1.1em !important;
    padding: 15px !important;
  }

  body .tcf-form-container .tcf-button-group,
  .tcf-form-container .tcf-button-group {
    justify-content: center !important;
    gap: 15px !important;
  }

  body .tcf-form-container .tcf-form-group,
  .tcf-form-container .tcf-form-group {
    margin-bottom: 30px !important;
  }

  body .tcf-form-container .tcf-form-group label,
  .tcf-form-container .tcf-form-group label {
    font-size: 1em !important;
  }

  /* Ajuste para inputs gerais e textarea */
  body .tcf-form-container .tcf-form textarea,
  body .tcf-form-container .tcf-form input[type="text"],
  body .tcf-form-container .tcf-form input[type="email"],
  body .tcf-form-container .tcf-form select:not(.tcf-country-code-select),
  .tcf-form-container .tcf-form textarea,
  .tcf-form-container .tcf-form input[type="text"],
  .tcf-form-container .tcf-form input[type="email"],
  .tcf-form-container .tcf-form select:not(.tcf-country-code-select) {
    padding: 12px 15px !important;
    font-size: 0.95em !important;
  }

  body .tcf-form-container .tcf-btn,
  .tcf-form-container .tcf-btn {
    flex: 0 1 calc(33.333% - 10px) !important; /* Mudar para layout de 3 colunas */
    max-width: calc(33.333% - 10px) !important;
    min-width: calc(33.333% - 10px) !important;
  }
}

/* Hide labels for screen readers */
.tcf-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* === LOADER STYLES === */
body .tcf-form-container .tcf-form-loader,
.tcf-form-container .tcf-form-loader {
  display: none !important; /* Escondido por padrão */
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  margin: 20px auto !important;
  position: relative !important;
  color: #fff !important;
  left: -100px !important;
  box-sizing: border-box !important;
  animation: tcfShadowRolling 2s linear infinite !important;
}

body .tcf-form-container .tcf-form-loader.tcf-show,
.tcf-form-container .tcf-form-loader.tcf-show {
  display: block !important;
}

@keyframes tcfShadowRolling {
  0% {
    box-shadow: 0px 0 rgba(255, 255, 255, 0), 0px 0 rgba(255, 255, 255, 0),
      0px 0 rgba(255, 255, 255, 0), 0px 0 rgba(255, 255, 255, 0);
  }
  12% {
    box-shadow: 100px 0 white, 0px 0 rgba(255, 255, 255, 0),
      0px 0 rgba(255, 255, 255, 0), 0px 0 rgba(255, 255, 255, 0);
  }
  25% {
    box-shadow: 110px 0 white, 100px 0 white, 0px 0 rgba(255, 255, 255, 0),
      0px 0 rgba(255, 255, 255, 0);
  }
  36% {
    box-shadow: 120px 0 white, 110px 0 white, 100px 0 white,
      0px 0 rgba(255, 255, 255, 0);
  }
  50% {
    box-shadow: 130px 0 white, 120px 0 white, 110px 0 white, 100px 0 white;
  }
  62% {
    box-shadow: 200px 0 rgba(255, 255, 255, 0), 130px 0 white,
      120px 0 white, 110px 0 white;
  }
  75% {
    box-shadow: 200px 0 rgba(255, 255, 255, 0),
      200px 0 rgba(255, 255, 255, 0), 130px 0 white, 120px 0 white;
  }
  87% {
    box-shadow: 200px 0 rgba(255, 255, 255, 0),
      200px 0 rgba(255, 255, 255, 0), 200px 0 rgba(255, 255, 255, 0),
      130px 0 white;
  }
  100% {
    box-shadow: 200px 0 rgba(255, 255, 255, 0),
      200px 0 rgba(255, 255, 255, 0), 200px 0 rgba(255, 255, 255, 0),
      200px 0 rgba(255, 255, 255, 0);
  }
}

