/* ── UTM WhatsApp Tracker Modal ── */
/* A cor base é controlada pela variável --uwt-color injetada pelo PHP no <head> */

:root {
  --uwt-color:       #25D366;
  --uwt-color-dark:  #128C7E;
  --uwt-color-alpha: rgba(37, 211, 102, 0.15);
}

#uwt-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99998;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
#uwt-overlay.active { display: block; opacity: 1; }

#uwt-modal {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -45%);
  z-index: 99999;
  background: #fff;
  border-radius: 18px;
  padding: 40px 36px 36px;
  width: 92%; max-width: 440px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.22);
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  opacity: 0;
}
#uwt-modal.active { display: block; transform: translate(-50%, -50%); opacity: 1; }

/* Barra colorida no topo do modal */
#uwt-modal::before {
  content: '';
  display: block;
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--uwt-color), var(--uwt-color-dark));
  border-radius: 18px 18px 0 0;
}

#uwt-close {
  position: absolute;
  top: 14px; right: 18px;
  background: none; border: none;
  font-size: 24px; line-height: 1;
  color: #999; cursor: pointer;
  padding: 4px 8px; border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
#uwt-close:hover { color: #333; background: #f0f0f0; }

#uwt-modal-icon { font-size: 48px; margin-bottom: 12px; line-height: 1; }

#uwt-modal-title {
  font-size: 22px; font-weight: 700;
  color: #1a1a1a; margin: 0 0 8px; line-height: 1.3;
}

#uwt-modal-subtitle {
  font-size: 15px; color: #666;
  margin: 0 0 24px; line-height: 1.5;
}

#uwt-form { display: flex; flex-direction: column; gap: 12px; }

#uwt-name, #uwt-phone {
  width: 100%; padding: 13px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px; font-size: 16px;
  color: #1a1a1a; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box; background: #fafafa;
}
#uwt-name:focus, #uwt-phone:focus {
  border-color: var(--uwt-color);
  box-shadow: 0 0 0 3px var(--uwt-color-alpha);
  background: #fff;
}
#uwt-name::placeholder, #uwt-phone::placeholder { color: #aaa; }

#uwt-submit {
  width: 100%; padding: 15px;
  background: linear-gradient(135deg, var(--uwt-color), var(--uwt-color-dark));
  color: #fff; border: none; border-radius: 10px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  letter-spacing: 0.3px; margin-top: 4px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
#uwt-submit::before {
  content: '';
  display: inline-block; width: 20px; height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat;
}
#uwt-submit:hover:not(:disabled) { opacity: 0.92; transform: translateY(-1px); }
#uwt-submit:active:not(:disabled) { transform: translateY(0); }
#uwt-submit:disabled { opacity: 0.65; cursor: not-allowed; }

#uwt-error {
  font-size: 13px; color: #e53e3e;
  min-height: 18px; text-align: left; padding-left: 2px;
}

@media (max-width: 480px) {
  #uwt-modal { padding: 32px 22px 28px; border-radius: 16px; }
  #uwt-modal-title { font-size: 20px; }
}
